diff --git a/go.mod b/go.mod index cf80bd7d..b522b48f 100644 --- a/go.mod +++ b/go.mod @@ -15,9 +15,8 @@ require ( k8s.io/component-base v0.29.1 k8s.io/klog/v2 v2.110.1 k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a - kmodules.xyz/client-go v0.29.9 + kmodules.xyz/client-go v0.29.12 kmodules.xyz/schema-checker v0.4.1 - kubepack.dev/lib-helm v0.29.6 open-cluster-management.io/addon-framework v0.9.0 open-cluster-management.io/api v0.13.0 sigs.k8s.io/controller-runtime v0.17.0 @@ -30,22 +29,16 @@ require ( github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/alessio/shellescape v1.4.1 // indirect github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/cli v24.0.7+incompatible // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect - github.com/docker/docker v24.0.7+incompatible // indirect - github.com/docker/docker-credential-helpers v0.8.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v5.7.0+incompatible // indirect @@ -63,10 +56,10 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/cel-go v0.17.7 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/go-containerregistry v0.17.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 // indirect github.com/google/uuid v1.4.0 // indirect @@ -78,20 +71,17 @@ require ( github.com/jonboulle/clockwork v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.18 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/nxadm/tail v1.4.11 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.18.0 // indirect @@ -101,10 +91,8 @@ require ( github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect - github.com/vbatts/tar-split v0.11.5 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect @@ -138,8 +126,6 @@ require ( gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect gomodules.xyz/jsonpath v0.0.2 // indirect gomodules.xyz/mergo v0.3.13 // indirect - gomodules.xyz/sets v0.2.1 // indirect - gomodules.xyz/x v0.0.15 // indirect google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect @@ -155,18 +141,15 @@ require ( k8s.io/apiserver v0.29.0 // indirect k8s.io/kms v0.29.0 // indirect k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect - kmodules.xyz/go-containerregistry v0.0.12 // indirect - kmodules.xyz/resource-metadata v0.18.2-0.20240205132124-d5898b9bd3c1 // indirect open-cluster-management.io/sdk-go v0.13.0 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - x-helm.dev/apimachinery v0.0.16 // indirect ) replace github.com/Masterminds/sprig/v3 => github.com/gomodules/sprig/v3 v3.2.3-0.20220405051441-0a8a99bac1b8 -replace sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime v0.17.2-0.20240213085617-b6aac9684c00 +replace sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime v0.17.3-0.20240301215359-aa29dfea56fd replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.6 diff --git a/go.sum b/go.sum index 3ea44ba9..551884f7 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,6 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= -github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= @@ -27,8 +25,6 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= -github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= @@ -41,14 +37,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/cli v24.0.7+incompatible h1:wa/nIwYFW7BVTGa7SWPVyyXU9lgORqUb1xfI36MSkFg= -github.com/docker/cli v24.0.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= -github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= @@ -65,6 +53,7 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -114,8 +103,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.17.0 h1:5p+zYs/R4VGHkhyvgWurWrpJ2hW4Vv9fQI+GzdcwXLk= -github.com/google/go-containerregistry v0.17.0/go.mod h1:u0qB2l7mvtWVR5kNcbFIhFY1hLbf8eeGapA+vbFDCtQ= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -147,16 +134,14 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/kluster-manager/addon-framework v0.9.1-0.20240225065513-dbdc1604459c h1:wZTeuAIHwgHS/4c0R5Mj7vzHYdyxnyJ66GQ4r2y+wLc= github.com/kluster-manager/addon-framework v0.9.1-0.20240225065513-dbdc1604459c/go.mod h1:ZZvGRA/zmIjIww0reatmOxcXy0Eoghnat/Opszgo2NA= github.com/kmodules/apiserver v0.29.1-0.20240104121741-1fb217d4a573 h1:6v7bTFGH/Ha1idq1sLX9px2KJhcx6cpuMowuYRyCht4= github.com/kmodules/apiserver v0.29.1-0.20240104121741-1fb217d4a573/go.mod h1:31n78PsRKPmfpee7/l9NYEv67u6hOL6AfcE761HapDM= -github.com/kmodules/controller-runtime v0.17.2-0.20240213085617-b6aac9684c00 h1:+2add9izgyGZb+ZOkMwPH/fswvgfIxWilUatbp2nPo8= -github.com/kmodules/controller-runtime v0.17.2-0.20240213085617-b6aac9684c00/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= +github.com/kmodules/controller-runtime v0.17.3-0.20240301215359-aa29dfea56fd h1:VjD73vX8f7nia3vGBbtYb3Evk1sIsrzkQBnb6fp6VRA= +github.com/kmodules/controller-runtime v0.17.3-0.20240301215359-aa29dfea56fd/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -175,8 +160,6 @@ github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvls github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= @@ -196,10 +179,6 @@ github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw= github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/openshift/library-go v0.0.0-20240116081341-964bcb3f545c h1:gLylEQQryG+A6nqWYIwE1wUzn1eFUmthjADvflMWKnM= github.com/openshift/library-go v0.0.0-20240116081341-964bcb3f545c/go.mod h1:82B0gt8XawdXWRtKMrm3jSMTeRsiOSYKCi4F0fvPjG0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -240,7 +219,6 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= @@ -248,8 +226,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= -github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= -github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -345,8 +321,8 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -383,10 +359,6 @@ gomodules.xyz/mergo v0.3.13 h1:q6cL/MMXZH/MrR2+yjSihFFq6UifXqjwaqI48B6cMEM= gomodules.xyz/mergo v0.3.13/go.mod h1:F/2rKC7j0URTnHUKDiTiLcGdLMhdv8jK2Za3cRTUVmc= gomodules.xyz/pointer v0.1.0 h1:sG2UKrYVSo6E3r4itAjXfPfe4fuXMi0KdyTHpR3vGCg= gomodules.xyz/pointer v0.1.0/go.mod h1:sPLsC0+yLTRecUiC5yVlyvXhZ6LAGojNCRWNNqoplvo= -gomodules.xyz/sets v0.2.1 h1:vK3oUWoGVrZKLDKO/bzEo/ucHFdCE7+DxWPeWxK72KQ= -gomodules.xyz/sets v0.2.1/go.mod h1:jKgNp01/iDs+svOWXaPk5cKP3VXy0mWUoTF/ore+aMc= -gomodules.xyz/x v0.0.15 h1:n2aGD3cnpvNTvUALUE30sJMqT5g/G6BS5EnZojzw0tw= -gomodules.xyz/x v0.0.15/go.mod h1:M4tV13Y/0ZxrKEkmUcLkPdh8C4TjCAc5uXchDcqGYrw= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= @@ -420,8 +392,6 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= -gotest.tools/v3 v3.1.0/go.mod h1:fHy7eyTmJFO5bQbUsEGQ1v4m2J3Jz9eWL54TP2/ZuYQ= helm.sh/helm/v3 v3.14.2 h1:V71fv+NGZv0icBlr+in1MJXuUIHCiPG1hW9gEBISTIA= helm.sh/helm/v3 v3.14.2/go.mod h1:2itvvDv2WSZXTllknfQo6j7u3VVgMAvm8POCDgYH424= k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw= @@ -442,16 +412,10 @@ k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a h1:ZeIPbyHHqahGIbeyLJJjAU k8s.io/kube-openapi v0.0.0-20231129212854-f0671cc7e66a/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -kmodules.xyz/client-go v0.29.9 h1:nZcKM4YzmHAAQ62EYLep1NQdhARA9uOnYOiHMRf2VVg= -kmodules.xyz/client-go v0.29.9/go.mod h1:WYM/ZC3I5/AUGHYyYYEzYHFhnSwK+tEZyGld6KpLoxI= -kmodules.xyz/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3qmAFIE37I= -kmodules.xyz/go-containerregistry v0.0.12/go.mod h1:KgeNg0hDsgeda+qc0NzWk0iVRdF0+ZIg/oRzGoYh78I= -kmodules.xyz/resource-metadata v0.18.2-0.20240205132124-d5898b9bd3c1 h1:JShlx4SSVx6jwz4DHqgrkJhlFvIJk7KV5bLbMLolMZc= -kmodules.xyz/resource-metadata v0.18.2-0.20240205132124-d5898b9bd3c1/go.mod h1:I9HeSgkshwzwUy0IDhp4yIfRFbFQJ21syeSf4NsB04o= +kmodules.xyz/client-go v0.29.12 h1:OZV5a9fEJwx0XI8OJYDqYRuCEeJyhsZN0iUs1YCBeks= +kmodules.xyz/client-go v0.29.12/go.mod h1:WYM/ZC3I5/AUGHYyYYEzYHFhnSwK+tEZyGld6KpLoxI= kmodules.xyz/schema-checker v0.4.1 h1:V5UEjR6UMAXf307lTgw+9rDRfHLTNA8g/q9DngqYI9M= kmodules.xyz/schema-checker v0.4.1/go.mod h1:BRXLB3Osuc9raHRJxHOgZFGecZ2aZumLXCHAOa5NPdA= -kubepack.dev/lib-helm v0.29.6 h1:c283W5mMh/+S7ih4EHyQDqlKzKBaw+91HFoMFk6E/vo= -kubepack.dev/lib-helm v0.29.6/go.mod h1:ltF8HEyHblfQ8FqnkoqN+ly8L93eeNdnWwpubLV8zIE= open-cluster-management.io/api v0.13.0 h1:dlcJEZlNlE0DmSDctK2s7iWKg9l+Tgb0V78Z040nMuk= open-cluster-management.io/api v0.13.0/go.mod h1:CuCPEzXDvOyxBB0H1d1eSeajbHqaeGEKq9c63vQc63w= open-cluster-management.io/sdk-go v0.13.0 h1:ddMGsPUekQr9z03tVN6vF39Uf+WEKMtGU/xSd81HdoA= @@ -464,5 +428,3 @@ sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+s sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -x-helm.dev/apimachinery v0.0.16 h1:Eb160xcdH9fMVHak5QSWYWxoaReytch+A7kk25QWjx0= -x-helm.dev/apimachinery v0.0.16/go.mod h1:05brgFw5oWOX7OTXT090SQojqXjbttqWfqoJo+ejBU4= diff --git a/vendor/github.com/alessio/shellescape/.gitignore b/vendor/github.com/alessio/shellescape/.gitignore deleted file mode 100644 index 4ba7c2d1..00000000 --- a/vendor/github.com/alessio/shellescape/.gitignore +++ /dev/null @@ -1,28 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -.idea/ - -escargs diff --git a/vendor/github.com/alessio/shellescape/.golangci.yml b/vendor/github.com/alessio/shellescape/.golangci.yml deleted file mode 100644 index cd4a17e4..00000000 --- a/vendor/github.com/alessio/shellescape/.golangci.yml +++ /dev/null @@ -1,64 +0,0 @@ -# run: -# # timeout for analysis, e.g. 30s, 5m, default is 1m -# timeout: 5m - -linters: - disable-all: true - enable: - - bodyclose - - deadcode - - depguard - - dogsled - - goconst - - gocritic - - gofmt - - goimports - - golint - - gosec - - gosimple - - govet - - ineffassign - - interfacer - - maligned - - misspell - - prealloc - - scopelint - - staticcheck - - structcheck - - stylecheck - - typecheck - - unconvert - - unparam - - unused - - misspell - - wsl - -issues: - exclude-rules: - - text: "Use of weak random number generator" - linters: - - gosec - - text: "comment on exported var" - linters: - - golint - - text: "don't use an underscore in package name" - linters: - - golint - - text: "ST1003:" - linters: - - stylecheck - # FIXME: Disabled until golangci-lint updates stylecheck with this fix: - # https://github.com/dominikh/go-tools/issues/389 - - text: "ST1016:" - linters: - - stylecheck - -linters-settings: - dogsled: - max-blank-identifiers: 3 - maligned: - # print struct with more effective memory layout or not, false by default - suggest-new: true - -run: - tests: false diff --git a/vendor/github.com/alessio/shellescape/.goreleaser.yml b/vendor/github.com/alessio/shellescape/.goreleaser.yml deleted file mode 100644 index 064c9374..00000000 --- a/vendor/github.com/alessio/shellescape/.goreleaser.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com -before: - hooks: - # You may remove this if you don't use go modules. - - go mod download - # you may remove this if you don't need go generate - - go generate ./... -builds: - - env: - - CGO_ENABLED=0 - main: ./cmd/escargs - goos: - - linux - - windows - - darwin -archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' diff --git a/vendor/github.com/alessio/shellescape/AUTHORS b/vendor/github.com/alessio/shellescape/AUTHORS deleted file mode 100644 index 4a647a6f..00000000 --- a/vendor/github.com/alessio/shellescape/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Alessio Treglia diff --git a/vendor/github.com/alessio/shellescape/CODE_OF_CONDUCT.md b/vendor/github.com/alessio/shellescape/CODE_OF_CONDUCT.md deleted file mode 100644 index e8eda606..00000000 --- a/vendor/github.com/alessio/shellescape/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, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, 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 alessio@debian.org. 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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/vendor/github.com/alessio/shellescape/LICENSE b/vendor/github.com/alessio/shellescape/LICENSE deleted file mode 100644 index 9f760679..00000000 --- a/vendor/github.com/alessio/shellescape/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Alessio Treglia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/alessio/shellescape/README.md b/vendor/github.com/alessio/shellescape/README.md deleted file mode 100644 index 910bb253..00000000 --- a/vendor/github.com/alessio/shellescape/README.md +++ /dev/null @@ -1,61 +0,0 @@ -![Build](https://github.com/alessio/shellescape/workflows/Build/badge.svg) -[![GoDoc](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/alessio/shellescape?tab=overview) -[![sourcegraph](https://sourcegraph.com/github.com/alessio/shellescape/-/badge.svg)](https://sourcegraph.com/github.com/alessio/shellescape) -[![codecov](https://codecov.io/gh/alessio/shellescape/branch/master/graph/badge.svg)](https://codecov.io/gh/alessio/shellescape) -[![Coverage](https://gocover.io/_badge/github.com/alessio/shellescape)](https://gocover.io/github.com/alessio/shellescape) -[![Go Report Card](https://goreportcard.com/badge/github.com/alessio/shellescape)](https://goreportcard.com/report/github.com/alessio/shellescape) - -# shellescape -Escape arbitrary strings for safe use as command line arguments. -## Contents of the package - -This package provides the `shellescape.Quote()` function that returns a -shell-escaped copy of a string. This functionality could be helpful -in those cases where it is known that the output of a Go program will -be appended to/used in the context of shell programs' command line arguments. - -This work was inspired by the Python original package -[shellescape](https://pypi.python.org/pypi/shellescape). - -## Usage - -The following snippet shows a typical unsafe idiom: - -```go -package main - -import ( - "fmt" - "os" -) - -func main() { - fmt.Printf("ls -l %s\n", os.Args[1]) -} -``` -_[See in Go Playground](https://play.golang.org/p/Wj2WoUfH_d)_ - -Especially when creating pipeline of commands which might end up being -executed by a shell interpreter, it is particularly unsafe to not -escape arguments. - -`shellescape.Quote()` comes in handy and to safely escape strings: - -```go -package main - -import ( - "fmt" - "os" - - "gopkg.in/alessio/shellescape.v1" -) - -func main() { - fmt.Printf("ls -l %s\n", shellescape.Quote(os.Args[1])) -} -``` -_[See in Go Playground](https://play.golang.org/p/HJ_CXgSrmp)_ - -## The escargs utility -__escargs__ reads lines from the standard input and prints shell-escaped versions. Unlinke __xargs__, blank lines on the standard input are not discarded. diff --git a/vendor/github.com/alessio/shellescape/shellescape.go b/vendor/github.com/alessio/shellescape/shellescape.go deleted file mode 100644 index dc34a556..00000000 --- a/vendor/github.com/alessio/shellescape/shellescape.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Package shellescape provides the shellescape.Quote to escape arbitrary -strings for a safe use as command line arguments in the most common -POSIX shells. - -The original Python package which this work was inspired by can be found -at https://pypi.python.org/pypi/shellescape. -*/ -package shellescape // "import gopkg.in/alessio/shellescape.v1" - -/* -The functionality provided by shellescape.Quote could be helpful -in those cases where it is known that the output of a Go program will -be appended to/used in the context of shell programs' command line arguments. -*/ - -import ( - "regexp" - "strings" - "unicode" -) - -var pattern *regexp.Regexp - -func init() { - pattern = regexp.MustCompile(`[^\w@%+=:,./-]`) -} - -// Quote returns a shell-escaped version of the string s. The returned value -// is a string that can safely be used as one token in a shell command line. -func Quote(s string) string { - if len(s) == 0 { - return "''" - } - - if pattern.MatchString(s) { - return "'" + strings.ReplaceAll(s, "'", "'\"'\"'") + "'" - } - - return s -} - -// QuoteCommand returns a shell-escaped version of the slice of strings. -// The returned value is a string that can safely be used as shell command arguments. -func QuoteCommand(args []string) string { - l := make([]string, len(args)) - - for i, s := range args { - l[i] = Quote(s) - } - - return strings.Join(l, " ") -} - -// StripUnsafe remove non-printable runes, e.g. control characters in -// a string that is meant for consumption by terminals that support -// control characters. -func StripUnsafe(s string) string { - return strings.Map(func(r rune) rune { - if unicode.IsPrint(r) { - return r - } - - return -1 - }, s) -} diff --git a/vendor/github.com/containerd/stargz-snapshotter/estargz/LICENSE b/vendor/github.com/containerd/stargz-snapshotter/estargz/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/vendor/github.com/containerd/stargz-snapshotter/estargz/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/containerd/stargz-snapshotter/estargz/build.go b/vendor/github.com/containerd/stargz-snapshotter/estargz/build.go deleted file mode 100644 index b071cea5..00000000 --- a/vendor/github.com/containerd/stargz-snapshotter/estargz/build.go +++ /dev/null @@ -1,690 +0,0 @@ -/* - Copyright The containerd 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. -*/ - -/* - Copyright 2019 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 estargz - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "context" - "errors" - "fmt" - "io" - "os" - "path" - "runtime" - "strings" - "sync" - - "github.com/containerd/stargz-snapshotter/estargz/errorutil" - "github.com/klauspost/compress/zstd" - digest "github.com/opencontainers/go-digest" - "golang.org/x/sync/errgroup" -) - -type options struct { - chunkSize int - compressionLevel int - prioritizedFiles []string - missedPrioritizedFiles *[]string - compression Compression - ctx context.Context - minChunkSize int -} - -type Option func(o *options) error - -// WithChunkSize option specifies the chunk size of eStargz blob to build. -func WithChunkSize(chunkSize int) Option { - return func(o *options) error { - o.chunkSize = chunkSize - return nil - } -} - -// WithCompressionLevel option specifies the gzip compression level. -// The default is gzip.BestCompression. -// This option will be ignored if WithCompression option is used. -// See also: https://godoc.org/compress/gzip#pkg-constants -func WithCompressionLevel(level int) Option { - return func(o *options) error { - o.compressionLevel = level - return nil - } -} - -// WithPrioritizedFiles option specifies the list of prioritized files. -// These files must be complete paths that are absolute or relative to "/" -// For example, all of "foo/bar", "/foo/bar", "./foo/bar" and "../foo/bar" -// are treated as "/foo/bar". -func WithPrioritizedFiles(files []string) Option { - return func(o *options) error { - o.prioritizedFiles = files - return nil - } -} - -// WithAllowPrioritizeNotFound makes Build continue the execution even if some -// of prioritized files specified by WithPrioritizedFiles option aren't found -// in the input tar. Instead, this records all missed file names to the passed -// slice. -func WithAllowPrioritizeNotFound(missedFiles *[]string) Option { - return func(o *options) error { - if missedFiles == nil { - return fmt.Errorf("WithAllowPrioritizeNotFound: slice must be passed") - } - o.missedPrioritizedFiles = missedFiles - return nil - } -} - -// WithCompression specifies compression algorithm to be used. -// Default is gzip. -func WithCompression(compression Compression) Option { - return func(o *options) error { - o.compression = compression - return nil - } -} - -// WithContext specifies a context that can be used for clean canceleration. -func WithContext(ctx context.Context) Option { - return func(o *options) error { - o.ctx = ctx - return nil - } -} - -// WithMinChunkSize option specifies the minimal number of bytes of data -// must be written in one gzip stream. -// By increasing this number, one gzip stream can contain multiple files -// and it hopefully leads to smaller result blob. -// NOTE: This adds a TOC property that old reader doesn't understand. -func WithMinChunkSize(minChunkSize int) Option { - return func(o *options) error { - o.minChunkSize = minChunkSize - return nil - } -} - -// Blob is an eStargz blob. -type Blob struct { - io.ReadCloser - diffID digest.Digester - tocDigest digest.Digest -} - -// DiffID returns the digest of uncompressed blob. -// It is only valid to call DiffID after Close. -func (b *Blob) DiffID() digest.Digest { - return b.diffID.Digest() -} - -// TOCDigest returns the digest of uncompressed TOC JSON. -func (b *Blob) TOCDigest() digest.Digest { - return b.tocDigest -} - -// Build builds an eStargz blob which is an extended version of stargz, from a blob (gzip, zstd -// or plain tar) passed through the argument. If there are some prioritized files are listed in -// the option, these files are grouped as "prioritized" and can be used for runtime optimization -// (e.g. prefetch). This function builds a blob in parallel, with dividing that blob into several -// (at least the number of runtime.GOMAXPROCS(0)) sub-blobs. -func Build(tarBlob *io.SectionReader, opt ...Option) (_ *Blob, rErr error) { - var opts options - opts.compressionLevel = gzip.BestCompression // BestCompression by default - for _, o := range opt { - if err := o(&opts); err != nil { - return nil, err - } - } - if opts.compression == nil { - opts.compression = newGzipCompressionWithLevel(opts.compressionLevel) - } - layerFiles := newTempFiles() - ctx := opts.ctx - if ctx == nil { - ctx = context.Background() - } - done := make(chan struct{}) - defer close(done) - go func() { - select { - case <-done: - // nop - case <-ctx.Done(): - layerFiles.CleanupAll() - } - }() - defer func() { - if rErr != nil { - if err := layerFiles.CleanupAll(); err != nil { - rErr = fmt.Errorf("failed to cleanup tmp files: %v: %w", err, rErr) - } - } - if cErr := ctx.Err(); cErr != nil { - rErr = fmt.Errorf("error from context %q: %w", cErr, rErr) - } - }() - tarBlob, err := decompressBlob(tarBlob, layerFiles) - if err != nil { - return nil, err - } - entries, err := sortEntries(tarBlob, opts.prioritizedFiles, opts.missedPrioritizedFiles) - if err != nil { - return nil, err - } - var tarParts [][]*entry - if opts.minChunkSize > 0 { - // Each entry needs to know the size of the current gzip stream so they - // cannot be processed in parallel. - tarParts = [][]*entry{entries} - } else { - tarParts = divideEntries(entries, runtime.GOMAXPROCS(0)) - } - writers := make([]*Writer, len(tarParts)) - payloads := make([]*os.File, len(tarParts)) - var mu sync.Mutex - var eg errgroup.Group - for i, parts := range tarParts { - i, parts := i, parts - // builds verifiable stargz sub-blobs - eg.Go(func() error { - esgzFile, err := layerFiles.TempFile("", "esgzdata") - if err != nil { - return err - } - sw := NewWriterWithCompressor(esgzFile, opts.compression) - sw.ChunkSize = opts.chunkSize - sw.MinChunkSize = opts.minChunkSize - if sw.needsOpenGzEntries == nil { - sw.needsOpenGzEntries = make(map[string]struct{}) - } - for _, f := range []string{PrefetchLandmark, NoPrefetchLandmark} { - sw.needsOpenGzEntries[f] = struct{}{} - } - if err := sw.AppendTar(readerFromEntries(parts...)); err != nil { - return err - } - mu.Lock() - writers[i] = sw - payloads[i] = esgzFile - mu.Unlock() - return nil - }) - } - if err := eg.Wait(); err != nil { - rErr = err - return nil, err - } - tocAndFooter, tocDgst, err := closeWithCombine(writers...) - if err != nil { - rErr = err - return nil, err - } - var rs []io.Reader - for _, p := range payloads { - fs, err := fileSectionReader(p) - if err != nil { - return nil, err - } - rs = append(rs, fs) - } - diffID := digest.Canonical.Digester() - pr, pw := io.Pipe() - go func() { - r, err := opts.compression.Reader(io.TeeReader(io.MultiReader(append(rs, tocAndFooter)...), pw)) - if err != nil { - pw.CloseWithError(err) - return - } - defer r.Close() - if _, err := io.Copy(diffID.Hash(), r); err != nil { - pw.CloseWithError(err) - return - } - pw.Close() - }() - return &Blob{ - ReadCloser: readCloser{ - Reader: pr, - closeFunc: layerFiles.CleanupAll, - }, - tocDigest: tocDgst, - diffID: diffID, - }, nil -} - -// closeWithCombine takes unclosed Writers and close them. This also returns the -// toc that combined all Writers into. -// Writers doesn't write TOC and footer to the underlying writers so they can be -// combined into a single eStargz and tocAndFooter returned by this function can -// be appended at the tail of that combined blob. -func closeWithCombine(ws ...*Writer) (tocAndFooterR io.Reader, tocDgst digest.Digest, err error) { - if len(ws) == 0 { - return nil, "", fmt.Errorf("at least one writer must be passed") - } - for _, w := range ws { - if w.closed { - return nil, "", fmt.Errorf("writer must be unclosed") - } - defer func(w *Writer) { w.closed = true }(w) - if err := w.closeGz(); err != nil { - return nil, "", err - } - if err := w.bw.Flush(); err != nil { - return nil, "", err - } - } - var ( - mtoc = new(JTOC) - currentOffset int64 - ) - mtoc.Version = ws[0].toc.Version - for _, w := range ws { - for _, e := range w.toc.Entries { - // Recalculate Offset of non-empty files/chunks - if (e.Type == "reg" && e.Size > 0) || e.Type == "chunk" { - e.Offset += currentOffset - } - mtoc.Entries = append(mtoc.Entries, e) - } - if w.toc.Version > mtoc.Version { - mtoc.Version = w.toc.Version - } - currentOffset += w.cw.n - } - - return tocAndFooter(ws[0].compressor, mtoc, currentOffset) -} - -func tocAndFooter(compressor Compressor, toc *JTOC, offset int64) (io.Reader, digest.Digest, error) { - buf := new(bytes.Buffer) - tocDigest, err := compressor.WriteTOCAndFooter(buf, offset, toc, nil) - if err != nil { - return nil, "", err - } - return buf, tocDigest, nil -} - -// divideEntries divides passed entries to the parts at least the number specified by the -// argument. -func divideEntries(entries []*entry, minPartsNum int) (set [][]*entry) { - var estimatedSize int64 - for _, e := range entries { - estimatedSize += e.header.Size - } - unitSize := estimatedSize / int64(minPartsNum) - var ( - nextEnd = unitSize - offset int64 - ) - set = append(set, []*entry{}) - for _, e := range entries { - set[len(set)-1] = append(set[len(set)-1], e) - offset += e.header.Size - if offset > nextEnd { - set = append(set, []*entry{}) - nextEnd += unitSize - } - } - return -} - -var errNotFound = errors.New("not found") - -// sortEntries reads the specified tar blob and returns a list of tar entries. -// If some of prioritized files are specified, the list starts from these -// files with keeping the order specified by the argument. -func sortEntries(in io.ReaderAt, prioritized []string, missedPrioritized *[]string) ([]*entry, error) { - - // Import tar file. - intar, err := importTar(in) - if err != nil { - return nil, fmt.Errorf("failed to sort: %w", err) - } - - // Sort the tar file respecting to the prioritized files list. - sorted := &tarFile{} - for _, l := range prioritized { - if err := moveRec(l, intar, sorted); err != nil { - if errors.Is(err, errNotFound) && missedPrioritized != nil { - *missedPrioritized = append(*missedPrioritized, l) - continue // allow not found - } - return nil, fmt.Errorf("failed to sort tar entries: %w", err) - } - } - if len(prioritized) == 0 { - sorted.add(&entry{ - header: &tar.Header{ - Name: NoPrefetchLandmark, - Typeflag: tar.TypeReg, - Size: int64(len([]byte{landmarkContents})), - }, - payload: bytes.NewReader([]byte{landmarkContents}), - }) - } else { - sorted.add(&entry{ - header: &tar.Header{ - Name: PrefetchLandmark, - Typeflag: tar.TypeReg, - Size: int64(len([]byte{landmarkContents})), - }, - payload: bytes.NewReader([]byte{landmarkContents}), - }) - } - - // Dump all entry and concatinate them. - return append(sorted.dump(), intar.dump()...), nil -} - -// readerFromEntries returns a reader of tar archive that contains entries passed -// through the arguments. -func readerFromEntries(entries ...*entry) io.Reader { - pr, pw := io.Pipe() - go func() { - tw := tar.NewWriter(pw) - defer tw.Close() - for _, entry := range entries { - if err := tw.WriteHeader(entry.header); err != nil { - pw.CloseWithError(fmt.Errorf("Failed to write tar header: %v", err)) - return - } - if _, err := io.Copy(tw, entry.payload); err != nil { - pw.CloseWithError(fmt.Errorf("Failed to write tar payload: %v", err)) - return - } - } - pw.Close() - }() - return pr -} - -func importTar(in io.ReaderAt) (*tarFile, error) { - tf := &tarFile{} - pw, err := newCountReadSeeker(in) - if err != nil { - return nil, fmt.Errorf("failed to make position watcher: %w", err) - } - tr := tar.NewReader(pw) - - // Walk through all nodes. - for { - // Fetch and parse next header. - h, err := tr.Next() - if err != nil { - if err == io.EOF { - break - } else { - return nil, fmt.Errorf("failed to parse tar file, %w", err) - } - } - switch cleanEntryName(h.Name) { - case PrefetchLandmark, NoPrefetchLandmark: - // Ignore existing landmark - continue - } - - // Add entry. If it already exists, replace it. - if _, ok := tf.get(h.Name); ok { - tf.remove(h.Name) - } - tf.add(&entry{ - header: h, - payload: io.NewSectionReader(in, pw.currentPos(), h.Size), - }) - } - - return tf, nil -} - -func moveRec(name string, in *tarFile, out *tarFile) error { - name = cleanEntryName(name) - if name == "" { // root directory. stop recursion. - if e, ok := in.get(name); ok { - // entry of the root directory exists. we should move it as well. - // this case will occur if tar entries are prefixed with "./", "/", etc. - out.add(e) - in.remove(name) - } - return nil - } - - _, okIn := in.get(name) - _, okOut := out.get(name) - if !okIn && !okOut { - return fmt.Errorf("file: %q: %w", name, errNotFound) - } - - parent, _ := path.Split(strings.TrimSuffix(name, "/")) - if err := moveRec(parent, in, out); err != nil { - return err - } - if e, ok := in.get(name); ok && e.header.Typeflag == tar.TypeLink { - if err := moveRec(e.header.Linkname, in, out); err != nil { - return err - } - } - if e, ok := in.get(name); ok { - out.add(e) - in.remove(name) - } - return nil -} - -type entry struct { - header *tar.Header - payload io.ReadSeeker -} - -type tarFile struct { - index map[string]*entry - stream []*entry -} - -func (f *tarFile) add(e *entry) { - if f.index == nil { - f.index = make(map[string]*entry) - } - f.index[cleanEntryName(e.header.Name)] = e - f.stream = append(f.stream, e) -} - -func (f *tarFile) remove(name string) { - name = cleanEntryName(name) - if f.index != nil { - delete(f.index, name) - } - var filtered []*entry - for _, e := range f.stream { - if cleanEntryName(e.header.Name) == name { - continue - } - filtered = append(filtered, e) - } - f.stream = filtered -} - -func (f *tarFile) get(name string) (e *entry, ok bool) { - if f.index == nil { - return nil, false - } - e, ok = f.index[cleanEntryName(name)] - return -} - -func (f *tarFile) dump() []*entry { - return f.stream -} - -type readCloser struct { - io.Reader - closeFunc func() error -} - -func (rc readCloser) Close() error { - return rc.closeFunc() -} - -func fileSectionReader(file *os.File) (*io.SectionReader, error) { - info, err := file.Stat() - if err != nil { - return nil, err - } - return io.NewSectionReader(file, 0, info.Size()), nil -} - -func newTempFiles() *tempFiles { - return &tempFiles{} -} - -type tempFiles struct { - files []*os.File - filesMu sync.Mutex - cleanupOnce sync.Once -} - -func (tf *tempFiles) TempFile(dir, pattern string) (*os.File, error) { - f, err := os.CreateTemp(dir, pattern) - if err != nil { - return nil, err - } - tf.filesMu.Lock() - tf.files = append(tf.files, f) - tf.filesMu.Unlock() - return f, nil -} - -func (tf *tempFiles) CleanupAll() (err error) { - tf.cleanupOnce.Do(func() { - err = tf.cleanupAll() - }) - return -} - -func (tf *tempFiles) cleanupAll() error { - tf.filesMu.Lock() - defer tf.filesMu.Unlock() - var allErr []error - for _, f := range tf.files { - if err := f.Close(); err != nil { - allErr = append(allErr, err) - } - if err := os.Remove(f.Name()); err != nil { - allErr = append(allErr, err) - } - } - tf.files = nil - return errorutil.Aggregate(allErr) -} - -func newCountReadSeeker(r io.ReaderAt) (*countReadSeeker, error) { - pos := int64(0) - return &countReadSeeker{r: r, cPos: &pos}, nil -} - -type countReadSeeker struct { - r io.ReaderAt - cPos *int64 - - mu sync.Mutex -} - -func (cr *countReadSeeker) Read(p []byte) (int, error) { - cr.mu.Lock() - defer cr.mu.Unlock() - - n, err := cr.r.ReadAt(p, *cr.cPos) - if err == nil { - *cr.cPos += int64(n) - } - return n, err -} - -func (cr *countReadSeeker) Seek(offset int64, whence int) (int64, error) { - cr.mu.Lock() - defer cr.mu.Unlock() - - switch whence { - default: - return 0, fmt.Errorf("Unknown whence: %v", whence) - case io.SeekStart: - case io.SeekCurrent: - offset += *cr.cPos - case io.SeekEnd: - return 0, fmt.Errorf("Unsupported whence: %v", whence) - } - - if offset < 0 { - return 0, fmt.Errorf("invalid offset") - } - *cr.cPos = offset - return offset, nil -} - -func (cr *countReadSeeker) currentPos() int64 { - cr.mu.Lock() - defer cr.mu.Unlock() - - return *cr.cPos -} - -func decompressBlob(org *io.SectionReader, tmp *tempFiles) (*io.SectionReader, error) { - if org.Size() < 4 { - return org, nil - } - src := make([]byte, 4) - if _, err := org.Read(src); err != nil && err != io.EOF { - return nil, err - } - var dR io.Reader - if bytes.Equal([]byte{0x1F, 0x8B, 0x08}, src[:3]) { - // gzip - dgR, err := gzip.NewReader(io.NewSectionReader(org, 0, org.Size())) - if err != nil { - return nil, err - } - defer dgR.Close() - dR = io.Reader(dgR) - } else if bytes.Equal([]byte{0x28, 0xb5, 0x2f, 0xfd}, src[:4]) { - // zstd - dzR, err := zstd.NewReader(io.NewSectionReader(org, 0, org.Size())) - if err != nil { - return nil, err - } - defer dzR.Close() - dR = io.Reader(dzR) - } else { - // uncompressed - return io.NewSectionReader(org, 0, org.Size()), nil - } - b, err := tmp.TempFile("", "uncompresseddata") - if err != nil { - return nil, err - } - if _, err := io.Copy(b, dR); err != nil { - return nil, err - } - return fileSectionReader(b) -} diff --git a/vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.go b/vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.go deleted file mode 100644 index 6de78b02..00000000 --- a/vendor/github.com/containerd/stargz-snapshotter/estargz/errorutil/errors.go +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright The containerd 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 errorutil - -import ( - "errors" - "fmt" - "strings" -) - -// Aggregate combines a list of errors into a single new error. -func Aggregate(errs []error) error { - switch len(errs) { - case 0: - return nil - case 1: - return errs[0] - default: - points := make([]string, len(errs)+1) - points[0] = fmt.Sprintf("%d error(s) occurred:", len(errs)) - for i, err := range errs { - points[i+1] = fmt.Sprintf("* %s", err) - } - return errors.New(strings.Join(points, "\n\t")) - } -} diff --git a/vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.go b/vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.go deleted file mode 100644 index f4d55465..00000000 --- a/vendor/github.com/containerd/stargz-snapshotter/estargz/estargz.go +++ /dev/null @@ -1,1223 +0,0 @@ -/* - Copyright The containerd 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. -*/ - -/* - Copyright 2019 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 estargz - -import ( - "bufio" - "bytes" - "compress/gzip" - "crypto/sha256" - "errors" - "fmt" - "hash" - "io" - "os" - "path" - "sort" - "strings" - "sync" - "time" - - "github.com/containerd/stargz-snapshotter/estargz/errorutil" - digest "github.com/opencontainers/go-digest" - "github.com/vbatts/tar-split/archive/tar" -) - -// A Reader permits random access reads from a stargz file. -type Reader struct { - sr *io.SectionReader - toc *JTOC - tocDigest digest.Digest - - // m stores all non-chunk entries, keyed by name. - m map[string]*TOCEntry - - // chunks stores all TOCEntry values for regular files that - // are split up. For a file with a single chunk, it's only - // stored in m. - chunks map[string][]*TOCEntry - - decompressor Decompressor -} - -type openOpts struct { - tocOffset int64 - decompressors []Decompressor - telemetry *Telemetry -} - -// OpenOption is an option used during opening the layer -type OpenOption func(o *openOpts) error - -// WithTOCOffset option specifies the offset of TOC -func WithTOCOffset(tocOffset int64) OpenOption { - return func(o *openOpts) error { - o.tocOffset = tocOffset - return nil - } -} - -// WithDecompressors option specifies decompressors to use. -// Default is gzip-based decompressor. -func WithDecompressors(decompressors ...Decompressor) OpenOption { - return func(o *openOpts) error { - o.decompressors = decompressors - return nil - } -} - -// WithTelemetry option specifies the telemetry hooks -func WithTelemetry(telemetry *Telemetry) OpenOption { - return func(o *openOpts) error { - o.telemetry = telemetry - return nil - } -} - -// MeasureLatencyHook is a func which takes start time and records the diff -type MeasureLatencyHook func(time.Time) - -// Telemetry is a struct which defines telemetry hooks. By implementing these hooks you should be able to record -// the latency metrics of the respective steps of estargz open operation. To be used with estargz.OpenWithTelemetry(...) -type Telemetry struct { - GetFooterLatency MeasureLatencyHook // measure time to get stargz footer (in milliseconds) - GetTocLatency MeasureLatencyHook // measure time to GET TOC JSON (in milliseconds) - DeserializeTocLatency MeasureLatencyHook // measure time to deserialize TOC JSON (in milliseconds) -} - -// Open opens a stargz file for reading. -// The behavior is configurable using options. -// -// Note that each entry name is normalized as the path that is relative to root. -func Open(sr *io.SectionReader, opt ...OpenOption) (*Reader, error) { - var opts openOpts - for _, o := range opt { - if err := o(&opts); err != nil { - return nil, err - } - } - - gzipCompressors := []Decompressor{new(GzipDecompressor), new(LegacyGzipDecompressor)} - decompressors := append(gzipCompressors, opts.decompressors...) - - // Determine the size to fetch. Try to fetch as many bytes as possible. - fetchSize := maxFooterSize(sr.Size(), decompressors...) - if maybeTocOffset := opts.tocOffset; maybeTocOffset > fetchSize { - if maybeTocOffset > sr.Size() { - return nil, fmt.Errorf("blob size %d is smaller than the toc offset", sr.Size()) - } - fetchSize = sr.Size() - maybeTocOffset - } - - start := time.Now() // before getting layer footer - footer := make([]byte, fetchSize) - if _, err := sr.ReadAt(footer, sr.Size()-fetchSize); err != nil { - return nil, fmt.Errorf("error reading footer: %v", err) - } - if opts.telemetry != nil && opts.telemetry.GetFooterLatency != nil { - opts.telemetry.GetFooterLatency(start) - } - - var allErr []error - var found bool - var r *Reader - for _, d := range decompressors { - fSize := d.FooterSize() - fOffset := positive(int64(len(footer)) - fSize) - maybeTocBytes := footer[:fOffset] - _, tocOffset, tocSize, err := d.ParseFooter(footer[fOffset:]) - if err != nil { - allErr = append(allErr, err) - continue - } - if tocOffset >= 0 && tocSize <= 0 { - tocSize = sr.Size() - tocOffset - fSize - } - if tocOffset >= 0 && tocSize < int64(len(maybeTocBytes)) { - maybeTocBytes = maybeTocBytes[:tocSize] - } - r, err = parseTOC(d, sr, tocOffset, tocSize, maybeTocBytes, opts) - if err == nil { - found = true - break - } - allErr = append(allErr, err) - } - if !found { - return nil, errorutil.Aggregate(allErr) - } - if err := r.initFields(); err != nil { - return nil, fmt.Errorf("failed to initialize fields of entries: %v", err) - } - return r, nil -} - -// OpenFooter extracts and parses footer from the given blob. -// only supports gzip-based eStargz. -func OpenFooter(sr *io.SectionReader) (tocOffset int64, footerSize int64, rErr error) { - if sr.Size() < FooterSize && sr.Size() < legacyFooterSize { - return 0, 0, fmt.Errorf("blob size %d is smaller than the footer size", sr.Size()) - } - var footer [FooterSize]byte - if _, err := sr.ReadAt(footer[:], sr.Size()-FooterSize); err != nil { - return 0, 0, fmt.Errorf("error reading footer: %v", err) - } - var allErr []error - for _, d := range []Decompressor{new(GzipDecompressor), new(LegacyGzipDecompressor)} { - fSize := d.FooterSize() - fOffset := positive(int64(len(footer)) - fSize) - _, tocOffset, _, err := d.ParseFooter(footer[fOffset:]) - if err == nil { - return tocOffset, fSize, err - } - allErr = append(allErr, err) - } - return 0, 0, errorutil.Aggregate(allErr) -} - -// initFields populates the Reader from r.toc after decoding it from -// JSON. -// -// Unexported fields are populated and TOCEntry fields that were -// implicit in the JSON are populated. -func (r *Reader) initFields() error { - r.m = make(map[string]*TOCEntry, len(r.toc.Entries)) - r.chunks = make(map[string][]*TOCEntry) - var lastPath string - uname := map[int]string{} - gname := map[int]string{} - var lastRegEnt *TOCEntry - var chunkTopIndex int - for i, ent := range r.toc.Entries { - ent.Name = cleanEntryName(ent.Name) - switch ent.Type { - case "reg", "chunk": - if ent.Offset != r.toc.Entries[chunkTopIndex].Offset { - chunkTopIndex = i - } - ent.chunkTopIndex = chunkTopIndex - } - if ent.Type == "reg" { - lastRegEnt = ent - } - if ent.Type == "chunk" { - ent.Name = lastPath - r.chunks[ent.Name] = append(r.chunks[ent.Name], ent) - if ent.ChunkSize == 0 && lastRegEnt != nil { - ent.ChunkSize = lastRegEnt.Size - ent.ChunkOffset - } - } else { - lastPath = ent.Name - - if ent.Uname != "" { - uname[ent.UID] = ent.Uname - } else { - ent.Uname = uname[ent.UID] - } - if ent.Gname != "" { - gname[ent.GID] = ent.Gname - } else { - ent.Gname = uname[ent.GID] - } - - ent.modTime, _ = time.Parse(time.RFC3339, ent.ModTime3339) - - if ent.Type == "dir" { - ent.NumLink++ // Parent dir links to this directory - } - r.m[ent.Name] = ent - } - if ent.Type == "reg" && ent.ChunkSize > 0 && ent.ChunkSize < ent.Size { - r.chunks[ent.Name] = make([]*TOCEntry, 0, ent.Size/ent.ChunkSize+1) - r.chunks[ent.Name] = append(r.chunks[ent.Name], ent) - } - if ent.ChunkSize == 0 && ent.Size != 0 { - ent.ChunkSize = ent.Size - } - } - - // Populate children, add implicit directories: - for _, ent := range r.toc.Entries { - if ent.Type == "chunk" { - continue - } - // add "foo/": - // add "foo" child to "" (creating "" if necessary) - // - // add "foo/bar/": - // add "bar" child to "foo" (creating "foo" if necessary) - // - // add "foo/bar.txt": - // add "bar.txt" child to "foo" (creating "foo" if necessary) - // - // add "a/b/c/d/e/f.txt": - // create "a/b/c/d/e" node - // add "f.txt" child to "e" - - name := ent.Name - pdirName := parentDir(name) - if name == pdirName { - // This entry and its parent are the same. - // Ignore this for avoiding infinite loop of the reference. - // The example case where this can occur is when tar contains the root - // directory itself (e.g. "./", "/"). - continue - } - pdir := r.getOrCreateDir(pdirName) - ent.NumLink++ // at least one name(ent.Name) references this entry. - if ent.Type == "hardlink" { - org, err := r.getSource(ent) - if err != nil { - return err - } - org.NumLink++ // original entry is referenced by this ent.Name. - ent = org - } - pdir.addChild(path.Base(name), ent) - } - - lastOffset := r.sr.Size() - for i := len(r.toc.Entries) - 1; i >= 0; i-- { - e := r.toc.Entries[i] - if e.isDataType() { - e.nextOffset = lastOffset - } - if e.Offset != 0 && e.InnerOffset == 0 { - lastOffset = e.Offset - } - } - - return nil -} - -func (r *Reader) getSource(ent *TOCEntry) (_ *TOCEntry, err error) { - if ent.Type == "hardlink" { - org, ok := r.m[cleanEntryName(ent.LinkName)] - if !ok { - return nil, fmt.Errorf("%q is a hardlink but the linkname %q isn't found", ent.Name, ent.LinkName) - } - ent, err = r.getSource(org) - if err != nil { - return nil, err - } - } - return ent, nil -} - -func parentDir(p string) string { - dir, _ := path.Split(p) - return strings.TrimSuffix(dir, "/") -} - -func (r *Reader) getOrCreateDir(d string) *TOCEntry { - e, ok := r.m[d] - if !ok { - e = &TOCEntry{ - Name: d, - Type: "dir", - Mode: 0755, - NumLink: 2, // The directory itself(.) and the parent link to this directory. - } - r.m[d] = e - if d != "" { - pdir := r.getOrCreateDir(parentDir(d)) - pdir.addChild(path.Base(d), e) - } - } - return e -} - -func (r *Reader) TOCDigest() digest.Digest { - return r.tocDigest -} - -// VerifyTOC checks that the TOC JSON in the passed blob matches the -// passed digests and that the TOC JSON contains digests for all chunks -// contained in the blob. If the verification succceeds, this function -// returns TOCEntryVerifier which holds all chunk digests in the stargz blob. -func (r *Reader) VerifyTOC(tocDigest digest.Digest) (TOCEntryVerifier, error) { - // Verify the digest of TOC JSON - if r.tocDigest != tocDigest { - return nil, fmt.Errorf("invalid TOC JSON %q; want %q", r.tocDigest, tocDigest) - } - return r.Verifiers() -} - -// Verifiers returns TOCEntryVerifier of this chunk. Use VerifyTOC instead in most cases -// because this doesn't verify TOC. -func (r *Reader) Verifiers() (TOCEntryVerifier, error) { - chunkDigestMap := make(map[int64]digest.Digest) // map from chunk offset to the chunk digest - regDigestMap := make(map[int64]digest.Digest) // map from chunk offset to the reg file digest - var chunkDigestMapIncomplete bool - var regDigestMapIncomplete bool - var containsChunk bool - for _, e := range r.toc.Entries { - if e.Type != "reg" && e.Type != "chunk" { - continue - } - - // offset must be unique in stargz blob - _, dOK := chunkDigestMap[e.Offset] - _, rOK := regDigestMap[e.Offset] - if dOK || rOK { - return nil, fmt.Errorf("offset %d found twice", e.Offset) - } - - if e.Type == "reg" { - if e.Size == 0 { - continue // ignores empty file - } - - // record the digest of regular file payload - if e.Digest != "" { - d, err := digest.Parse(e.Digest) - if err != nil { - return nil, fmt.Errorf("failed to parse regular file digest %q: %w", e.Digest, err) - } - regDigestMap[e.Offset] = d - } else { - regDigestMapIncomplete = true - } - } else { - containsChunk = true // this layer contains "chunk" entries. - } - - // "reg" also can contain ChunkDigest (e.g. when "reg" is the first entry of - // chunked file) - if e.ChunkDigest != "" { - d, err := digest.Parse(e.ChunkDigest) - if err != nil { - return nil, fmt.Errorf("failed to parse chunk digest %q: %w", e.ChunkDigest, err) - } - chunkDigestMap[e.Offset] = d - } else { - chunkDigestMapIncomplete = true - } - } - - if chunkDigestMapIncomplete { - // Though some chunk digests are not found, if this layer doesn't contain - // "chunk"s and all digest of "reg" files are recorded, we can use them instead. - if !containsChunk && !regDigestMapIncomplete { - return &verifier{digestMap: regDigestMap}, nil - } - return nil, fmt.Errorf("some ChunkDigest not found in TOC JSON") - } - - return &verifier{digestMap: chunkDigestMap}, nil -} - -// verifier is an implementation of TOCEntryVerifier which holds verifiers keyed by -// offset of the chunk. -type verifier struct { - digestMap map[int64]digest.Digest - digestMapMu sync.Mutex -} - -// Verifier returns a content verifier specified by TOCEntry. -func (v *verifier) Verifier(ce *TOCEntry) (digest.Verifier, error) { - v.digestMapMu.Lock() - defer v.digestMapMu.Unlock() - d, ok := v.digestMap[ce.Offset] - if !ok { - return nil, fmt.Errorf("verifier for offset=%d,size=%d hasn't been registered", - ce.Offset, ce.ChunkSize) - } - return d.Verifier(), nil -} - -// ChunkEntryForOffset returns the TOCEntry containing the byte of the -// named file at the given offset within the file. -// Name must be absolute path or one that is relative to root. -func (r *Reader) ChunkEntryForOffset(name string, offset int64) (e *TOCEntry, ok bool) { - name = cleanEntryName(name) - e, ok = r.Lookup(name) - if !ok || !e.isDataType() { - return nil, false - } - ents := r.chunks[name] - if len(ents) < 2 { - if offset >= e.ChunkSize { - return nil, false - } - return e, true - } - i := sort.Search(len(ents), func(i int) bool { - e := ents[i] - return e.ChunkOffset >= offset || (offset > e.ChunkOffset && offset < e.ChunkOffset+e.ChunkSize) - }) - if i == len(ents) { - return nil, false - } - return ents[i], true -} - -// Lookup returns the Table of Contents entry for the given path. -// -// To get the root directory, use the empty string. -// Path must be absolute path or one that is relative to root. -func (r *Reader) Lookup(path string) (e *TOCEntry, ok bool) { - path = cleanEntryName(path) - if r == nil { - return - } - e, ok = r.m[path] - if ok && e.Type == "hardlink" { - var err error - e, err = r.getSource(e) - if err != nil { - return nil, false - } - } - return -} - -// OpenFile returns the reader of the specified file payload. -// -// Name must be absolute path or one that is relative to root. -func (r *Reader) OpenFile(name string) (*io.SectionReader, error) { - fr, err := r.newFileReader(name) - if err != nil { - return nil, err - } - return io.NewSectionReader(fr, 0, fr.size), nil -} - -func (r *Reader) newFileReader(name string) (*fileReader, error) { - name = cleanEntryName(name) - ent, ok := r.Lookup(name) - if !ok { - // TODO: come up with some error plan. This is lazy: - return nil, &os.PathError{ - Path: name, - Op: "OpenFile", - Err: os.ErrNotExist, - } - } - if ent.Type != "reg" { - return nil, &os.PathError{ - Path: name, - Op: "OpenFile", - Err: errors.New("not a regular file"), - } - } - return &fileReader{ - r: r, - size: ent.Size, - ents: r.getChunks(ent), - }, nil -} - -func (r *Reader) OpenFileWithPreReader(name string, preRead func(*TOCEntry, io.Reader) error) (*io.SectionReader, error) { - fr, err := r.newFileReader(name) - if err != nil { - return nil, err - } - fr.preRead = preRead - return io.NewSectionReader(fr, 0, fr.size), nil -} - -func (r *Reader) getChunks(ent *TOCEntry) []*TOCEntry { - if ents, ok := r.chunks[ent.Name]; ok { - return ents - } - return []*TOCEntry{ent} -} - -type fileReader struct { - r *Reader - size int64 - ents []*TOCEntry // 1 or more reg/chunk entries - preRead func(*TOCEntry, io.Reader) error -} - -func (fr *fileReader) ReadAt(p []byte, off int64) (n int, err error) { - if off >= fr.size { - return 0, io.EOF - } - if off < 0 { - return 0, errors.New("invalid offset") - } - var i int - if len(fr.ents) > 1 { - i = sort.Search(len(fr.ents), func(i int) bool { - return fr.ents[i].ChunkOffset >= off - }) - if i == len(fr.ents) { - i = len(fr.ents) - 1 - } - } - ent := fr.ents[i] - if ent.ChunkOffset > off { - if i == 0 { - return 0, errors.New("internal error; first chunk offset is non-zero") - } - ent = fr.ents[i-1] - } - - // If ent is a chunk of a large file, adjust the ReadAt - // offset by the chunk's offset. - off -= ent.ChunkOffset - - finalEnt := fr.ents[len(fr.ents)-1] - compressedOff := ent.Offset - // compressedBytesRemain is the number of compressed bytes in this - // file remaining, over 1+ chunks. - compressedBytesRemain := finalEnt.NextOffset() - compressedOff - - sr := io.NewSectionReader(fr.r.sr, compressedOff, compressedBytesRemain) - - const maxRead = 2 << 20 - var bufSize = maxRead - if compressedBytesRemain < maxRead { - bufSize = int(compressedBytesRemain) - } - - br := bufio.NewReaderSize(sr, bufSize) - if _, err := br.Peek(bufSize); err != nil { - return 0, fmt.Errorf("fileReader.ReadAt.peek: %v", err) - } - - dr, err := fr.r.decompressor.Reader(br) - if err != nil { - return 0, fmt.Errorf("fileReader.ReadAt.decompressor.Reader: %v", err) - } - defer dr.Close() - - if fr.preRead == nil { - if n, err := io.CopyN(io.Discard, dr, ent.InnerOffset+off); n != ent.InnerOffset+off || err != nil { - return 0, fmt.Errorf("discard of %d bytes != %v, %v", ent.InnerOffset+off, n, err) - } - return io.ReadFull(dr, p) - } - - var retN int - var retErr error - var found bool - var nr int64 - for _, e := range fr.r.toc.Entries[ent.chunkTopIndex:] { - if !e.isDataType() { - continue - } - if e.Offset != fr.r.toc.Entries[ent.chunkTopIndex].Offset { - break - } - if in, err := io.CopyN(io.Discard, dr, e.InnerOffset-nr); err != nil || in != e.InnerOffset-nr { - return 0, fmt.Errorf("discard of remaining %d bytes != %v, %v", e.InnerOffset-nr, in, err) - } - nr = e.InnerOffset - if e == ent { - found = true - if n, err := io.CopyN(io.Discard, dr, off); n != off || err != nil { - return 0, fmt.Errorf("discard of offset %d bytes != %v, %v", off, n, err) - } - retN, retErr = io.ReadFull(dr, p) - nr += off + int64(retN) - continue - } - cr := &countReader{r: io.LimitReader(dr, e.ChunkSize)} - if err := fr.preRead(e, cr); err != nil { - return 0, fmt.Errorf("failed to pre read: %w", err) - } - nr += cr.n - } - if !found { - return 0, fmt.Errorf("fileReader.ReadAt: target entry not found") - } - return retN, retErr -} - -// A Writer writes stargz files. -// -// Use NewWriter to create a new Writer. -type Writer struct { - bw *bufio.Writer - cw *countWriter - toc *JTOC - diffHash hash.Hash // SHA-256 of uncompressed tar - - closed bool - gz io.WriteCloser - lastUsername map[int]string - lastGroupname map[int]string - compressor Compressor - - uncompressedCounter *countWriteFlusher - - // ChunkSize optionally controls the maximum number of bytes - // of data of a regular file that can be written in one gzip - // stream before a new gzip stream is started. - // Zero means to use a default, currently 4 MiB. - ChunkSize int - - // MinChunkSize optionally controls the minimum number of bytes - // of data must be written in one gzip stream before a new gzip - // NOTE: This adds a TOC property that stargz snapshotter < v0.13.0 doesn't understand. - MinChunkSize int - - needsOpenGzEntries map[string]struct{} -} - -// currentCompressionWriter writes to the current w.gz field, which can -// change throughout writing a tar entry. -// -// Additionally, it updates w's SHA-256 of the uncompressed bytes -// of the tar file. -type currentCompressionWriter struct{ w *Writer } - -func (ccw currentCompressionWriter) Write(p []byte) (int, error) { - ccw.w.diffHash.Write(p) - if ccw.w.gz == nil { - if err := ccw.w.condOpenGz(); err != nil { - return 0, err - } - } - return ccw.w.gz.Write(p) -} - -func (w *Writer) chunkSize() int { - if w.ChunkSize <= 0 { - return 4 << 20 - } - return w.ChunkSize -} - -// Unpack decompresses the given estargz blob and returns a ReadCloser of the tar blob. -// TOC JSON and footer are removed. -func Unpack(sr *io.SectionReader, c Decompressor) (io.ReadCloser, error) { - footerSize := c.FooterSize() - if sr.Size() < footerSize { - return nil, fmt.Errorf("blob is too small; %d < %d", sr.Size(), footerSize) - } - footerOffset := sr.Size() - footerSize - footer := make([]byte, footerSize) - if _, err := sr.ReadAt(footer, footerOffset); err != nil { - return nil, err - } - blobPayloadSize, _, _, err := c.ParseFooter(footer) - if err != nil { - return nil, fmt.Errorf("failed to parse footer: %w", err) - } - if blobPayloadSize < 0 { - blobPayloadSize = sr.Size() - } - return c.Reader(io.LimitReader(sr, blobPayloadSize)) -} - -// NewWriter returns a new stargz writer (gzip-based) writing to w. -// -// The writer must be closed to write its trailing table of contents. -func NewWriter(w io.Writer) *Writer { - return NewWriterLevel(w, gzip.BestCompression) -} - -// NewWriterLevel returns a new stargz writer (gzip-based) writing to w. -// The compression level is configurable. -// -// The writer must be closed to write its trailing table of contents. -func NewWriterLevel(w io.Writer, compressionLevel int) *Writer { - return NewWriterWithCompressor(w, NewGzipCompressorWithLevel(compressionLevel)) -} - -// NewWriterWithCompressor returns a new stargz writer writing to w. -// The compression method is configurable. -// -// The writer must be closed to write its trailing table of contents. -func NewWriterWithCompressor(w io.Writer, c Compressor) *Writer { - bw := bufio.NewWriter(w) - cw := &countWriter{w: bw} - return &Writer{ - bw: bw, - cw: cw, - toc: &JTOC{Version: 1}, - diffHash: sha256.New(), - compressor: c, - uncompressedCounter: &countWriteFlusher{}, - } -} - -// Close writes the stargz's table of contents and flushes all the -// buffers, returning any error. -func (w *Writer) Close() (digest.Digest, error) { - if w.closed { - return "", nil - } - defer func() { w.closed = true }() - - if err := w.closeGz(); err != nil { - return "", err - } - - // Write the TOC index and footer. - tocDigest, err := w.compressor.WriteTOCAndFooter(w.cw, w.cw.n, w.toc, w.diffHash) - if err != nil { - return "", err - } - if err := w.bw.Flush(); err != nil { - return "", err - } - - return tocDigest, nil -} - -func (w *Writer) closeGz() error { - if w.closed { - return errors.New("write on closed Writer") - } - if w.gz != nil { - if err := w.gz.Close(); err != nil { - return err - } - w.gz = nil - } - return nil -} - -func (w *Writer) flushGz() error { - if w.closed { - return errors.New("flush on closed Writer") - } - if w.gz != nil { - if f, ok := w.gz.(interface { - Flush() error - }); ok { - return f.Flush() - } - } - return nil -} - -// nameIfChanged returns name, unless it was the already the value of (*mp)[id], -// in which case it returns the empty string. -func (w *Writer) nameIfChanged(mp *map[int]string, id int, name string) string { - if name == "" { - return "" - } - if *mp == nil { - *mp = make(map[int]string) - } - if (*mp)[id] == name { - return "" - } - (*mp)[id] = name - return name -} - -func (w *Writer) condOpenGz() (err error) { - if w.gz == nil { - w.gz, err = w.compressor.Writer(w.cw) - if w.gz != nil { - w.gz = w.uncompressedCounter.register(w.gz) - } - } - return -} - -// AppendTar reads the tar or tar.gz file from r and appends -// each of its contents to w. -// -// The input r can optionally be gzip compressed but the output will -// always be compressed by the specified compressor. -func (w *Writer) AppendTar(r io.Reader) error { - return w.appendTar(r, false) -} - -// AppendTarLossLess reads the tar or tar.gz file from r and appends -// each of its contents to w. -// -// The input r can optionally be gzip compressed but the output will -// always be compressed by the specified compressor. -// -// The difference of this func with AppendTar is that this writes -// the input tar stream into w without any modification (e.g. to header bytes). -// -// Note that if the input tar stream already contains TOC JSON, this returns -// error because w cannot overwrite the TOC JSON to the one generated by w without -// lossy modification. To avoid this error, if the input stream is known to be stargz/estargz, -// you shoud decompress it and remove TOC JSON in advance. -func (w *Writer) AppendTarLossLess(r io.Reader) error { - return w.appendTar(r, true) -} - -func (w *Writer) appendTar(r io.Reader, lossless bool) error { - var src io.Reader - br := bufio.NewReader(r) - if isGzip(br) { - zr, _ := gzip.NewReader(br) - src = zr - } else { - src = io.Reader(br) - } - dst := currentCompressionWriter{w} - var tw *tar.Writer - if !lossless { - tw = tar.NewWriter(dst) // use tar writer only when this isn't lossless mode. - } - tr := tar.NewReader(src) - if lossless { - tr.RawAccounting = true - } - prevOffset := w.cw.n - var prevOffsetUncompressed int64 - for { - h, err := tr.Next() - if err == io.EOF { - if lossless { - if remain := tr.RawBytes(); len(remain) > 0 { - // Collect the remaining null bytes. - // https://github.com/vbatts/tar-split/blob/80a436fd6164c557b131f7c59ed69bd81af69761/concept/main.go#L49-L53 - if _, err := dst.Write(remain); err != nil { - return err - } - } - } - break - } - if err != nil { - return fmt.Errorf("error reading from source tar: tar.Reader.Next: %v", err) - } - if cleanEntryName(h.Name) == TOCTarName { - // It is possible for a layer to be "stargzified" twice during the - // distribution lifecycle. So we reserve "TOCTarName" here to avoid - // duplicated entries in the resulting layer. - if lossless { - // We cannot handle this in lossless way. - return fmt.Errorf("existing TOC JSON is not allowed; decompress layer before append") - } - continue - } - - xattrs := make(map[string][]byte) - const xattrPAXRecordsPrefix = "SCHILY.xattr." - if h.PAXRecords != nil { - for k, v := range h.PAXRecords { - if strings.HasPrefix(k, xattrPAXRecordsPrefix) { - xattrs[k[len(xattrPAXRecordsPrefix):]] = []byte(v) - } - } - } - ent := &TOCEntry{ - Name: h.Name, - Mode: h.Mode, - UID: h.Uid, - GID: h.Gid, - Uname: w.nameIfChanged(&w.lastUsername, h.Uid, h.Uname), - Gname: w.nameIfChanged(&w.lastGroupname, h.Gid, h.Gname), - ModTime3339: formatModtime(h.ModTime), - Xattrs: xattrs, - } - if err := w.condOpenGz(); err != nil { - return err - } - if tw != nil { - if err := tw.WriteHeader(h); err != nil { - return err - } - } else { - if _, err := dst.Write(tr.RawBytes()); err != nil { - return err - } - } - switch h.Typeflag { - case tar.TypeLink: - ent.Type = "hardlink" - ent.LinkName = h.Linkname - case tar.TypeSymlink: - ent.Type = "symlink" - ent.LinkName = h.Linkname - case tar.TypeDir: - ent.Type = "dir" - case tar.TypeReg: - ent.Type = "reg" - ent.Size = h.Size - case tar.TypeChar: - ent.Type = "char" - ent.DevMajor = int(h.Devmajor) - ent.DevMinor = int(h.Devminor) - case tar.TypeBlock: - ent.Type = "block" - ent.DevMajor = int(h.Devmajor) - ent.DevMinor = int(h.Devminor) - case tar.TypeFifo: - ent.Type = "fifo" - default: - return fmt.Errorf("unsupported input tar entry %q", h.Typeflag) - } - - // We need to keep a reference to the TOC entry for regular files, so that we - // can fill the digest later. - var regFileEntry *TOCEntry - var payloadDigest digest.Digester - if h.Typeflag == tar.TypeReg { - regFileEntry = ent - payloadDigest = digest.Canonical.Digester() - } - - if h.Typeflag == tar.TypeReg && ent.Size > 0 { - var written int64 - totalSize := ent.Size // save it before we destroy ent - tee := io.TeeReader(tr, payloadDigest.Hash()) - for written < totalSize { - chunkSize := int64(w.chunkSize()) - remain := totalSize - written - if remain < chunkSize { - chunkSize = remain - } else { - ent.ChunkSize = chunkSize - } - - // We flush the underlying compression writer here to correctly calculate "w.cw.n". - if err := w.flushGz(); err != nil { - return err - } - if w.needsOpenGz(ent) || w.cw.n-prevOffset >= int64(w.MinChunkSize) { - if err := w.closeGz(); err != nil { - return err - } - ent.Offset = w.cw.n - prevOffset = ent.Offset - prevOffsetUncompressed = w.uncompressedCounter.n - } else { - ent.Offset = prevOffset - ent.InnerOffset = w.uncompressedCounter.n - prevOffsetUncompressed - } - - ent.ChunkOffset = written - chunkDigest := digest.Canonical.Digester() - - if err := w.condOpenGz(); err != nil { - return err - } - - teeChunk := io.TeeReader(tee, chunkDigest.Hash()) - var out io.Writer - if tw != nil { - out = tw - } else { - out = dst - } - if _, err := io.CopyN(out, teeChunk, chunkSize); err != nil { - return fmt.Errorf("error copying %q: %v", h.Name, err) - } - ent.ChunkDigest = chunkDigest.Digest().String() - w.toc.Entries = append(w.toc.Entries, ent) - written += chunkSize - ent = &TOCEntry{ - Name: h.Name, - Type: "chunk", - } - } - } else { - w.toc.Entries = append(w.toc.Entries, ent) - } - if payloadDigest != nil { - regFileEntry.Digest = payloadDigest.Digest().String() - } - if tw != nil { - if err := tw.Flush(); err != nil { - return err - } - } - } - remainDest := io.Discard - if lossless { - remainDest = dst // Preserve the remaining bytes in lossless mode - } - _, err := io.Copy(remainDest, src) - return err -} - -func (w *Writer) needsOpenGz(ent *TOCEntry) bool { - if ent.Type != "reg" { - return false - } - if w.needsOpenGzEntries == nil { - return false - } - _, ok := w.needsOpenGzEntries[ent.Name] - return ok -} - -// DiffID returns the SHA-256 of the uncompressed tar bytes. -// It is only valid to call DiffID after Close. -func (w *Writer) DiffID() string { - return fmt.Sprintf("sha256:%x", w.diffHash.Sum(nil)) -} - -func maxFooterSize(blobSize int64, decompressors ...Decompressor) (res int64) { - for _, d := range decompressors { - if s := d.FooterSize(); res < s && s <= blobSize { - res = s - } - } - return -} - -func parseTOC(d Decompressor, sr *io.SectionReader, tocOff, tocSize int64, tocBytes []byte, opts openOpts) (*Reader, error) { - if tocOff < 0 { - // This means that TOC isn't contained in the blob. - // We pass nil reader to ParseTOC and expect that ParseTOC acquire TOC from - // the external location. - start := time.Now() - toc, tocDgst, err := d.ParseTOC(nil) - if err != nil { - return nil, err - } - if opts.telemetry != nil && opts.telemetry.GetTocLatency != nil { - opts.telemetry.GetTocLatency(start) - } - if opts.telemetry != nil && opts.telemetry.DeserializeTocLatency != nil { - opts.telemetry.DeserializeTocLatency(start) - } - return &Reader{ - sr: sr, - toc: toc, - tocDigest: tocDgst, - decompressor: d, - }, nil - } - if len(tocBytes) > 0 { - start := time.Now() - toc, tocDgst, err := d.ParseTOC(bytes.NewReader(tocBytes)) - if err == nil { - if opts.telemetry != nil && opts.telemetry.DeserializeTocLatency != nil { - opts.telemetry.DeserializeTocLatency(start) - } - return &Reader{ - sr: sr, - toc: toc, - tocDigest: tocDgst, - decompressor: d, - }, nil - } - } - - start := time.Now() - tocBytes = make([]byte, tocSize) - if _, err := sr.ReadAt(tocBytes, tocOff); err != nil { - return nil, fmt.Errorf("error reading %d byte TOC targz: %v", len(tocBytes), err) - } - if opts.telemetry != nil && opts.telemetry.GetTocLatency != nil { - opts.telemetry.GetTocLatency(start) - } - start = time.Now() - toc, tocDgst, err := d.ParseTOC(bytes.NewReader(tocBytes)) - if err != nil { - return nil, err - } - if opts.telemetry != nil && opts.telemetry.DeserializeTocLatency != nil { - opts.telemetry.DeserializeTocLatency(start) - } - return &Reader{ - sr: sr, - toc: toc, - tocDigest: tocDgst, - decompressor: d, - }, nil -} - -func formatModtime(t time.Time) string { - if t.IsZero() || t.Unix() == 0 { - return "" - } - return t.UTC().Round(time.Second).Format(time.RFC3339) -} - -func cleanEntryName(name string) string { - // Use path.Clean to consistently deal with path separators across platforms. - return strings.TrimPrefix(path.Clean("/"+name), "/") -} - -// countWriter counts how many bytes have been written to its wrapped -// io.Writer. -type countWriter struct { - w io.Writer - n int64 -} - -func (cw *countWriter) Write(p []byte) (n int, err error) { - n, err = cw.w.Write(p) - cw.n += int64(n) - return -} - -type countWriteFlusher struct { - io.WriteCloser - n int64 -} - -func (wc *countWriteFlusher) register(w io.WriteCloser) io.WriteCloser { - wc.WriteCloser = w - return wc -} - -func (wc *countWriteFlusher) Write(p []byte) (n int, err error) { - n, err = wc.WriteCloser.Write(p) - wc.n += int64(n) - return -} - -func (wc *countWriteFlusher) Flush() error { - if f, ok := wc.WriteCloser.(interface { - Flush() error - }); ok { - return f.Flush() - } - return nil -} - -func (wc *countWriteFlusher) Close() error { - err := wc.WriteCloser.Close() - wc.WriteCloser = nil - return err -} - -// isGzip reports whether br is positioned right before an upcoming gzip stream. -// It does not consume any bytes from br. -func isGzip(br *bufio.Reader) bool { - const ( - gzipID1 = 0x1f - gzipID2 = 0x8b - gzipDeflate = 8 - ) - peek, _ := br.Peek(3) - return len(peek) >= 3 && peek[0] == gzipID1 && peek[1] == gzipID2 && peek[2] == gzipDeflate -} - -func positive(n int64) int64 { - if n < 0 { - return 0 - } - return n -} - -type countReader struct { - r io.Reader - n int64 -} - -func (cr *countReader) Read(p []byte) (n int, err error) { - n, err = cr.r.Read(p) - cr.n += int64(n) - return -} diff --git a/vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.go b/vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.go deleted file mode 100644 index f24afe32..00000000 --- a/vendor/github.com/containerd/stargz-snapshotter/estargz/gzip.go +++ /dev/null @@ -1,237 +0,0 @@ -/* - Copyright The containerd 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. -*/ - -/* - Copyright 2019 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 estargz - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "encoding/binary" - "encoding/json" - "fmt" - "hash" - "io" - "strconv" - - digest "github.com/opencontainers/go-digest" -) - -type gzipCompression struct { - *GzipCompressor - *GzipDecompressor -} - -func newGzipCompressionWithLevel(level int) Compression { - return &gzipCompression{ - &GzipCompressor{level}, - &GzipDecompressor{}, - } -} - -func NewGzipCompressor() *GzipCompressor { - return &GzipCompressor{gzip.BestCompression} -} - -func NewGzipCompressorWithLevel(level int) *GzipCompressor { - return &GzipCompressor{level} -} - -type GzipCompressor struct { - compressionLevel int -} - -func (gc *GzipCompressor) Writer(w io.Writer) (WriteFlushCloser, error) { - return gzip.NewWriterLevel(w, gc.compressionLevel) -} - -func (gc *GzipCompressor) WriteTOCAndFooter(w io.Writer, off int64, toc *JTOC, diffHash hash.Hash) (digest.Digest, error) { - tocJSON, err := json.MarshalIndent(toc, "", "\t") - if err != nil { - return "", err - } - gz, _ := gzip.NewWriterLevel(w, gc.compressionLevel) - gw := io.Writer(gz) - if diffHash != nil { - gw = io.MultiWriter(gz, diffHash) - } - tw := tar.NewWriter(gw) - if err := tw.WriteHeader(&tar.Header{ - Typeflag: tar.TypeReg, - Name: TOCTarName, - Size: int64(len(tocJSON)), - }); err != nil { - return "", err - } - if _, err := tw.Write(tocJSON); err != nil { - return "", err - } - - if err := tw.Close(); err != nil { - return "", err - } - if err := gz.Close(); err != nil { - return "", err - } - if _, err := w.Write(gzipFooterBytes(off)); err != nil { - return "", err - } - return digest.FromBytes(tocJSON), nil -} - -// gzipFooterBytes returns the 51 bytes footer. -func gzipFooterBytes(tocOff int64) []byte { - buf := bytes.NewBuffer(make([]byte, 0, FooterSize)) - gz, _ := gzip.NewWriterLevel(buf, gzip.NoCompression) // MUST be NoCompression to keep 51 bytes - - // Extra header indicating the offset of TOCJSON - // https://tools.ietf.org/html/rfc1952#section-2.3.1.1 - header := make([]byte, 4) - header[0], header[1] = 'S', 'G' - subfield := fmt.Sprintf("%016xSTARGZ", tocOff) - binary.LittleEndian.PutUint16(header[2:4], uint16(len(subfield))) // little-endian per RFC1952 - gz.Header.Extra = append(header, []byte(subfield)...) - gz.Close() - if buf.Len() != FooterSize { - panic(fmt.Sprintf("footer buffer = %d, not %d", buf.Len(), FooterSize)) - } - return buf.Bytes() -} - -type GzipDecompressor struct{} - -func (gz *GzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error) { - return gzip.NewReader(r) -} - -func (gz *GzipDecompressor) ParseTOC(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error) { - return parseTOCEStargz(r) -} - -func (gz *GzipDecompressor) ParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error) { - if len(p) != FooterSize { - return 0, 0, 0, fmt.Errorf("invalid length %d cannot be parsed", len(p)) - } - zr, err := gzip.NewReader(bytes.NewReader(p)) - if err != nil { - return 0, 0, 0, err - } - defer zr.Close() - extra := zr.Header.Extra - si1, si2, subfieldlen, subfield := extra[0], extra[1], extra[2:4], extra[4:] - if si1 != 'S' || si2 != 'G' { - return 0, 0, 0, fmt.Errorf("invalid subfield IDs: %q, %q; want E, S", si1, si2) - } - if slen := binary.LittleEndian.Uint16(subfieldlen); slen != uint16(16+len("STARGZ")) { - return 0, 0, 0, fmt.Errorf("invalid length of subfield %d; want %d", slen, 16+len("STARGZ")) - } - if string(subfield[16:]) != "STARGZ" { - return 0, 0, 0, fmt.Errorf("STARGZ magic string must be included in the footer subfield") - } - tocOffset, err = strconv.ParseInt(string(subfield[:16]), 16, 64) - if err != nil { - return 0, 0, 0, fmt.Errorf("legacy: failed to parse toc offset: %w", err) - } - return tocOffset, tocOffset, 0, nil -} - -func (gz *GzipDecompressor) FooterSize() int64 { - return FooterSize -} - -func (gz *GzipDecompressor) DecompressTOC(r io.Reader) (tocJSON io.ReadCloser, err error) { - return decompressTOCEStargz(r) -} - -type LegacyGzipDecompressor struct{} - -func (gz *LegacyGzipDecompressor) Reader(r io.Reader) (io.ReadCloser, error) { - return gzip.NewReader(r) -} - -func (gz *LegacyGzipDecompressor) ParseTOC(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error) { - return parseTOCEStargz(r) -} - -func (gz *LegacyGzipDecompressor) ParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error) { - if len(p) != legacyFooterSize { - return 0, 0, 0, fmt.Errorf("legacy: invalid length %d cannot be parsed", len(p)) - } - zr, err := gzip.NewReader(bytes.NewReader(p)) - if err != nil { - return 0, 0, 0, fmt.Errorf("legacy: failed to get footer gzip reader: %w", err) - } - defer zr.Close() - extra := zr.Header.Extra - if len(extra) != 16+len("STARGZ") { - return 0, 0, 0, fmt.Errorf("legacy: invalid stargz's extra field size") - } - if string(extra[16:]) != "STARGZ" { - return 0, 0, 0, fmt.Errorf("legacy: magic string STARGZ not found") - } - tocOffset, err = strconv.ParseInt(string(extra[:16]), 16, 64) - if err != nil { - return 0, 0, 0, fmt.Errorf("legacy: failed to parse toc offset: %w", err) - } - return tocOffset, tocOffset, 0, nil -} - -func (gz *LegacyGzipDecompressor) FooterSize() int64 { - return legacyFooterSize -} - -func (gz *LegacyGzipDecompressor) DecompressTOC(r io.Reader) (tocJSON io.ReadCloser, err error) { - return decompressTOCEStargz(r) -} - -func parseTOCEStargz(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error) { - tr, err := decompressTOCEStargz(r) - if err != nil { - return nil, "", err - } - dgstr := digest.Canonical.Digester() - toc = new(JTOC) - if err := json.NewDecoder(io.TeeReader(tr, dgstr.Hash())).Decode(&toc); err != nil { - return nil, "", fmt.Errorf("error decoding TOC JSON: %v", err) - } - if err := tr.Close(); err != nil { - return nil, "", err - } - return toc, dgstr.Digest(), nil -} - -func decompressTOCEStargz(r io.Reader) (tocJSON io.ReadCloser, err error) { - zr, err := gzip.NewReader(r) - if err != nil { - return nil, fmt.Errorf("malformed TOC gzip header: %v", err) - } - zr.Multistream(false) - tr := tar.NewReader(zr) - h, err := tr.Next() - if err != nil { - return nil, fmt.Errorf("failed to find tar header in TOC gzip stream: %v", err) - } - if h.Name != TOCTarName { - return nil, fmt.Errorf("TOC tar entry had name %q; expected %q", h.Name, TOCTarName) - } - return readCloser{tr, zr.Close}, nil -} diff --git a/vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go b/vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go deleted file mode 100644 index 0ca6fd75..00000000 --- a/vendor/github.com/containerd/stargz-snapshotter/estargz/testutil.go +++ /dev/null @@ -1,2366 +0,0 @@ -/* - Copyright The containerd 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. -*/ - -/* - Copyright 2019 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 estargz - -import ( - "archive/tar" - "bytes" - "compress/gzip" - "crypto/sha256" - "encoding/json" - "errors" - "fmt" - "io" - "math/rand" - "os" - "path/filepath" - "reflect" - "sort" - "strings" - "testing" - "time" - - "github.com/containerd/stargz-snapshotter/estargz/errorutil" - "github.com/klauspost/compress/zstd" - digest "github.com/opencontainers/go-digest" -) - -func init() { - rand.Seed(time.Now().UnixNano()) -} - -// TestingController is Compression with some helper methods necessary for testing. -type TestingController interface { - Compression - TestStreams(t *testing.T, b []byte, streams []int64) - DiffIDOf(*testing.T, []byte) string - String() string -} - -// CompressionTestSuite tests this pkg with controllers can build valid eStargz blobs and parse them. -func CompressionTestSuite(t *testing.T, controllers ...TestingControllerFactory) { - t.Run("testBuild", func(t *testing.T) { t.Parallel(); testBuild(t, controllers...) }) - t.Run("testDigestAndVerify", func(t *testing.T) { t.Parallel(); testDigestAndVerify(t, controllers...) }) - t.Run("testWriteAndOpen", func(t *testing.T) { t.Parallel(); testWriteAndOpen(t, controllers...) }) -} - -type TestingControllerFactory func() TestingController - -const ( - uncompressedType int = iota - gzipType - zstdType -) - -var srcCompressions = []int{ - uncompressedType, - gzipType, - zstdType, -} - -var allowedPrefix = [4]string{"", "./", "/", "../"} - -// testBuild tests the resulting stargz blob built by this pkg has the same -// contents as the normal stargz blob. -func testBuild(t *testing.T, controllers ...TestingControllerFactory) { - tests := []struct { - name string - chunkSize int - minChunkSize []int - in []tarEntry - }{ - { - name: "regfiles and directories", - chunkSize: 4, - in: tarOf( - file("foo", "test1"), - dir("foo2/"), - file("foo2/bar", "test2", xAttr(map[string]string{"test": "sample"})), - ), - }, - { - name: "empty files", - chunkSize: 4, - in: tarOf( - file("foo", "tttttt"), - file("foo_empty", ""), - file("foo2", "tttttt"), - file("foo_empty2", ""), - file("foo3", "tttttt"), - file("foo_empty3", ""), - file("foo4", "tttttt"), - file("foo_empty4", ""), - file("foo5", "tttttt"), - file("foo_empty5", ""), - file("foo6", "tttttt"), - ), - }, - { - name: "various files", - chunkSize: 4, - minChunkSize: []int{0, 64000}, - in: tarOf( - file("baz.txt", "bazbazbazbazbazbazbaz"), - file("foo1.txt", "a"), - file("bar/foo2.txt", "b"), - file("foo3.txt", "c"), - symlink("barlink", "test/bar.txt"), - dir("test/"), - dir("dev/"), - blockdev("dev/testblock", 3, 4), - fifo("dev/testfifo"), - chardev("dev/testchar1", 5, 6), - file("test/bar.txt", "testbartestbar", xAttr(map[string]string{"test2": "sample2"})), - dir("test2/"), - link("test2/bazlink", "baz.txt"), - chardev("dev/testchar2", 1, 2), - ), - }, - { - name: "no contents", - chunkSize: 4, - in: tarOf( - file("baz.txt", ""), - symlink("barlink", "test/bar.txt"), - dir("test/"), - dir("dev/"), - blockdev("dev/testblock", 3, 4), - fifo("dev/testfifo"), - chardev("dev/testchar1", 5, 6), - file("test/bar.txt", "", xAttr(map[string]string{"test2": "sample2"})), - dir("test2/"), - link("test2/bazlink", "baz.txt"), - chardev("dev/testchar2", 1, 2), - ), - }, - } - for _, tt := range tests { - if len(tt.minChunkSize) == 0 { - tt.minChunkSize = []int{0} - } - for _, srcCompression := range srcCompressions { - srcCompression := srcCompression - for _, newCL := range controllers { - newCL := newCL - for _, srcTarFormat := range []tar.Format{tar.FormatUSTAR, tar.FormatPAX, tar.FormatGNU} { - srcTarFormat := srcTarFormat - for _, prefix := range allowedPrefix { - prefix := prefix - for _, minChunkSize := range tt.minChunkSize { - minChunkSize := minChunkSize - t.Run(tt.name+"-"+fmt.Sprintf("compression=%v,prefix=%q,src=%d,format=%s,minChunkSize=%d", newCL(), prefix, srcCompression, srcTarFormat, minChunkSize), func(t *testing.T) { - tarBlob := buildTar(t, tt.in, prefix, srcTarFormat) - // Test divideEntries() - entries, err := sortEntries(tarBlob, nil, nil) // identical order - if err != nil { - t.Fatalf("failed to parse tar: %v", err) - } - var merged []*entry - for _, part := range divideEntries(entries, 4) { - merged = append(merged, part...) - } - if !reflect.DeepEqual(entries, merged) { - for _, e := range entries { - t.Logf("Original: %v", e.header) - } - for _, e := range merged { - t.Logf("Merged: %v", e.header) - } - t.Errorf("divided entries couldn't be merged") - return - } - - // Prepare sample data - cl1 := newCL() - wantBuf := new(bytes.Buffer) - sw := NewWriterWithCompressor(wantBuf, cl1) - sw.MinChunkSize = minChunkSize - sw.ChunkSize = tt.chunkSize - if err := sw.AppendTar(tarBlob); err != nil { - t.Fatalf("failed to append tar to want stargz: %v", err) - } - if _, err := sw.Close(); err != nil { - t.Fatalf("failed to prepare want stargz: %v", err) - } - wantData := wantBuf.Bytes() - want, err := Open(io.NewSectionReader( - bytes.NewReader(wantData), 0, int64(len(wantData))), - WithDecompressors(cl1), - ) - if err != nil { - t.Fatalf("failed to parse the want stargz: %v", err) - } - - // Prepare testing data - var opts []Option - if minChunkSize > 0 { - opts = append(opts, WithMinChunkSize(minChunkSize)) - } - cl2 := newCL() - rc, err := Build(compressBlob(t, tarBlob, srcCompression), - append(opts, WithChunkSize(tt.chunkSize), WithCompression(cl2))...) - if err != nil { - t.Fatalf("failed to build stargz: %v", err) - } - defer rc.Close() - gotBuf := new(bytes.Buffer) - if _, err := io.Copy(gotBuf, rc); err != nil { - t.Fatalf("failed to copy built stargz blob: %v", err) - } - gotData := gotBuf.Bytes() - got, err := Open(io.NewSectionReader( - bytes.NewReader(gotBuf.Bytes()), 0, int64(len(gotData))), - WithDecompressors(cl2), - ) - if err != nil { - t.Fatalf("failed to parse the got stargz: %v", err) - } - - // Check DiffID is properly calculated - rc.Close() - diffID := rc.DiffID() - wantDiffID := cl2.DiffIDOf(t, gotData) - if diffID.String() != wantDiffID { - t.Errorf("DiffID = %q; want %q", diffID, wantDiffID) - } - - // Compare as stargz - if !isSameVersion(t, cl1, wantData, cl2, gotData) { - t.Errorf("built stargz hasn't same json") - return - } - if !isSameEntries(t, want, got) { - t.Errorf("built stargz isn't same as the original") - return - } - - // Compare as tar.gz - if !isSameTarGz(t, cl1, wantData, cl2, gotData) { - t.Errorf("built stargz isn't same tar.gz") - return - } - }) - } - } - } - } - } - } -} - -func isSameTarGz(t *testing.T, cla TestingController, a []byte, clb TestingController, b []byte) bool { - aGz, err := cla.Reader(bytes.NewReader(a)) - if err != nil { - t.Fatalf("failed to read A") - } - defer aGz.Close() - bGz, err := clb.Reader(bytes.NewReader(b)) - if err != nil { - t.Fatalf("failed to read B") - } - defer bGz.Close() - - // Same as tar's Next() method but ignores landmarks and TOCJSON file - next := func(r *tar.Reader) (h *tar.Header, err error) { - for { - if h, err = r.Next(); err != nil { - return - } - if h.Name != PrefetchLandmark && - h.Name != NoPrefetchLandmark && - h.Name != TOCTarName { - return - } - } - } - - aTar := tar.NewReader(aGz) - bTar := tar.NewReader(bGz) - for { - // Fetch and parse next header. - aH, aErr := next(aTar) - bH, bErr := next(bTar) - if aErr != nil || bErr != nil { - if aErr == io.EOF && bErr == io.EOF { - break - } - t.Fatalf("Failed to parse tar file: A: %v, B: %v", aErr, bErr) - } - if !reflect.DeepEqual(aH, bH) { - t.Logf("different header (A = %v; B = %v)", aH, bH) - return false - - } - aFile, err := io.ReadAll(aTar) - if err != nil { - t.Fatal("failed to read tar payload of A") - } - bFile, err := io.ReadAll(bTar) - if err != nil { - t.Fatal("failed to read tar payload of B") - } - if !bytes.Equal(aFile, bFile) { - t.Logf("different tar payload (A = %q; B = %q)", string(a), string(b)) - return false - } - } - - return true -} - -func isSameVersion(t *testing.T, cla TestingController, a []byte, clb TestingController, b []byte) bool { - aJTOC, _, err := parseStargz(io.NewSectionReader(bytes.NewReader(a), 0, int64(len(a))), cla) - if err != nil { - t.Fatalf("failed to parse A: %v", err) - } - bJTOC, _, err := parseStargz(io.NewSectionReader(bytes.NewReader(b), 0, int64(len(b))), clb) - if err != nil { - t.Fatalf("failed to parse B: %v", err) - } - t.Logf("A: TOCJSON: %v", dumpTOCJSON(t, aJTOC)) - t.Logf("B: TOCJSON: %v", dumpTOCJSON(t, bJTOC)) - return aJTOC.Version == bJTOC.Version -} - -func isSameEntries(t *testing.T, a, b *Reader) bool { - aroot, ok := a.Lookup("") - if !ok { - t.Fatalf("failed to get root of A") - } - broot, ok := b.Lookup("") - if !ok { - t.Fatalf("failed to get root of B") - } - aEntry := stargzEntry{aroot, a} - bEntry := stargzEntry{broot, b} - return contains(t, aEntry, bEntry) && contains(t, bEntry, aEntry) -} - -func compressBlob(t *testing.T, src *io.SectionReader, srcCompression int) *io.SectionReader { - buf := new(bytes.Buffer) - var w io.WriteCloser - var err error - if srcCompression == gzipType { - w = gzip.NewWriter(buf) - } else if srcCompression == zstdType { - w, err = zstd.NewWriter(buf) - if err != nil { - t.Fatalf("failed to init zstd writer: %v", err) - } - } else { - return src - } - src.Seek(0, io.SeekStart) - if _, err := io.Copy(w, src); err != nil { - t.Fatalf("failed to compress source") - } - if err := w.Close(); err != nil { - t.Fatalf("failed to finalize compress source") - } - data := buf.Bytes() - return io.NewSectionReader(bytes.NewReader(data), 0, int64(len(data))) - -} - -type stargzEntry struct { - e *TOCEntry - r *Reader -} - -// contains checks if all child entries in "b" are also contained in "a". -// This function also checks if the files/chunks contain the same contents among "a" and "b". -func contains(t *testing.T, a, b stargzEntry) bool { - ae, ar := a.e, a.r - be, br := b.e, b.r - t.Logf("Comparing: %q vs %q", ae.Name, be.Name) - if !equalEntry(ae, be) { - t.Logf("%q != %q: entry: a: %v, b: %v", ae.Name, be.Name, ae, be) - return false - } - if ae.Type == "dir" { - t.Logf("Directory: %q vs %q: %v vs %v", ae.Name, be.Name, - allChildrenName(ae), allChildrenName(be)) - iscontain := true - ae.ForeachChild(func(aBaseName string, aChild *TOCEntry) bool { - // Walk through all files on this stargz file. - - if aChild.Name == PrefetchLandmark || - aChild.Name == NoPrefetchLandmark { - return true // Ignore landmarks - } - - // Ignore a TOCEntry of "./" (formated as "" by stargz lib) on root directory - // because this points to the root directory itself. - if aChild.Name == "" && ae.Name == "" { - return true - } - - bChild, ok := be.LookupChild(aBaseName) - if !ok { - t.Logf("%q (base: %q): not found in b: %v", - ae.Name, aBaseName, allChildrenName(be)) - iscontain = false - return false - } - - childcontain := contains(t, stargzEntry{aChild, a.r}, stargzEntry{bChild, b.r}) - if !childcontain { - t.Logf("%q != %q: non-equal dir", ae.Name, be.Name) - iscontain = false - return false - } - return true - }) - return iscontain - } else if ae.Type == "reg" { - af, err := ar.OpenFile(ae.Name) - if err != nil { - t.Fatalf("failed to open file %q on A: %v", ae.Name, err) - } - bf, err := br.OpenFile(be.Name) - if err != nil { - t.Fatalf("failed to open file %q on B: %v", be.Name, err) - } - - var nr int64 - for nr < ae.Size { - abytes, anext, aok := readOffset(t, af, nr, a) - bbytes, bnext, bok := readOffset(t, bf, nr, b) - if !aok && !bok { - break - } else if !(aok && bok) || anext != bnext { - t.Logf("%q != %q (offset=%d): chunk existence a=%v vs b=%v, anext=%v vs bnext=%v", - ae.Name, be.Name, nr, aok, bok, anext, bnext) - return false - } - nr = anext - if !bytes.Equal(abytes, bbytes) { - t.Logf("%q != %q: different contents %v vs %v", - ae.Name, be.Name, string(abytes), string(bbytes)) - return false - } - } - return true - } - - return true -} - -func allChildrenName(e *TOCEntry) (children []string) { - e.ForeachChild(func(baseName string, _ *TOCEntry) bool { - children = append(children, baseName) - return true - }) - return -} - -func equalEntry(a, b *TOCEntry) bool { - // Here, we selectively compare fileds that we are interested in. - return a.Name == b.Name && - a.Type == b.Type && - a.Size == b.Size && - a.ModTime3339 == b.ModTime3339 && - a.Stat().ModTime().Equal(b.Stat().ModTime()) && // modTime time.Time - a.LinkName == b.LinkName && - a.Mode == b.Mode && - a.UID == b.UID && - a.GID == b.GID && - a.Uname == b.Uname && - a.Gname == b.Gname && - (a.Offset >= 0) == (b.Offset >= 0) && - (a.NextOffset() > 0) == (b.NextOffset() > 0) && - a.DevMajor == b.DevMajor && - a.DevMinor == b.DevMinor && - a.NumLink == b.NumLink && - reflect.DeepEqual(a.Xattrs, b.Xattrs) && - // chunk-related infomations aren't compared in this function. - // ChunkOffset int64 `json:"chunkOffset,omitempty"` - // ChunkSize int64 `json:"chunkSize,omitempty"` - // children map[string]*TOCEntry - a.Digest == b.Digest -} - -func readOffset(t *testing.T, r *io.SectionReader, offset int64, e stargzEntry) ([]byte, int64, bool) { - ce, ok := e.r.ChunkEntryForOffset(e.e.Name, offset) - if !ok { - return nil, 0, false - } - data := make([]byte, ce.ChunkSize) - t.Logf("Offset: %v, NextOffset: %v", ce.Offset, ce.NextOffset()) - n, err := r.ReadAt(data, ce.ChunkOffset) - if err != nil { - t.Fatalf("failed to read file payload of %q (offset:%d,size:%d): %v", - e.e.Name, ce.ChunkOffset, ce.ChunkSize, err) - } - if int64(n) != ce.ChunkSize { - t.Fatalf("unexpected copied data size %d; want %d", - n, ce.ChunkSize) - } - return data[:n], offset + ce.ChunkSize, true -} - -func dumpTOCJSON(t *testing.T, tocJSON *JTOC) string { - jtocData, err := json.Marshal(*tocJSON) - if err != nil { - t.Fatalf("failed to marshal TOC JSON: %v", err) - } - buf := new(bytes.Buffer) - if _, err := io.Copy(buf, bytes.NewReader(jtocData)); err != nil { - t.Fatalf("failed to read toc json blob: %v", err) - } - return buf.String() -} - -const chunkSize = 3 - -// type check func(t *testing.T, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, compressionLevel int) -type check func(t *testing.T, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) - -// testDigestAndVerify runs specified checks against sample stargz blobs. -func testDigestAndVerify(t *testing.T, controllers ...TestingControllerFactory) { - tests := []struct { - name string - tarInit func(t *testing.T, dgstMap map[string]digest.Digest) (blob []tarEntry) - checks []check - minChunkSize []int - }{ - { - name: "no-regfile", - tarInit: func(t *testing.T, dgstMap map[string]digest.Digest) (blob []tarEntry) { - return tarOf( - dir("test/"), - ) - }, - checks: []check{ - checkStargzTOC, - checkVerifyTOC, - checkVerifyInvalidStargzFail(buildTar(t, tarOf( - dir("test2/"), // modified - ), allowedPrefix[0])), - }, - }, - { - name: "small-files", - tarInit: func(t *testing.T, dgstMap map[string]digest.Digest) (blob []tarEntry) { - return tarOf( - regDigest(t, "baz.txt", "", dgstMap), - regDigest(t, "foo.txt", "a", dgstMap), - dir("test/"), - regDigest(t, "test/bar.txt", "bbb", dgstMap), - ) - }, - minChunkSize: []int{0, 64000}, - checks: []check{ - checkStargzTOC, - checkVerifyTOC, - checkVerifyInvalidStargzFail(buildTar(t, tarOf( - file("baz.txt", ""), - file("foo.txt", "M"), // modified - dir("test/"), - file("test/bar.txt", "bbb"), - ), allowedPrefix[0])), - // checkVerifyInvalidTOCEntryFail("foo.txt"), // TODO - checkVerifyBrokenContentFail("foo.txt"), - }, - }, - { - name: "big-files", - tarInit: func(t *testing.T, dgstMap map[string]digest.Digest) (blob []tarEntry) { - return tarOf( - regDigest(t, "baz.txt", "bazbazbazbazbazbazbaz", dgstMap), - regDigest(t, "foo.txt", "a", dgstMap), - dir("test/"), - regDigest(t, "test/bar.txt", "testbartestbar", dgstMap), - ) - }, - checks: []check{ - checkStargzTOC, - checkVerifyTOC, - checkVerifyInvalidStargzFail(buildTar(t, tarOf( - file("baz.txt", "bazbazbazMMMbazbazbaz"), // modified - file("foo.txt", "a"), - dir("test/"), - file("test/bar.txt", "testbartestbar"), - ), allowedPrefix[0])), - checkVerifyInvalidTOCEntryFail("test/bar.txt"), - checkVerifyBrokenContentFail("test/bar.txt"), - }, - }, - { - name: "with-non-regfiles", - minChunkSize: []int{0, 64000}, - tarInit: func(t *testing.T, dgstMap map[string]digest.Digest) (blob []tarEntry) { - return tarOf( - regDigest(t, "baz.txt", "bazbazbazbazbazbazbaz", dgstMap), - regDigest(t, "foo.txt", "a", dgstMap), - regDigest(t, "bar/foo2.txt", "b", dgstMap), - regDigest(t, "foo3.txt", "c", dgstMap), - symlink("barlink", "test/bar.txt"), - dir("test/"), - regDigest(t, "test/bar.txt", "testbartestbar", dgstMap), - dir("test2/"), - link("test2/bazlink", "baz.txt"), - ) - }, - checks: []check{ - checkStargzTOC, - checkVerifyTOC, - checkVerifyInvalidStargzFail(buildTar(t, tarOf( - file("baz.txt", "bazbazbazbazbazbazbaz"), - file("foo.txt", "a"), - file("bar/foo2.txt", "b"), - file("foo3.txt", "c"), - symlink("barlink", "test/bar.txt"), - dir("test/"), - file("test/bar.txt", "testbartestbar"), - dir("test2/"), - link("test2/bazlink", "foo.txt"), // modified - ), allowedPrefix[0])), - checkVerifyInvalidTOCEntryFail("test/bar.txt"), - checkVerifyBrokenContentFail("test/bar.txt"), - }, - }, - } - - for _, tt := range tests { - if len(tt.minChunkSize) == 0 { - tt.minChunkSize = []int{0} - } - for _, srcCompression := range srcCompressions { - srcCompression := srcCompression - for _, newCL := range controllers { - newCL := newCL - for _, prefix := range allowedPrefix { - prefix := prefix - for _, srcTarFormat := range []tar.Format{tar.FormatUSTAR, tar.FormatPAX, tar.FormatGNU} { - srcTarFormat := srcTarFormat - for _, minChunkSize := range tt.minChunkSize { - minChunkSize := minChunkSize - t.Run(tt.name+"-"+fmt.Sprintf("compression=%v,prefix=%q,format=%s,minChunkSize=%d", newCL(), prefix, srcTarFormat, minChunkSize), func(t *testing.T) { - // Get original tar file and chunk digests - dgstMap := make(map[string]digest.Digest) - tarBlob := buildTar(t, tt.tarInit(t, dgstMap), prefix, srcTarFormat) - - cl := newCL() - rc, err := Build(compressBlob(t, tarBlob, srcCompression), - WithChunkSize(chunkSize), WithCompression(cl)) - if err != nil { - t.Fatalf("failed to convert stargz: %v", err) - } - tocDigest := rc.TOCDigest() - defer rc.Close() - buf := new(bytes.Buffer) - if _, err := io.Copy(buf, rc); err != nil { - t.Fatalf("failed to copy built stargz blob: %v", err) - } - newStargz := buf.Bytes() - // NoPrefetchLandmark is added during `Bulid`, which is expected behaviour. - dgstMap[chunkID(NoPrefetchLandmark, 0, int64(len([]byte{landmarkContents})))] = digest.FromBytes([]byte{landmarkContents}) - - for _, check := range tt.checks { - check(t, newStargz, tocDigest, dgstMap, cl, newCL) - } - }) - } - } - } - } - } - } -} - -// checkStargzTOC checks the TOC JSON of the passed stargz has the expected -// digest and contains valid chunks. It walks all entries in the stargz and -// checks all chunk digests stored to the TOC JSON match the actual contents. -func checkStargzTOC(t *testing.T, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) { - sgz, err := Open( - io.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))), - WithDecompressors(controller), - ) - if err != nil { - t.Errorf("failed to parse converted stargz: %v", err) - return - } - digestMapTOC, err := listDigests(io.NewSectionReader( - bytes.NewReader(sgzData), 0, int64(len(sgzData))), - controller, - ) - if err != nil { - t.Fatalf("failed to list digest: %v", err) - } - found := make(map[string]bool) - for id := range dgstMap { - found[id] = false - } - zr, err := controller.Reader(bytes.NewReader(sgzData)) - if err != nil { - t.Fatalf("failed to decompress converted stargz: %v", err) - } - defer zr.Close() - tr := tar.NewReader(zr) - for { - h, err := tr.Next() - if err != nil { - if err != io.EOF { - t.Errorf("failed to read tar entry: %v", err) - return - } - break - } - if h.Name == TOCTarName { - // Check the digest of TOC JSON based on the actual contents - // It's sure that TOC JSON exists in this archive because - // Open succeeded. - dgstr := digest.Canonical.Digester() - if _, err := io.Copy(dgstr.Hash(), tr); err != nil { - t.Fatalf("failed to calculate digest of TOC JSON: %v", - err) - } - if dgstr.Digest() != tocDigest { - t.Errorf("invalid TOC JSON %q; want %q", tocDigest, dgstr.Digest()) - } - continue - } - if _, ok := sgz.Lookup(h.Name); !ok { - t.Errorf("lost stargz entry %q in the converted TOC", h.Name) - return - } - var n int64 - for n < h.Size { - ce, ok := sgz.ChunkEntryForOffset(h.Name, n) - if !ok { - t.Errorf("lost chunk %q(offset=%d) in the converted TOC", - h.Name, n) - return - } - - // Get the original digest to make sure the file contents are kept unchanged - // from the original tar, during the whole conversion steps. - id := chunkID(h.Name, n, ce.ChunkSize) - want, ok := dgstMap[id] - if !ok { - t.Errorf("Unexpected chunk %q(offset=%d,size=%d): %v", - h.Name, n, ce.ChunkSize, dgstMap) - return - } - found[id] = true - - // Check the file contents - dgstr := digest.Canonical.Digester() - if _, err := io.CopyN(dgstr.Hash(), tr, ce.ChunkSize); err != nil { - t.Fatalf("failed to calculate digest of %q (offset=%d,size=%d)", - h.Name, n, ce.ChunkSize) - } - if want != dgstr.Digest() { - t.Errorf("Invalid contents in converted stargz %q: %q; want %q", - h.Name, dgstr.Digest(), want) - return - } - - // Check the digest stored in TOC JSON - dgstTOC, ok := digestMapTOC[ce.Offset] - if !ok { - t.Errorf("digest of %q(offset=%d,size=%d,chunkOffset=%d) isn't registered", - h.Name, ce.Offset, ce.ChunkSize, ce.ChunkOffset) - } - if want != dgstTOC { - t.Errorf("Invalid digest in TOCEntry %q: %q; want %q", - h.Name, dgstTOC, want) - return - } - - n += ce.ChunkSize - } - } - - for id, ok := range found { - if !ok { - t.Errorf("required chunk %q not found in the converted stargz: %v", id, found) - } - } -} - -// checkVerifyTOC checks the verification works for the TOC JSON of the passed -// stargz. It walks all entries in the stargz and checks the verifications for -// all chunks work. -func checkVerifyTOC(t *testing.T, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) { - sgz, err := Open( - io.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))), - WithDecompressors(controller), - ) - if err != nil { - t.Errorf("failed to parse converted stargz: %v", err) - return - } - ev, err := sgz.VerifyTOC(tocDigest) - if err != nil { - t.Errorf("failed to verify stargz: %v", err) - return - } - - found := make(map[string]bool) - for id := range dgstMap { - found[id] = false - } - zr, err := controller.Reader(bytes.NewReader(sgzData)) - if err != nil { - t.Fatalf("failed to decompress converted stargz: %v", err) - } - defer zr.Close() - tr := tar.NewReader(zr) - for { - h, err := tr.Next() - if err != nil { - if err != io.EOF { - t.Errorf("failed to read tar entry: %v", err) - return - } - break - } - if h.Name == TOCTarName { - continue - } - if _, ok := sgz.Lookup(h.Name); !ok { - t.Errorf("lost stargz entry %q in the converted TOC", h.Name) - return - } - var n int64 - for n < h.Size { - ce, ok := sgz.ChunkEntryForOffset(h.Name, n) - if !ok { - t.Errorf("lost chunk %q(offset=%d) in the converted TOC", - h.Name, n) - return - } - - v, err := ev.Verifier(ce) - if err != nil { - t.Errorf("failed to get verifier for %q(offset=%d)", h.Name, n) - } - - found[chunkID(h.Name, n, ce.ChunkSize)] = true - - // Check the file contents - if _, err := io.CopyN(v, tr, ce.ChunkSize); err != nil { - t.Fatalf("failed to get chunk of %q (offset=%d,size=%d)", - h.Name, n, ce.ChunkSize) - } - if !v.Verified() { - t.Errorf("Invalid contents in converted stargz %q (should be succeeded)", - h.Name) - return - } - n += ce.ChunkSize - } - } - - for id, ok := range found { - if !ok { - t.Errorf("required chunk %q not found in the converted stargz: %v", id, found) - } - } -} - -// checkVerifyInvalidTOCEntryFail checks if misconfigured TOC JSON can be -// detected during the verification and the verification returns an error. -func checkVerifyInvalidTOCEntryFail(filename string) check { - return func(t *testing.T, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) { - funcs := map[string]rewriteFunc{ - "lost digest in a entry": func(t *testing.T, toc *JTOC, sgz *io.SectionReader) { - var found bool - for _, e := range toc.Entries { - if cleanEntryName(e.Name) == filename { - if e.Type != "reg" && e.Type != "chunk" { - t.Fatalf("entry %q to break must be regfile or chunk", filename) - } - if e.ChunkDigest == "" { - t.Fatalf("entry %q is already invalid", filename) - } - e.ChunkDigest = "" - found = true - } - } - if !found { - t.Fatalf("rewrite target not found") - } - }, - "duplicated entry offset": func(t *testing.T, toc *JTOC, sgz *io.SectionReader) { - var ( - sampleEntry *TOCEntry - targetEntry *TOCEntry - ) - for _, e := range toc.Entries { - if e.Type == "reg" || e.Type == "chunk" { - if cleanEntryName(e.Name) == filename { - targetEntry = e - } else { - sampleEntry = e - } - } - } - if sampleEntry == nil { - t.Fatalf("TOC must contain at least one regfile or chunk entry other than the rewrite target") - } - if targetEntry == nil { - t.Fatalf("rewrite target not found") - } - targetEntry.Offset = sampleEntry.Offset - }, - } - - for name, rFunc := range funcs { - t.Run(name, func(t *testing.T) { - newSgz, newTocDigest := rewriteTOCJSON(t, io.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))), rFunc, controller) - buf := new(bytes.Buffer) - if _, err := io.Copy(buf, newSgz); err != nil { - t.Fatalf("failed to get converted stargz") - } - isgz := buf.Bytes() - - sgz, err := Open( - io.NewSectionReader(bytes.NewReader(isgz), 0, int64(len(isgz))), - WithDecompressors(controller), - ) - if err != nil { - t.Fatalf("failed to parse converted stargz: %v", err) - return - } - _, err = sgz.VerifyTOC(newTocDigest) - if err == nil { - t.Errorf("must fail for invalid TOC") - return - } - }) - } - } -} - -// checkVerifyInvalidStargzFail checks if the verification detects that the -// given stargz file doesn't match to the expected digest and returns error. -func checkVerifyInvalidStargzFail(invalid *io.SectionReader) check { - return func(t *testing.T, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) { - cl := newController() - rc, err := Build(invalid, WithChunkSize(chunkSize), WithCompression(cl)) - if err != nil { - t.Fatalf("failed to convert stargz: %v", err) - } - defer rc.Close() - buf := new(bytes.Buffer) - if _, err := io.Copy(buf, rc); err != nil { - t.Fatalf("failed to copy built stargz blob: %v", err) - } - mStargz := buf.Bytes() - - sgz, err := Open( - io.NewSectionReader(bytes.NewReader(mStargz), 0, int64(len(mStargz))), - WithDecompressors(cl), - ) - if err != nil { - t.Fatalf("failed to parse converted stargz: %v", err) - return - } - _, err = sgz.VerifyTOC(tocDigest) - if err == nil { - t.Errorf("must fail for invalid TOC") - return - } - } -} - -// checkVerifyBrokenContentFail checks if the verifier detects broken contents -// that doesn't match to the expected digest and returns error. -func checkVerifyBrokenContentFail(filename string) check { - return func(t *testing.T, sgzData []byte, tocDigest digest.Digest, dgstMap map[string]digest.Digest, controller TestingController, newController TestingControllerFactory) { - // Parse stargz file - sgz, err := Open( - io.NewSectionReader(bytes.NewReader(sgzData), 0, int64(len(sgzData))), - WithDecompressors(controller), - ) - if err != nil { - t.Fatalf("failed to parse converted stargz: %v", err) - return - } - ev, err := sgz.VerifyTOC(tocDigest) - if err != nil { - t.Fatalf("failed to verify stargz: %v", err) - return - } - - // Open the target file - sr, err := sgz.OpenFile(filename) - if err != nil { - t.Fatalf("failed to open file %q", filename) - } - ce, ok := sgz.ChunkEntryForOffset(filename, 0) - if !ok { - t.Fatalf("lost chunk %q(offset=%d) in the converted TOC", filename, 0) - return - } - if ce.ChunkSize == 0 { - t.Fatalf("file mustn't be empty") - return - } - data := make([]byte, ce.ChunkSize) - if _, err := sr.ReadAt(data, ce.ChunkOffset); err != nil { - t.Errorf("failed to get data of a chunk of %q(offset=%q)", - filename, ce.ChunkOffset) - } - - // Check the broken chunk (must fail) - v, err := ev.Verifier(ce) - if err != nil { - t.Fatalf("failed to get verifier for %q", filename) - } - broken := append([]byte{^data[0]}, data[1:]...) - if _, err := io.CopyN(v, bytes.NewReader(broken), ce.ChunkSize); err != nil { - t.Fatalf("failed to get chunk of %q (offset=%d,size=%d)", - filename, ce.ChunkOffset, ce.ChunkSize) - } - if v.Verified() { - t.Errorf("verification must fail for broken file chunk %q(org:%q,broken:%q)", - filename, data, broken) - } - } -} - -func chunkID(name string, offset, size int64) string { - return fmt.Sprintf("%s-%d-%d", cleanEntryName(name), offset, size) -} - -type rewriteFunc func(t *testing.T, toc *JTOC, sgz *io.SectionReader) - -func rewriteTOCJSON(t *testing.T, sgz *io.SectionReader, rewrite rewriteFunc, controller TestingController) (newSgz io.Reader, tocDigest digest.Digest) { - decodedJTOC, jtocOffset, err := parseStargz(sgz, controller) - if err != nil { - t.Fatalf("failed to extract TOC JSON: %v", err) - } - - rewrite(t, decodedJTOC, sgz) - - tocFooter, tocDigest, err := tocAndFooter(controller, decodedJTOC, jtocOffset) - if err != nil { - t.Fatalf("failed to create toc and footer: %v", err) - } - - // Reconstruct stargz file with the modified TOC JSON - if _, err := sgz.Seek(0, io.SeekStart); err != nil { - t.Fatalf("failed to reset the seek position of stargz: %v", err) - } - return io.MultiReader( - io.LimitReader(sgz, jtocOffset), // Original stargz (before TOC JSON) - tocFooter, // Rewritten TOC and footer - ), tocDigest -} - -func listDigests(sgz *io.SectionReader, controller TestingController) (map[int64]digest.Digest, error) { - decodedJTOC, _, err := parseStargz(sgz, controller) - if err != nil { - return nil, err - } - digestMap := make(map[int64]digest.Digest) - for _, e := range decodedJTOC.Entries { - if e.Type == "reg" || e.Type == "chunk" { - if e.Type == "reg" && e.Size == 0 { - continue // ignores empty file - } - if e.ChunkDigest == "" { - return nil, fmt.Errorf("ChunkDigest of %q(off=%d) not found in TOC JSON", - e.Name, e.Offset) - } - d, err := digest.Parse(e.ChunkDigest) - if err != nil { - return nil, err - } - digestMap[e.Offset] = d - } - } - return digestMap, nil -} - -func parseStargz(sgz *io.SectionReader, controller TestingController) (decodedJTOC *JTOC, jtocOffset int64, err error) { - fSize := controller.FooterSize() - footer := make([]byte, fSize) - if _, err := sgz.ReadAt(footer, sgz.Size()-fSize); err != nil { - return nil, 0, fmt.Errorf("error reading footer: %w", err) - } - _, tocOffset, _, err := controller.ParseFooter(footer[positive(int64(len(footer))-fSize):]) - if err != nil { - return nil, 0, fmt.Errorf("failed to parse footer: %w", err) - } - - // Decode the TOC JSON - var tocReader io.Reader - if tocOffset >= 0 { - tocReader = io.NewSectionReader(sgz, tocOffset, sgz.Size()-tocOffset-fSize) - } - decodedJTOC, _, err = controller.ParseTOC(tocReader) - if err != nil { - return nil, 0, fmt.Errorf("failed to parse TOC: %w", err) - } - return decodedJTOC, tocOffset, nil -} - -func testWriteAndOpen(t *testing.T, controllers ...TestingControllerFactory) { - const content = "Some contents" - invalidUtf8 := "\xff\xfe\xfd" - - xAttrFile := xAttr{"foo": "bar", "invalid-utf8": invalidUtf8} - sampleOwner := owner{uid: 50, gid: 100} - - data64KB := randomContents(64000) - - tests := []struct { - name string - chunkSize int - minChunkSize int - in []tarEntry - want []stargzCheck - wantNumGz int // expected number of streams - - wantNumGzLossLess int // expected number of streams (> 0) in lossless mode if it's different from wantNumGz - wantFailOnLossLess bool - wantTOCVersion int // default = 1 - }{ - { - name: "empty", - in: tarOf(), - wantNumGz: 2, // (empty tar) + TOC + footer - want: checks( - numTOCEntries(0), - ), - }, - { - name: "1dir_1empty_file", - in: tarOf( - dir("foo/"), - file("foo/bar.txt", ""), - ), - wantNumGz: 3, // dir, TOC, footer - want: checks( - numTOCEntries(2), - hasDir("foo/"), - hasFileLen("foo/bar.txt", 0), - entryHasChildren("foo", "bar.txt"), - hasFileDigest("foo/bar.txt", digestFor("")), - ), - }, - { - name: "1dir_1file", - in: tarOf( - dir("foo/"), - file("foo/bar.txt", content, xAttrFile), - ), - wantNumGz: 4, // var dir, foo.txt alone, TOC, footer - want: checks( - numTOCEntries(2), - hasDir("foo/"), - hasFileLen("foo/bar.txt", len(content)), - hasFileDigest("foo/bar.txt", digestFor(content)), - hasFileContentsRange("foo/bar.txt", 0, content), - hasFileContentsRange("foo/bar.txt", 1, content[1:]), - entryHasChildren("", "foo"), - entryHasChildren("foo", "bar.txt"), - hasFileXattrs("foo/bar.txt", "foo", "bar"), - hasFileXattrs("foo/bar.txt", "invalid-utf8", invalidUtf8), - ), - }, - { - name: "2meta_2file", - in: tarOf( - dir("bar/", sampleOwner), - dir("foo/", sampleOwner), - file("foo/bar.txt", content, sampleOwner), - ), - wantNumGz: 4, // both dirs, foo.txt alone, TOC, footer - want: checks( - numTOCEntries(3), - hasDir("bar/"), - hasDir("foo/"), - hasFileLen("foo/bar.txt", len(content)), - entryHasChildren("", "bar", "foo"), - entryHasChildren("foo", "bar.txt"), - hasChunkEntries("foo/bar.txt", 1), - hasEntryOwner("bar/", sampleOwner), - hasEntryOwner("foo/", sampleOwner), - hasEntryOwner("foo/bar.txt", sampleOwner), - ), - }, - { - name: "3dir", - in: tarOf( - dir("bar/"), - dir("foo/"), - dir("foo/bar/"), - ), - wantNumGz: 3, // 3 dirs, TOC, footer - want: checks( - hasDirLinkCount("bar/", 2), - hasDirLinkCount("foo/", 3), - hasDirLinkCount("foo/bar/", 2), - ), - }, - { - name: "symlink", - in: tarOf( - dir("foo/"), - symlink("foo/bar", "../../x"), - ), - wantNumGz: 3, // metas + TOC + footer - want: checks( - numTOCEntries(2), - hasSymlink("foo/bar", "../../x"), - entryHasChildren("", "foo"), - entryHasChildren("foo", "bar"), - ), - }, - { - name: "chunked_file", - chunkSize: 4, - in: tarOf( - dir("foo/"), - file("foo/big.txt", "This "+"is s"+"uch "+"a bi"+"g fi"+"le"), - ), - wantNumGz: 9, // dir + big.txt(6 chunks) + TOC + footer - want: checks( - numTOCEntries(7), // 1 for foo dir, 6 for the foo/big.txt file - hasDir("foo/"), - hasFileLen("foo/big.txt", len("This is such a big file")), - hasFileDigest("foo/big.txt", digestFor("This is such a big file")), - hasFileContentsRange("foo/big.txt", 0, "This is such a big file"), - hasFileContentsRange("foo/big.txt", 1, "his is such a big file"), - hasFileContentsRange("foo/big.txt", 2, "is is such a big file"), - hasFileContentsRange("foo/big.txt", 3, "s is such a big file"), - hasFileContentsRange("foo/big.txt", 4, " is such a big file"), - hasFileContentsRange("foo/big.txt", 5, "is such a big file"), - hasFileContentsRange("foo/big.txt", 6, "s such a big file"), - hasFileContentsRange("foo/big.txt", 7, " such a big file"), - hasFileContentsRange("foo/big.txt", 8, "such a big file"), - hasFileContentsRange("foo/big.txt", 9, "uch a big file"), - hasFileContentsRange("foo/big.txt", 10, "ch a big file"), - hasFileContentsRange("foo/big.txt", 11, "h a big file"), - hasFileContentsRange("foo/big.txt", 12, " a big file"), - hasFileContentsRange("foo/big.txt", len("This is such a big file")-1, ""), - hasChunkEntries("foo/big.txt", 6), - ), - }, - { - name: "recursive", - in: tarOf( - dir("/", sampleOwner), - dir("bar/", sampleOwner), - dir("foo/", sampleOwner), - file("foo/bar.txt", content, sampleOwner), - ), - wantNumGz: 4, // dirs, bar.txt alone, TOC, footer - want: checks( - maxDepth(2), // 0: root directory, 1: "foo/", 2: "bar.txt" - ), - }, - { - name: "block_char_fifo", - in: tarOf( - tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - return w.WriteHeader(&tar.Header{ - Name: prefix + "b", - Typeflag: tar.TypeBlock, - Devmajor: 123, - Devminor: 456, - Format: format, - }) - }), - tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - return w.WriteHeader(&tar.Header{ - Name: prefix + "c", - Typeflag: tar.TypeChar, - Devmajor: 111, - Devminor: 222, - Format: format, - }) - }), - tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - return w.WriteHeader(&tar.Header{ - Name: prefix + "f", - Typeflag: tar.TypeFifo, - Format: format, - }) - }), - ), - wantNumGz: 3, - want: checks( - lookupMatch("b", &TOCEntry{Name: "b", Type: "block", DevMajor: 123, DevMinor: 456, NumLink: 1}), - lookupMatch("c", &TOCEntry{Name: "c", Type: "char", DevMajor: 111, DevMinor: 222, NumLink: 1}), - lookupMatch("f", &TOCEntry{Name: "f", Type: "fifo", NumLink: 1}), - ), - }, - { - name: "modes", - in: tarOf( - dir("foo1/", 0755|os.ModeDir|os.ModeSetgid), - file("foo1/bar1", content, 0700|os.ModeSetuid), - file("foo1/bar2", content, 0755|os.ModeSetgid), - dir("foo2/", 0755|os.ModeDir|os.ModeSticky), - file("foo2/bar3", content, 0755|os.ModeSticky), - dir("foo3/", 0755|os.ModeDir), - file("foo3/bar4", content, os.FileMode(0700)), - file("foo3/bar5", content, os.FileMode(0755)), - ), - wantNumGz: 8, // dir, bar1 alone, bar2 alone + dir, bar3 alone + dir, bar4 alone, bar5 alone, TOC, footer - want: checks( - hasMode("foo1/", 0755|os.ModeDir|os.ModeSetgid), - hasMode("foo1/bar1", 0700|os.ModeSetuid), - hasMode("foo1/bar2", 0755|os.ModeSetgid), - hasMode("foo2/", 0755|os.ModeDir|os.ModeSticky), - hasMode("foo2/bar3", 0755|os.ModeSticky), - hasMode("foo3/", 0755|os.ModeDir), - hasMode("foo3/bar4", os.FileMode(0700)), - hasMode("foo3/bar5", os.FileMode(0755)), - ), - }, - { - name: "lossy", - in: tarOf( - dir("bar/", sampleOwner), - dir("foo/", sampleOwner), - file("foo/bar.txt", content, sampleOwner), - file(TOCTarName, "dummy"), // ignored by the writer. (lossless write returns error) - ), - wantNumGz: 4, // both dirs, foo.txt alone, TOC, footer - want: checks( - numTOCEntries(3), - hasDir("bar/"), - hasDir("foo/"), - hasFileLen("foo/bar.txt", len(content)), - entryHasChildren("", "bar", "foo"), - entryHasChildren("foo", "bar.txt"), - hasChunkEntries("foo/bar.txt", 1), - hasEntryOwner("bar/", sampleOwner), - hasEntryOwner("foo/", sampleOwner), - hasEntryOwner("foo/bar.txt", sampleOwner), - ), - wantFailOnLossLess: true, - }, - { - name: "hardlink should be replaced to the destination entry", - in: tarOf( - dir("foo/"), - file("foo/foo1", "test"), - link("foolink", "foo/foo1"), - ), - wantNumGz: 4, // dir, foo1 + link, TOC, footer - want: checks( - mustSameEntry("foo/foo1", "foolink"), - ), - }, - { - name: "several_files_in_chunk", - minChunkSize: 8000, - in: tarOf( - dir("foo/"), - file("foo/foo1", data64KB), - file("foo2", "bb"), - file("foo22", "ccc"), - dir("bar/"), - file("bar/bar.txt", "aaa"), - file("foo3", data64KB), - ), - // NOTE: we assume that the compressed "data64KB" is still larger than 8KB - wantNumGz: 4, // dir+foo1, foo2+foo22+dir+bar.txt+foo3, TOC, footer - want: checks( - numTOCEntries(7), // dir, foo1, foo2, foo22, dir, bar.txt, foo3 - hasDir("foo/"), - hasDir("bar/"), - hasFileLen("foo/foo1", len(data64KB)), - hasFileLen("foo2", len("bb")), - hasFileLen("foo22", len("ccc")), - hasFileLen("bar/bar.txt", len("aaa")), - hasFileLen("foo3", len(data64KB)), - hasFileDigest("foo/foo1", digestFor(data64KB)), - hasFileDigest("foo2", digestFor("bb")), - hasFileDigest("foo22", digestFor("ccc")), - hasFileDigest("bar/bar.txt", digestFor("aaa")), - hasFileDigest("foo3", digestFor(data64KB)), - hasFileContentsWithPreRead("foo22", 0, "ccc", chunkInfo{"foo2", "bb"}, chunkInfo{"bar/bar.txt", "aaa"}, chunkInfo{"foo3", data64KB}), - hasFileContentsRange("foo/foo1", 0, data64KB), - hasFileContentsRange("foo2", 0, "bb"), - hasFileContentsRange("foo2", 1, "b"), - hasFileContentsRange("foo22", 0, "ccc"), - hasFileContentsRange("foo22", 1, "cc"), - hasFileContentsRange("foo22", 2, "c"), - hasFileContentsRange("bar/bar.txt", 0, "aaa"), - hasFileContentsRange("bar/bar.txt", 1, "aa"), - hasFileContentsRange("bar/bar.txt", 2, "a"), - hasFileContentsRange("foo3", 0, data64KB), - hasFileContentsRange("foo3", 1, data64KB[1:]), - hasFileContentsRange("foo3", 2, data64KB[2:]), - hasFileContentsRange("foo3", len(data64KB)/2, data64KB[len(data64KB)/2:]), - hasFileContentsRange("foo3", len(data64KB)-1, data64KB[len(data64KB)-1:]), - ), - }, - { - name: "several_files_in_chunk_chunked", - minChunkSize: 8000, - chunkSize: 32000, - in: tarOf( - dir("foo/"), - file("foo/foo1", data64KB), - file("foo2", "bb"), - dir("bar/"), - file("foo3", data64KB), - ), - // NOTE: we assume that the compressed chunk of "data64KB" is still larger than 8KB - wantNumGz: 6, // dir+foo1(1), foo1(2), foo2+dir+foo3(1), foo3(2), TOC, footer - want: checks( - numTOCEntries(7), // dir, foo1(2 chunks), foo2, dir, foo3(2 chunks) - hasDir("foo/"), - hasDir("bar/"), - hasFileLen("foo/foo1", len(data64KB)), - hasFileLen("foo2", len("bb")), - hasFileLen("foo3", len(data64KB)), - hasFileDigest("foo/foo1", digestFor(data64KB)), - hasFileDigest("foo2", digestFor("bb")), - hasFileDigest("foo3", digestFor(data64KB)), - hasFileContentsWithPreRead("foo2", 0, "bb", chunkInfo{"foo3", data64KB[:32000]}), - hasFileContentsRange("foo/foo1", 0, data64KB), - hasFileContentsRange("foo/foo1", 1, data64KB[1:]), - hasFileContentsRange("foo/foo1", 2, data64KB[2:]), - hasFileContentsRange("foo/foo1", len(data64KB)/2, data64KB[len(data64KB)/2:]), - hasFileContentsRange("foo/foo1", len(data64KB)-1, data64KB[len(data64KB)-1:]), - hasFileContentsRange("foo2", 0, "bb"), - hasFileContentsRange("foo2", 1, "b"), - hasFileContentsRange("foo3", 0, data64KB), - hasFileContentsRange("foo3", 1, data64KB[1:]), - hasFileContentsRange("foo3", 2, data64KB[2:]), - hasFileContentsRange("foo3", len(data64KB)/2, data64KB[len(data64KB)/2:]), - hasFileContentsRange("foo3", len(data64KB)-1, data64KB[len(data64KB)-1:]), - ), - }, - } - - for _, tt := range tests { - for _, newCL := range controllers { - newCL := newCL - for _, prefix := range allowedPrefix { - prefix := prefix - for _, srcTarFormat := range []tar.Format{tar.FormatUSTAR, tar.FormatPAX, tar.FormatGNU} { - srcTarFormat := srcTarFormat - for _, lossless := range []bool{true, false} { - t.Run(tt.name+"-"+fmt.Sprintf("compression=%v,prefix=%q,lossless=%v,format=%s", newCL(), prefix, lossless, srcTarFormat), func(t *testing.T) { - var tr io.Reader = buildTar(t, tt.in, prefix, srcTarFormat) - origTarDgstr := digest.Canonical.Digester() - tr = io.TeeReader(tr, origTarDgstr.Hash()) - var stargzBuf bytes.Buffer - cl1 := newCL() - w := NewWriterWithCompressor(&stargzBuf, cl1) - w.ChunkSize = tt.chunkSize - w.MinChunkSize = tt.minChunkSize - if lossless { - err := w.AppendTarLossLess(tr) - if tt.wantFailOnLossLess { - if err != nil { - return // expected to fail - } - t.Fatalf("Append wanted to fail on lossless") - } - if err != nil { - t.Fatalf("Append(lossless): %v", err) - } - } else { - if err := w.AppendTar(tr); err != nil { - t.Fatalf("Append: %v", err) - } - } - if _, err := w.Close(); err != nil { - t.Fatalf("Writer.Close: %v", err) - } - b := stargzBuf.Bytes() - - if lossless { - // Check if the result blob reserves original tar metadata - rc, err := Unpack(io.NewSectionReader(bytes.NewReader(b), 0, int64(len(b))), cl1) - if err != nil { - t.Errorf("failed to decompress blob: %v", err) - return - } - defer rc.Close() - resultDgstr := digest.Canonical.Digester() - if _, err := io.Copy(resultDgstr.Hash(), rc); err != nil { - t.Errorf("failed to read result decompressed blob: %v", err) - return - } - if resultDgstr.Digest() != origTarDgstr.Digest() { - t.Errorf("lossy compression occurred: digest=%v; want %v", - resultDgstr.Digest(), origTarDgstr.Digest()) - return - } - } - - diffID := w.DiffID() - wantDiffID := cl1.DiffIDOf(t, b) - if diffID != wantDiffID { - t.Errorf("DiffID = %q; want %q", diffID, wantDiffID) - } - - telemetry, checkCalled := newCalledTelemetry() - sr := io.NewSectionReader(bytes.NewReader(b), 0, int64(len(b))) - r, err := Open( - sr, - WithDecompressors(cl1), - WithTelemetry(telemetry), - ) - if err != nil { - t.Fatalf("stargz.Open: %v", err) - } - wantTOCVersion := 1 - if tt.wantTOCVersion > 0 { - wantTOCVersion = tt.wantTOCVersion - } - if r.toc.Version != wantTOCVersion { - t.Fatalf("invalid TOC Version %d; wanted %d", r.toc.Version, wantTOCVersion) - } - - footerSize := cl1.FooterSize() - footerOffset := sr.Size() - footerSize - footer := make([]byte, footerSize) - if _, err := sr.ReadAt(footer, footerOffset); err != nil { - t.Errorf("failed to read footer: %v", err) - } - _, tocOffset, _, err := cl1.ParseFooter(footer) - if err != nil { - t.Errorf("failed to parse footer: %v", err) - } - if err := checkCalled(tocOffset >= 0); err != nil { - t.Errorf("telemetry failure: %v", err) - } - - wantNumGz := tt.wantNumGz - if lossless && tt.wantNumGzLossLess > 0 { - wantNumGz = tt.wantNumGzLossLess - } - streamOffsets := []int64{0} - prevOffset := int64(-1) - streams := 0 - for _, e := range r.toc.Entries { - if e.Offset > prevOffset { - streamOffsets = append(streamOffsets, e.Offset) - prevOffset = e.Offset - streams++ - } - } - streams++ // TOC - if tocOffset >= 0 { - // toc is in the blob - streamOffsets = append(streamOffsets, tocOffset) - } - streams++ // footer - streamOffsets = append(streamOffsets, footerOffset) - if streams != wantNumGz { - t.Errorf("number of streams in TOC = %d; want %d", streams, wantNumGz) - } - - t.Logf("testing streams: %+v", streamOffsets) - cl1.TestStreams(t, b, streamOffsets) - - for _, want := range tt.want { - want.check(t, r) - } - }) - } - } - } - } - } -} - -type chunkInfo struct { - name string - data string -} - -func newCalledTelemetry() (telemetry *Telemetry, check func(needsGetTOC bool) error) { - var getFooterLatencyCalled bool - var getTocLatencyCalled bool - var deserializeTocLatencyCalled bool - return &Telemetry{ - func(time.Time) { getFooterLatencyCalled = true }, - func(time.Time) { getTocLatencyCalled = true }, - func(time.Time) { deserializeTocLatencyCalled = true }, - }, func(needsGetTOC bool) error { - var allErr []error - if !getFooterLatencyCalled { - allErr = append(allErr, fmt.Errorf("metrics GetFooterLatency isn't called")) - } - if needsGetTOC { - if !getTocLatencyCalled { - allErr = append(allErr, fmt.Errorf("metrics GetTocLatency isn't called")) - } - } - if !deserializeTocLatencyCalled { - allErr = append(allErr, fmt.Errorf("metrics DeserializeTocLatency isn't called")) - } - return errorutil.Aggregate(allErr) - } -} - -func digestFor(content string) string { - sum := sha256.Sum256([]byte(content)) - return fmt.Sprintf("sha256:%x", sum) -} - -type numTOCEntries int - -func (n numTOCEntries) check(t *testing.T, r *Reader) { - if r.toc == nil { - t.Fatal("nil TOC") - } - if got, want := len(r.toc.Entries), int(n); got != want { - t.Errorf("got %d TOC entries; want %d", got, want) - } - t.Logf("got TOC entries:") - for i, ent := range r.toc.Entries { - entj, _ := json.Marshal(ent) - t.Logf(" [%d]: %s\n", i, entj) - } - if t.Failed() { - t.FailNow() - } -} - -func checks(s ...stargzCheck) []stargzCheck { return s } - -type stargzCheck interface { - check(t *testing.T, r *Reader) -} - -type stargzCheckFn func(*testing.T, *Reader) - -func (f stargzCheckFn) check(t *testing.T, r *Reader) { f(t, r) } - -func maxDepth(max int) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - e, ok := r.Lookup("") - if !ok { - t.Fatal("root directory not found") - } - d, err := getMaxDepth(t, e, 0, 10*max) - if err != nil { - t.Errorf("failed to get max depth (wanted %d): %v", max, err) - return - } - if d != max { - t.Errorf("invalid depth %d; want %d", d, max) - return - } - }) -} - -func getMaxDepth(t *testing.T, e *TOCEntry, current, limit int) (max int, rErr error) { - if current > limit { - return -1, fmt.Errorf("walkMaxDepth: exceeds limit: current:%d > limit:%d", - current, limit) - } - max = current - e.ForeachChild(func(baseName string, ent *TOCEntry) bool { - t.Logf("%q(basename:%q) is child of %q\n", ent.Name, baseName, e.Name) - d, err := getMaxDepth(t, ent, current+1, limit) - if err != nil { - rErr = err - return false - } - if d > max { - max = d - } - return true - }) - return -} - -func hasFileLen(file string, wantLen int) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - for _, ent := range r.toc.Entries { - if ent.Name == file { - if ent.Type != "reg" { - t.Errorf("file type of %q is %q; want \"reg\"", file, ent.Type) - } else if ent.Size != int64(wantLen) { - t.Errorf("file size of %q = %d; want %d", file, ent.Size, wantLen) - } - return - } - } - t.Errorf("file %q not found", file) - }) -} - -func hasFileXattrs(file, name, value string) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - for _, ent := range r.toc.Entries { - if ent.Name == file { - if ent.Type != "reg" { - t.Errorf("file type of %q is %q; want \"reg\"", file, ent.Type) - } - if ent.Xattrs == nil { - t.Errorf("file %q has no xattrs", file) - return - } - valueFound, found := ent.Xattrs[name] - if !found { - t.Errorf("file %q has no xattr %q", file, name) - return - } - if string(valueFound) != value { - t.Errorf("file %q has xattr %q with value %q instead of %q", file, name, valueFound, value) - } - - return - } - } - t.Errorf("file %q not found", file) - }) -} - -func hasFileDigest(file string, digest string) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - ent, ok := r.Lookup(file) - if !ok { - t.Fatalf("didn't find TOCEntry for file %q", file) - } - if ent.Digest != digest { - t.Fatalf("Digest(%q) = %q, want %q", file, ent.Digest, digest) - } - }) -} - -func hasFileContentsWithPreRead(file string, offset int, want string, extra ...chunkInfo) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - extraMap := make(map[string]chunkInfo) - for _, e := range extra { - extraMap[e.name] = e - } - var extraNames []string - for n := range extraMap { - extraNames = append(extraNames, n) - } - f, err := r.OpenFileWithPreReader(file, func(e *TOCEntry, cr io.Reader) error { - t.Logf("On %q: got preread of %q", file, e.Name) - ex, ok := extraMap[e.Name] - if !ok { - t.Fatalf("fail on %q: unexpected entry %q: %+v, %+v", file, e.Name, e, extraNames) - } - got, err := io.ReadAll(cr) - if err != nil { - t.Fatalf("fail on %q: failed to read %q: %v", file, e.Name, err) - } - if ex.data != string(got) { - t.Fatalf("fail on %q: unexpected contents of %q: len=%d; want=%d", file, e.Name, len(got), len(ex.data)) - } - delete(extraMap, e.Name) - return nil - }) - if err != nil { - t.Fatal(err) - } - got := make([]byte, len(want)) - n, err := f.ReadAt(got, int64(offset)) - if err != nil { - t.Fatalf("ReadAt(len %d, offset %d, size %d) = %v, %v", len(got), offset, f.Size(), n, err) - } - if string(got) != want { - t.Fatalf("ReadAt(len %d, offset %d) = %q, want %q", len(got), offset, viewContent(got), viewContent([]byte(want))) - } - if len(extraMap) != 0 { - var exNames []string - for _, ex := range extraMap { - exNames = append(exNames, ex.name) - } - t.Fatalf("fail on %q: some entries aren't read: %+v", file, exNames) - } - }) -} - -func hasFileContentsRange(file string, offset int, want string) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - f, err := r.OpenFile(file) - if err != nil { - t.Fatal(err) - } - got := make([]byte, len(want)) - n, err := f.ReadAt(got, int64(offset)) - if err != nil { - t.Fatalf("ReadAt(len %d, offset %d) = %v, %v", len(got), offset, n, err) - } - if string(got) != want { - t.Fatalf("ReadAt(len %d, offset %d) = %q, want %q", len(got), offset, viewContent(got), viewContent([]byte(want))) - } - }) -} - -func hasChunkEntries(file string, wantChunks int) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - ent, ok := r.Lookup(file) - if !ok { - t.Fatalf("no file for %q", file) - } - if ent.Type != "reg" { - t.Fatalf("file %q has unexpected type %q; want reg", file, ent.Type) - } - chunks := r.getChunks(ent) - if len(chunks) != wantChunks { - t.Errorf("len(r.getChunks(%q)) = %d; want %d", file, len(chunks), wantChunks) - return - } - f := chunks[0] - - var gotChunks []*TOCEntry - var last *TOCEntry - for off := int64(0); off < f.Size; off++ { - e, ok := r.ChunkEntryForOffset(file, off) - if !ok { - t.Errorf("no ChunkEntryForOffset at %d", off) - return - } - if last != e { - gotChunks = append(gotChunks, e) - last = e - } - } - if !reflect.DeepEqual(chunks, gotChunks) { - t.Errorf("gotChunks=%d, want=%d; contents mismatch", len(gotChunks), wantChunks) - } - - // And verify the NextOffset - for i := 0; i < len(gotChunks)-1; i++ { - ci := gotChunks[i] - cnext := gotChunks[i+1] - if ci.NextOffset() != cnext.Offset { - t.Errorf("chunk %d NextOffset %d != next chunk's Offset of %d", i, ci.NextOffset(), cnext.Offset) - } - } - }) -} - -func entryHasChildren(dir string, want ...string) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - want := append([]string(nil), want...) - var got []string - ent, ok := r.Lookup(dir) - if !ok { - t.Fatalf("didn't find TOCEntry for dir node %q", dir) - } - for baseName := range ent.children { - got = append(got, baseName) - } - sort.Strings(got) - sort.Strings(want) - if !reflect.DeepEqual(got, want) { - t.Errorf("children of %q = %q; want %q", dir, got, want) - } - }) -} - -func hasDir(file string) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - for _, ent := range r.toc.Entries { - if ent.Name == cleanEntryName(file) { - if ent.Type != "dir" { - t.Errorf("file type of %q is %q; want \"dir\"", file, ent.Type) - } - return - } - } - t.Errorf("directory %q not found", file) - }) -} - -func hasDirLinkCount(file string, count int) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - for _, ent := range r.toc.Entries { - if ent.Name == cleanEntryName(file) { - if ent.Type != "dir" { - t.Errorf("file type of %q is %q; want \"dir\"", file, ent.Type) - return - } - if ent.NumLink != count { - t.Errorf("link count of %q = %d; want %d", file, ent.NumLink, count) - } - return - } - } - t.Errorf("directory %q not found", file) - }) -} - -func hasMode(file string, mode os.FileMode) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - for _, ent := range r.toc.Entries { - if ent.Name == cleanEntryName(file) { - if ent.Stat().Mode() != mode { - t.Errorf("invalid mode: got %v; want %v", ent.Stat().Mode(), mode) - return - } - return - } - } - t.Errorf("file %q not found", file) - }) -} - -func hasSymlink(file, target string) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - for _, ent := range r.toc.Entries { - if ent.Name == file { - if ent.Type != "symlink" { - t.Errorf("file type of %q is %q; want \"symlink\"", file, ent.Type) - } else if ent.LinkName != target { - t.Errorf("link target of symlink %q is %q; want %q", file, ent.LinkName, target) - } - return - } - } - t.Errorf("symlink %q not found", file) - }) -} - -func lookupMatch(name string, want *TOCEntry) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - e, ok := r.Lookup(name) - if !ok { - t.Fatalf("failed to Lookup entry %q", name) - } - if !reflect.DeepEqual(e, want) { - t.Errorf("entry %q mismatch.\n got: %+v\nwant: %+v\n", name, e, want) - } - - }) -} - -func hasEntryOwner(entry string, owner owner) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - ent, ok := r.Lookup(strings.TrimSuffix(entry, "/")) - if !ok { - t.Errorf("entry %q not found", entry) - return - } - if ent.UID != owner.uid || ent.GID != owner.gid { - t.Errorf("entry %q has invalid owner (uid:%d, gid:%d) instead of (uid:%d, gid:%d)", entry, ent.UID, ent.GID, owner.uid, owner.gid) - return - } - }) -} - -func mustSameEntry(files ...string) stargzCheck { - return stargzCheckFn(func(t *testing.T, r *Reader) { - var first *TOCEntry - for _, f := range files { - if first == nil { - var ok bool - first, ok = r.Lookup(f) - if !ok { - t.Errorf("unknown first file on Lookup: %q", f) - return - } - } - - // Test Lookup - e, ok := r.Lookup(f) - if !ok { - t.Errorf("unknown file on Lookup: %q", f) - return - } - if e != first { - t.Errorf("Lookup: %+v(%p) != %+v(%p)", e, e, first, first) - return - } - - // Test LookupChild - pe, ok := r.Lookup(filepath.Dir(filepath.Clean(f))) - if !ok { - t.Errorf("failed to get parent of %q", f) - return - } - e, ok = pe.LookupChild(filepath.Base(filepath.Clean(f))) - if !ok { - t.Errorf("failed to get %q as the child of %+v", f, pe) - return - } - if e != first { - t.Errorf("LookupChild: %+v(%p) != %+v(%p)", e, e, first, first) - return - } - - // Test ForeachChild - pe.ForeachChild(func(baseName string, e *TOCEntry) bool { - if baseName == filepath.Base(filepath.Clean(f)) { - if e != first { - t.Errorf("ForeachChild: %+v(%p) != %+v(%p)", e, e, first, first) - return false - } - } - return true - }) - } - }) -} - -func viewContent(c []byte) string { - if len(c) < 100 { - return string(c) - } - return string(c[:50]) + "...(omit)..." + string(c[50:100]) -} - -func tarOf(s ...tarEntry) []tarEntry { return s } - -type tarEntry interface { - appendTar(tw *tar.Writer, prefix string, format tar.Format) error -} - -type tarEntryFunc func(*tar.Writer, string, tar.Format) error - -func (f tarEntryFunc) appendTar(tw *tar.Writer, prefix string, format tar.Format) error { - return f(tw, prefix, format) -} - -func buildTar(t *testing.T, ents []tarEntry, prefix string, opts ...interface{}) *io.SectionReader { - format := tar.FormatUnknown - for _, opt := range opts { - switch v := opt.(type) { - case tar.Format: - format = v - default: - panic(fmt.Errorf("unsupported opt for buildTar: %v", opt)) - } - } - buf := new(bytes.Buffer) - tw := tar.NewWriter(buf) - for _, ent := range ents { - if err := ent.appendTar(tw, prefix, format); err != nil { - t.Fatalf("building input tar: %v", err) - } - } - if err := tw.Close(); err != nil { - t.Errorf("closing write of input tar: %v", err) - } - data := append(buf.Bytes(), make([]byte, 100)...) // append empty bytes at the tail to see lossless works - return io.NewSectionReader(bytes.NewReader(data), 0, int64(len(data))) -} - -func dir(name string, opts ...interface{}) tarEntry { - return tarEntryFunc(func(tw *tar.Writer, prefix string, format tar.Format) error { - var o owner - mode := os.FileMode(0755) - for _, opt := range opts { - switch v := opt.(type) { - case owner: - o = v - case os.FileMode: - mode = v - default: - return errors.New("unsupported opt") - } - } - if !strings.HasSuffix(name, "/") { - panic(fmt.Sprintf("missing trailing slash in dir %q ", name)) - } - tm, err := fileModeToTarMode(mode) - if err != nil { - return err - } - return tw.WriteHeader(&tar.Header{ - Typeflag: tar.TypeDir, - Name: prefix + name, - Mode: tm, - Uid: o.uid, - Gid: o.gid, - Format: format, - }) - }) -} - -// xAttr are extended attributes to set on test files created with the file func. -type xAttr map[string]string - -// owner is owner ot set on test files and directories with the file and dir functions. -type owner struct { - uid int - gid int -} - -func file(name, contents string, opts ...interface{}) tarEntry { - return tarEntryFunc(func(tw *tar.Writer, prefix string, format tar.Format) error { - var xattrs xAttr - var o owner - mode := os.FileMode(0644) - for _, opt := range opts { - switch v := opt.(type) { - case xAttr: - xattrs = v - case owner: - o = v - case os.FileMode: - mode = v - default: - return errors.New("unsupported opt") - } - } - if strings.HasSuffix(name, "/") { - return fmt.Errorf("bogus trailing slash in file %q", name) - } - tm, err := fileModeToTarMode(mode) - if err != nil { - return err - } - if len(xattrs) > 0 { - format = tar.FormatPAX // only PAX supports xattrs - } - if err := tw.WriteHeader(&tar.Header{ - Typeflag: tar.TypeReg, - Name: prefix + name, - Mode: tm, - Xattrs: xattrs, - Size: int64(len(contents)), - Uid: o.uid, - Gid: o.gid, - Format: format, - }); err != nil { - return err - } - _, err = io.WriteString(tw, contents) - return err - }) -} - -func symlink(name, target string) tarEntry { - return tarEntryFunc(func(tw *tar.Writer, prefix string, format tar.Format) error { - return tw.WriteHeader(&tar.Header{ - Typeflag: tar.TypeSymlink, - Name: prefix + name, - Linkname: target, - Mode: 0644, - Format: format, - }) - }) -} - -func link(name string, linkname string) tarEntry { - now := time.Now() - return tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - return w.WriteHeader(&tar.Header{ - Typeflag: tar.TypeLink, - Name: prefix + name, - Linkname: linkname, - ModTime: now, - Format: format, - }) - }) -} - -func chardev(name string, major, minor int64) tarEntry { - now := time.Now() - return tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - return w.WriteHeader(&tar.Header{ - Typeflag: tar.TypeChar, - Name: prefix + name, - Devmajor: major, - Devminor: minor, - ModTime: now, - Format: format, - }) - }) -} - -func blockdev(name string, major, minor int64) tarEntry { - now := time.Now() - return tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - return w.WriteHeader(&tar.Header{ - Typeflag: tar.TypeBlock, - Name: prefix + name, - Devmajor: major, - Devminor: minor, - ModTime: now, - Format: format, - }) - }) -} -func fifo(name string) tarEntry { - now := time.Now() - return tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - return w.WriteHeader(&tar.Header{ - Typeflag: tar.TypeFifo, - Name: prefix + name, - ModTime: now, - Format: format, - }) - }) -} - -func prefetchLandmark() tarEntry { - return tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - if err := w.WriteHeader(&tar.Header{ - Name: PrefetchLandmark, - Typeflag: tar.TypeReg, - Size: int64(len([]byte{landmarkContents})), - Format: format, - }); err != nil { - return err - } - contents := []byte{landmarkContents} - if _, err := io.CopyN(w, bytes.NewReader(contents), int64(len(contents))); err != nil { - return err - } - return nil - }) -} - -func noPrefetchLandmark() tarEntry { - return tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - if err := w.WriteHeader(&tar.Header{ - Name: NoPrefetchLandmark, - Typeflag: tar.TypeReg, - Size: int64(len([]byte{landmarkContents})), - Format: format, - }); err != nil { - return err - } - contents := []byte{landmarkContents} - if _, err := io.CopyN(w, bytes.NewReader(contents), int64(len(contents))); err != nil { - return err - } - return nil - }) -} - -func regDigest(t *testing.T, name string, contentStr string, digestMap map[string]digest.Digest) tarEntry { - if digestMap == nil { - t.Fatalf("digest map mustn't be nil") - } - content := []byte(contentStr) - - var n int64 - for n < int64(len(content)) { - size := int64(chunkSize) - remain := int64(len(content)) - n - if remain < size { - size = remain - } - dgstr := digest.Canonical.Digester() - if _, err := io.CopyN(dgstr.Hash(), bytes.NewReader(content[n:n+size]), size); err != nil { - t.Fatalf("failed to calculate digest of %q (name=%q,offset=%d,size=%d)", - string(content[n:n+size]), name, n, size) - } - digestMap[chunkID(name, n, size)] = dgstr.Digest() - n += size - } - - return tarEntryFunc(func(w *tar.Writer, prefix string, format tar.Format) error { - if err := w.WriteHeader(&tar.Header{ - Typeflag: tar.TypeReg, - Name: prefix + name, - Size: int64(len(content)), - Format: format, - }); err != nil { - return err - } - if _, err := io.CopyN(w, bytes.NewReader(content), int64(len(content))); err != nil { - return err - } - return nil - }) -} - -var runes = []rune("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") - -func randomContents(n int) string { - b := make([]rune, n) - for i := range b { - b[i] = runes[rand.Intn(len(runes))] - } - return string(b) -} - -func fileModeToTarMode(mode os.FileMode) (int64, error) { - h, err := tar.FileInfoHeader(fileInfoOnlyMode(mode), "") - if err != nil { - return 0, err - } - return h.Mode, nil -} - -// fileInfoOnlyMode is os.FileMode that populates only file mode. -type fileInfoOnlyMode os.FileMode - -func (f fileInfoOnlyMode) Name() string { return "" } -func (f fileInfoOnlyMode) Size() int64 { return 0 } -func (f fileInfoOnlyMode) Mode() os.FileMode { return os.FileMode(f) } -func (f fileInfoOnlyMode) ModTime() time.Time { return time.Now() } -func (f fileInfoOnlyMode) IsDir() bool { return os.FileMode(f).IsDir() } -func (f fileInfoOnlyMode) Sys() interface{} { return nil } - -func CheckGzipHasStreams(t *testing.T, b []byte, streams []int64) { - if len(streams) == 0 { - return // nop - } - - wants := map[int64]struct{}{} - for _, s := range streams { - wants[s] = struct{}{} - } - - len0 := len(b) - br := bytes.NewReader(b) - zr := new(gzip.Reader) - t.Logf("got gzip streams:") - numStreams := 0 - for { - zoff := len0 - br.Len() - if err := zr.Reset(br); err != nil { - if err == io.EOF { - return - } - t.Fatalf("countStreams(gzip), Reset: %v", err) - } - zr.Multistream(false) - n, err := io.Copy(io.Discard, zr) - if err != nil { - t.Fatalf("countStreams(gzip), Copy: %v", err) - } - var extra string - if len(zr.Header.Extra) > 0 { - extra = fmt.Sprintf("; extra=%q", zr.Header.Extra) - } - t.Logf(" [%d] at %d in stargz, uncompressed length %d%s", numStreams, zoff, n, extra) - delete(wants, int64(zoff)) - numStreams++ - } -} - -func GzipDiffIDOf(t *testing.T, b []byte) string { - h := sha256.New() - zr, err := gzip.NewReader(bytes.NewReader(b)) - if err != nil { - t.Fatalf("diffIDOf(gzip): %v", err) - } - defer zr.Close() - if _, err := io.Copy(h, zr); err != nil { - t.Fatalf("diffIDOf(gzip).Copy: %v", err) - } - return fmt.Sprintf("sha256:%x", h.Sum(nil)) -} diff --git a/vendor/github.com/containerd/stargz-snapshotter/estargz/types.go b/vendor/github.com/containerd/stargz-snapshotter/estargz/types.go deleted file mode 100644 index 57e0aa61..00000000 --- a/vendor/github.com/containerd/stargz-snapshotter/estargz/types.go +++ /dev/null @@ -1,342 +0,0 @@ -/* - Copyright The containerd 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. -*/ - -/* - Copyright 2019 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 estargz - -import ( - "archive/tar" - "hash" - "io" - "os" - "path" - "time" - - digest "github.com/opencontainers/go-digest" -) - -const ( - // TOCTarName is the name of the JSON file in the tar archive in the - // table of contents gzip stream. - TOCTarName = "stargz.index.json" - - // FooterSize is the number of bytes in the footer - // - // The footer is an empty gzip stream with no compression and an Extra - // header of the form "%016xSTARGZ", where the 64 bit hex-encoded - // number is the offset to the gzip stream of JSON TOC. - // - // 51 comes from: - // - // 10 bytes gzip header - // 2 bytes XLEN (length of Extra field) = 26 (4 bytes header + 16 hex digits + len("STARGZ")) - // 2 bytes Extra: SI1 = 'S', SI2 = 'G' - // 2 bytes Extra: LEN = 22 (16 hex digits + len("STARGZ")) - // 22 bytes Extra: subfield = fmt.Sprintf("%016xSTARGZ", offsetOfTOC) - // 5 bytes flate header - // 8 bytes gzip footer - // (End of the eStargz blob) - // - // NOTE: For Extra fields, subfield IDs SI1='S' SI2='G' is used for eStargz. - FooterSize = 51 - - // legacyFooterSize is the number of bytes in the legacy stargz footer. - // - // 47 comes from: - // - // 10 byte gzip header + - // 2 byte (LE16) length of extra, encoding 22 (16 hex digits + len("STARGZ")) == "\x16\x00" + - // 22 bytes of extra (fmt.Sprintf("%016xSTARGZ", tocGzipOffset)) - // 5 byte flate header - // 8 byte gzip footer (two little endian uint32s: digest, size) - legacyFooterSize = 47 - - // TOCJSONDigestAnnotation is an annotation for an image layer. This stores the - // digest of the TOC JSON. - // This annotation is valid only when it is specified in `.[]layers.annotations` - // of an image manifest. - TOCJSONDigestAnnotation = "containerd.io/snapshot/stargz/toc.digest" - - // StoreUncompressedSizeAnnotation is an additional annotation key for eStargz to enable lazy - // pulling on containers/storage. Stargz Store is required to expose the layer's uncompressed size - // to the runtime but current OCI image doesn't ship this information by default. So we store this - // to the special annotation. - StoreUncompressedSizeAnnotation = "io.containers.estargz.uncompressed-size" - - // PrefetchLandmark is a file entry which indicates the end position of - // prefetch in the stargz file. - PrefetchLandmark = ".prefetch.landmark" - - // NoPrefetchLandmark is a file entry which indicates that no prefetch should - // occur in the stargz file. - NoPrefetchLandmark = ".no.prefetch.landmark" - - landmarkContents = 0xf -) - -// JTOC is the JSON-serialized table of contents index of the files in the stargz file. -type JTOC struct { - Version int `json:"version"` - Entries []*TOCEntry `json:"entries"` -} - -// TOCEntry is an entry in the stargz file's TOC (Table of Contents). -type TOCEntry struct { - // Name is the tar entry's name. It is the complete path - // stored in the tar file, not just the base name. - Name string `json:"name"` - - // Type is one of "dir", "reg", "symlink", "hardlink", "char", - // "block", "fifo", or "chunk". - // The "chunk" type is used for regular file data chunks past the first - // TOCEntry; the 2nd chunk and on have only Type ("chunk"), Offset, - // ChunkOffset, and ChunkSize populated. - Type string `json:"type"` - - // Size, for regular files, is the logical size of the file. - Size int64 `json:"size,omitempty"` - - // ModTime3339 is the modification time of the tar entry. Empty - // means zero or unknown. Otherwise it's in UTC RFC3339 - // format. Use the ModTime method to access the time.Time value. - ModTime3339 string `json:"modtime,omitempty"` - modTime time.Time - - // LinkName, for symlinks and hardlinks, is the link target. - LinkName string `json:"linkName,omitempty"` - - // Mode is the permission and mode bits. - Mode int64 `json:"mode,omitempty"` - - // UID is the user ID of the owner. - UID int `json:"uid,omitempty"` - - // GID is the group ID of the owner. - GID int `json:"gid,omitempty"` - - // Uname is the username of the owner. - // - // In the serialized JSON, this field may only be present for - // the first entry with the same UID. - Uname string `json:"userName,omitempty"` - - // Gname is the group name of the owner. - // - // In the serialized JSON, this field may only be present for - // the first entry with the same GID. - Gname string `json:"groupName,omitempty"` - - // Offset, for regular files, provides the offset in the - // stargz file to the file's data bytes. See ChunkOffset and - // ChunkSize. - Offset int64 `json:"offset,omitempty"` - - // InnerOffset is an optional field indicates uncompressed offset - // of this "reg" or "chunk" payload in a stream starts from Offset. - // This field enables to put multiple "reg" or "chunk" payloads - // in one chunk with having the same Offset but different InnerOffset. - InnerOffset int64 `json:"innerOffset,omitempty"` - - nextOffset int64 // the Offset of the next entry with a non-zero Offset - - // DevMajor is the major device number for "char" and "block" types. - DevMajor int `json:"devMajor,omitempty"` - - // DevMinor is the major device number for "char" and "block" types. - DevMinor int `json:"devMinor,omitempty"` - - // NumLink is the number of entry names pointing to this entry. - // Zero means one name references this entry. - // This field is calculated during runtime and not recorded in TOC JSON. - NumLink int `json:"-"` - - // Xattrs are the extended attribute for the entry. - Xattrs map[string][]byte `json:"xattrs,omitempty"` - - // Digest stores the OCI checksum for regular files payload. - // It has the form "sha256:abcdef01234....". - Digest string `json:"digest,omitempty"` - - // ChunkOffset is non-zero if this is a chunk of a large, - // regular file. If so, the Offset is where the gzip header of - // ChunkSize bytes at ChunkOffset in Name begin. - // - // In serialized form, a "chunkSize" JSON field of zero means - // that the chunk goes to the end of the file. After reading - // from the stargz TOC, though, the ChunkSize is initialized - // to a non-zero file for when Type is either "reg" or - // "chunk". - ChunkOffset int64 `json:"chunkOffset,omitempty"` - ChunkSize int64 `json:"chunkSize,omitempty"` - - // ChunkDigest stores an OCI digest of the chunk. This must be formed - // as "sha256:0123abcd...". - ChunkDigest string `json:"chunkDigest,omitempty"` - - children map[string]*TOCEntry - - // chunkTopIndex is index of the entry where Offset starts in the blob. - chunkTopIndex int -} - -// ModTime returns the entry's modification time. -func (e *TOCEntry) ModTime() time.Time { return e.modTime } - -// NextOffset returns the position (relative to the start of the -// stargz file) of the next gzip boundary after e.Offset. -func (e *TOCEntry) NextOffset() int64 { return e.nextOffset } - -func (e *TOCEntry) addChild(baseName string, child *TOCEntry) { - if e.children == nil { - e.children = make(map[string]*TOCEntry) - } - if child.Type == "dir" { - e.NumLink++ // Entry ".." in the subdirectory links to this directory - } - e.children[baseName] = child -} - -// isDataType reports whether TOCEntry is a regular file or chunk (something that -// contains regular file data). -func (e *TOCEntry) isDataType() bool { return e.Type == "reg" || e.Type == "chunk" } - -// Stat returns a FileInfo value representing e. -func (e *TOCEntry) Stat() os.FileInfo { return fileInfo{e} } - -// ForeachChild calls f for each child item. If f returns false, iteration ends. -// If e is not a directory, f is not called. -func (e *TOCEntry) ForeachChild(f func(baseName string, ent *TOCEntry) bool) { - for name, ent := range e.children { - if !f(name, ent) { - return - } - } -} - -// LookupChild returns the directory e's child by its base name. -func (e *TOCEntry) LookupChild(baseName string) (child *TOCEntry, ok bool) { - child, ok = e.children[baseName] - return -} - -// fileInfo implements os.FileInfo using the wrapped *TOCEntry. -type fileInfo struct{ e *TOCEntry } - -var _ os.FileInfo = fileInfo{} - -func (fi fileInfo) Name() string { return path.Base(fi.e.Name) } -func (fi fileInfo) IsDir() bool { return fi.e.Type == "dir" } -func (fi fileInfo) Size() int64 { return fi.e.Size } -func (fi fileInfo) ModTime() time.Time { return fi.e.ModTime() } -func (fi fileInfo) Sys() interface{} { return fi.e } -func (fi fileInfo) Mode() (m os.FileMode) { - // TOCEntry.Mode is tar.Header.Mode so we can understand the these bits using `tar` pkg. - m = (&tar.Header{Mode: fi.e.Mode}).FileInfo().Mode() & - (os.ModePerm | os.ModeSetuid | os.ModeSetgid | os.ModeSticky) - switch fi.e.Type { - case "dir": - m |= os.ModeDir - case "symlink": - m |= os.ModeSymlink - case "char": - m |= os.ModeDevice | os.ModeCharDevice - case "block": - m |= os.ModeDevice - case "fifo": - m |= os.ModeNamedPipe - } - return m -} - -// TOCEntryVerifier holds verifiers that are usable for verifying chunks contained -// in a eStargz blob. -type TOCEntryVerifier interface { - - // Verifier provides a content verifier that can be used for verifying the - // contents of the specified TOCEntry. - Verifier(ce *TOCEntry) (digest.Verifier, error) -} - -// Compression provides the compression helper to be used creating and parsing eStargz. -// This package provides gzip-based Compression by default, but any compression -// algorithm (e.g. zstd) can be used as long as it implements Compression. -type Compression interface { - Compressor - Decompressor -} - -// Compressor represents the helper mothods to be used for creating eStargz. -type Compressor interface { - // Writer returns WriteCloser to be used for writing a chunk to eStargz. - // Everytime a chunk is written, the WriteCloser is closed and Writer is - // called again for writing the next chunk. - // - // The returned writer should implement "Flush() error" function that flushes - // any pending compressed data to the underlying writer. - Writer(w io.Writer) (WriteFlushCloser, error) - - // WriteTOCAndFooter is called to write JTOC to the passed Writer. - // diffHash calculates the DiffID (uncompressed sha256 hash) of the blob - // WriteTOCAndFooter can optionally write anything that affects DiffID calculation - // (e.g. uncompressed TOC JSON). - // - // This function returns tocDgst that represents the digest of TOC that will be used - // to verify this blob when it's parsed. - WriteTOCAndFooter(w io.Writer, off int64, toc *JTOC, diffHash hash.Hash) (tocDgst digest.Digest, err error) -} - -// Decompressor represents the helper mothods to be used for parsing eStargz. -type Decompressor interface { - // Reader returns ReadCloser to be used for decompressing file payload. - Reader(r io.Reader) (io.ReadCloser, error) - - // FooterSize returns the size of the footer of this blob. - FooterSize() int64 - - // ParseFooter parses the footer and returns the offset and (compressed) size of TOC. - // payloadBlobSize is the (compressed) size of the blob payload (i.e. the size between - // the top until the TOC JSON). - // - // If tocOffset < 0, we assume that TOC isn't contained in the blob and pass nil reader - // to ParseTOC. We expect that ParseTOC acquire TOC from the external location and return it. - // - // tocSize is optional. If tocSize <= 0, it's by default the size of the range from tocOffset until the beginning of the - // footer (blob size - tocOff - FooterSize). - // If blobPayloadSize < 0, blobPayloadSize become the blob size. - ParseFooter(p []byte) (blobPayloadSize, tocOffset, tocSize int64, err error) - - // ParseTOC parses TOC from the passed reader. The reader provides the partial contents - // of the underlying blob that has the range specified by ParseFooter method. - // - // This function returns tocDgst that represents the digest of TOC that will be used - // to verify this blob. This must match to the value returned from - // Compressor.WriteTOCAndFooter that is used when creating this blob. - // - // If tocOffset returned by ParseFooter is < 0, we assume that TOC isn't contained in the blob. - // Pass nil reader to ParseTOC then we expect that ParseTOC acquire TOC from the external location - // and return it. - ParseTOC(r io.Reader) (toc *JTOC, tocDgst digest.Digest, err error) -} - -type WriteFlushCloser interface { - io.WriteCloser - Flush() error -} diff --git a/vendor/github.com/docker/cli/AUTHORS b/vendor/github.com/docker/cli/AUTHORS deleted file mode 100644 index 483743c9..00000000 --- a/vendor/github.com/docker/cli/AUTHORS +++ /dev/null @@ -1,852 +0,0 @@ -# File @generated by scripts/docs/generate-authors.sh. DO NOT EDIT. -# This file lists all contributors to the repository. -# See scripts/docs/generate-authors.sh to make modifications. - -Aanand Prasad -Aaron L. Xu -Aaron Lehmann -Aaron.L.Xu -Abdur Rehman -Abhinandan Prativadi -Abin Shahab -Abreto FU -Ace Tang -Addam Hardy -Adolfo Ochagavía -Adrian Plata -Adrien Duermael -Adrien Folie -Ahmet Alp Balkan -Aidan Feldman -Aidan Hobson Sayers -AJ Bowen -Akhil Mohan -Akihiro Suda -Akim Demaille -Alan Thompson -Albert Callarisa -Alberto Roura -Albin Kerouanton -Aleksa Sarai -Aleksander Piotrowski -Alessandro Boch -Alex Couture-Beil -Alex Mavrogiannis -Alex Mayer -Alexander Boyd -Alexander Larsson -Alexander Morozov -Alexander Ryabov -Alexandre González -Alexey Igrychev -Alexis Couvreur -Alfred Landrum -Alicia Lauerman -Allen Sun -Alvin Deng -Amen Belayneh -Amey Shrivastava <72866602+AmeyShrivastava@users.noreply.github.com> -Amir Goldstein -Amit Krishnan -Amit Shukla -Amy Lindburg -Anca Iordache -Anda Xu -Andrea Luzzardi -Andreas Köhler -Andres G. Aragoneses -Andres Leon Rangel -Andrew France -Andrew Hsu -Andrew Macpherson -Andrew McDonnell -Andrew Po -Andrey Petrov -Andrii Berehuliak -André Martins -Andy Goldstein -Andy Rothfusz -Anil Madhavapeddy -Ankush Agarwal -Anne Henmi -Anton Polonskiy -Antonio Murdaca -Antonis Kalipetis -Anusha Ragunathan -Ao Li -Arash Deshmeh -Arko Dasgupta -Arnaud Porterie -Arnaud Rebillout -Arthur Peka -Ashwini Oruganti -Azat Khuyiyakhmetov -Bardia Keyoumarsi -Barnaby Gray -Bastiaan Bakker -BastianHofmann -Ben Bodenmiller -Ben Bonnefoy -Ben Creasy -Ben Firshman -Benjamin Boudreau -Benjamin Böhmke -Benjamin Nater -Benoit Sigoure -Bhumika Bayani -Bill Wang -Bin Liu -Bingshen Wang -Bishal Das -Boaz Shuster -Bogdan Anton -Boris Pruessmann -Brad Baker -Bradley Cicenas -Brandon Mitchell -Brandon Philips -Brent Salisbury -Bret Fisher -Brian (bex) Exelbierd -Brian Goff -Brian Wieder -Bruno Sousa -Bryan Bess -Bryan Boreham -Bryan Murphy -bryfry -Cameron Spear -Cao Weiwei -Carlo Mion -Carlos Alexandro Becker -Carlos de Paula -Ce Gao -Cedric Davies -Cezar Sa Espinola -Chad Faragher -Chao Wang -Charles Chan -Charles Law -Charles Smith -Charlie Drage -Charlotte Mach -ChaYoung You -Chee Hau Lim -Chen Chuanliang -Chen Hanxiao -Chen Mingjie -Chen Qiu -Chris Couzens -Chris Gavin -Chris Gibson -Chris McKinnel -Chris Snow -Chris Vermilion -Chris Weyl -Christian Persson -Christian Stefanescu -Christophe Robin -Christophe Vidal -Christopher Biscardi -Christopher Crone -Christopher Jones -Christopher Svensson -Christy Norman -Chun Chen -Clinton Kitson -Coenraad Loubser -Colin Hebert -Collin Guarino -Colm Hally -Comical Derskeal <27731088+derskeal@users.noreply.github.com> -Conner Crosby -Corey Farrell -Corey Quon -Cory Bennet -Craig Wilhite -Cristian Staretu -Daehyeok Mun -Dafydd Crosby -Daisuke Ito -dalanlan -Damien Nadé -Dan Cotora -Daniel Artine -Daniel Cassidy -Daniel Dao -Daniel Farrell -Daniel Gasienica -Daniel Goosen -Daniel Helfand -Daniel Hiltgen -Daniel J Walsh -Daniel Nephin -Daniel Norberg -Daniel Watkins -Daniel Zhang -Daniil Nikolenko -Danny Berger -Darren Shepherd -Darren Stahl -Dattatraya Kumbhar -Dave Goodchild -Dave Henderson -Dave Tucker -David Alvarez -David Beitey -David Calavera -David Cramer -David Dooling -David Gageot -David Karlsson -David Lechner -David Scott -David Sheets -David Williamson -David Xia -David Young -Deng Guangxing -Denis Defreyne -Denis Gladkikh -Denis Ollier -Dennis Docter -Derek McGowan -Des Preston -Deshi Xiao -Dharmit Shah -Dhawal Yogesh Bhanushali -Dieter Reuter -Dima Stopel -Dimitry Andric -Ding Fei -Diogo Monica -Djordje Lukic -Dmitriy Fishman -Dmitry Gusev -Dmitry Smirnov -Dmitry V. Krivenok -Dominik Braun -Don Kjer -Dong Chen -DongGeon Lee -Doug Davis -Drew Erny -Ed Costello -Elango Sivanandam -Eli Uriegas -Eli Uriegas -Elias Faxö -Elliot Luo <956941328@qq.com> -Eric Curtin -Eric Engestrom -Eric G. Noriega -Eric Rosenberg -Eric Sage -Eric-Olivier Lamey -Erica Windisch -Erik Hollensbe -Erik Humphrey -Erik St. Martin -Essam A. Hassan -Ethan Haynes -Euan Kemp -Eugene Yakubovich -Evan Allrich -Evan Hazlett -Evan Krall -Evelyn Xu -Everett Toews -Fabio Falci -Fabrizio Soppelsa -Felix Geyer -Felix Hupfeld -Felix Rabe -fezzik1620 -Filip Jareš -Flavio Crisciani -Florian Klein -Forest Johnson -Foysal Iqbal -François Scala -Fred Lifton -Frederic Hemberger -Frederick F. Kautz IV -Frederik Nordahl Jul Sabroe -Frieder Bluemle -Gabriel Gore -Gabriel Nicolas Avellaneda -Gaetan de Villele -Gang Qiao -Gary Schaetz -Genki Takiuchi -George MacRorie -George Xie -Gianluca Borello -Gildas Cuisinier -Gio d'Amelio -Gleb Stsenov -Goksu Toprak -Gou Rao -Govind Rai -Grant Reaber -Greg Pflaum -Gsealy -Guilhem Lettron -Guillaume J. Charmes -Guillaume Le Floch -Guillaume Tardif -gwx296173 -Günther Jungbluth -Hakan Özler -Hao Zhang <21521210@zju.edu.cn> -Harald Albers -Harold Cooper -Harry Zhang -He Simei -Hector S -Helen Xie -Henning Sprang -Henry N -Hernan Garcia -Hongbin Lu -Hu Keping -Huayi Zhang -Hugo Gabriel Eyherabide -huqun -Huu Nguyen -Hyzhou Zhy -Iain Samuel McLean Elder -Ian Campbell -Ian Philpot -Ignacio Capurro -Ilya Dmitrichenko -Ilya Khlopotov -Ilya Sotkov -Ioan Eugen Stan -Isabel Jimenez -Ivan Grcic -Ivan Grund -Ivan Markin -Jacob Atzen -Jacob Tomlinson -Jaivish Kothari -Jake Lambert -Jake Sanders -James Nesbitt -James Turnbull -Jamie Hannaford -Jan Koprowski -Jan Pazdziora -Jan-Jaap Driessen -Jana Radhakrishnan -Jared Hocutt -Jasmine Hegman -Jason Hall -Jason Heiss -Jason Plum -Jay Kamat -Jean Lecordier -Jean Rouge -Jean-Christophe Sirot -Jean-Pierre Huynh -Jeff Lindsay -Jeff Nickoloff -Jeff Silberman -Jennings Zhang -Jeremy Chambers -Jeremy Unruh -Jeremy Yallop -Jeroen Franse -Jesse Adametz -Jessica Frazelle -Jezeniel Zapanta -Jian Zhang -Jie Luo -Jilles Oldenbeuving -Jim Galasyn -Jim Lin -Jimmy Leger -Jimmy Song -jimmyxian -Jintao Zhang -Joao Fernandes -Joe Abbey -Joe Doliner -Joe Gordon -Joel Handwell -Joey Geiger -Joffrey F -Johan Euphrosine -Johannes 'fish' Ziemke -John Feminella -John Harris -John Howard -John Howard -John Laswell -John Maguire -John Mulhausen -John Starks -John Stephens -John Tims -John V. Martinez -John Willis -Jon Johnson -Jon Zeolla -Jonatas Baldin -Jonathan Boulle -Jonathan Lee -Jonathan Lomas -Jonathan McCrohan -Jonathan Warriss-Simmons -Jonh Wendell -Jordan Jennings -Jorge Vallecillo -Jose J. Escobar <53836904+jescobar-docker@users.noreply.github.com> -Joseph Kern -Josh Bodah -Josh Chorlton -Josh Hawn -Josh Horwitz -Josh Soref -Julien Barbier -Julien Kassar -Julien Maitrehenry -Justas Brazauskas -Justin Cormack -Justin Simonelis -Justyn Temme -Jyrki Puttonen -Jérémie Drouet -Jérôme Petazzoni -Jörg Thalheim -Kai Blin -Kai Qiang Wu (Kennan) -Kara Alexandra -Kareem Khazem -Karthik Nayak -Kat Samperi -Kathryn Spiers -Katie McLaughlin -Ke Xu -Kei Ohmura -Keith Hudgins -Kelton Bassingthwaite -Ken Cochrane -Ken ICHIKAWA -Kenfe-Mickaël Laventure -Kevin Alvarez -Kevin Burke -Kevin Feyrer -Kevin Kern -Kevin Kirsche -Kevin Meredith -Kevin Richardson -Kevin Woblick -khaled souf -Kim Eik -Kir Kolyshkin -Kotaro Yoshimatsu -Krasi Georgiev -Kris-Mikael Krister -Kun Zhang -Kunal Kushwaha -Kyle Mitofsky -Lachlan Cooper -Lai Jiangshan -Lars Kellogg-Stedman -Laura Frank -Laurent Erignoux -Lee Gaines -Lei Jitang -Lennie -Leo Gallucci -Leonid Skorospelov -Lewis Daly -Li Yi -Li Yi -Liang-Chi Hsieh -Lifubang -Lihua Tang -Lily Guo -Lin Lu -Linus Heckemann -Liping Xue -Liron Levin -liwenqi -lixiaobing10051267 -Lloyd Dewolf -Lorenzo Fontana -Louis Opter -Luca Favatella -Luca Marturana -Lucas Chan -Luka Hartwig -Lukas Heeren -Lukasz Zajaczkowski -Lydell Manganti -Lénaïc Huard -Ma Shimiao -Mabin -Maciej Kalisz -Madhav Puri -Madhu Venugopal -Madhur Batra -Malte Janduda -Manjunath A Kumatagi -Mansi Nahar -mapk0y -Marc Bihlmaier -Marc Cornellà -Marco Mariani -Marco Vedovati -Marcus Martins -Marianna Tessel -Marius Ileana -Marius Sturm -Mark Oates -Marsh Macy -Martin Mosegaard Amdisen -Mary Anthony -Mason Fish -Mason Malone -Mateusz Major -Mathieu Champlon -Mathieu Rollet -Matt Gucci -Matt Robenolt -Matteo Orefice -Matthew Heon -Matthieu Hauglustaine -Mauro Porras P -Max Shytikov -Maxime Petazzoni -Maximillian Fan Xavier -Mei ChunTao -Metal <2466052+tedhexaflow@users.noreply.github.com> -Micah Zoltu -Michael A. Smith -Michael Bridgen -Michael Crosby -Michael Friis -Michael Irwin -Michael Käufl -Michael Prokop -Michael Scharf -Michael Spetsiotis -Michael Steinert -Michael West -Michal Minář -Michał Czeraszkiewicz -Miguel Angel Alvarez Cabrerizo -Mihai Borobocea -Mihuleacc Sergiu -Mike Brown -Mike Casas -Mike Dalton -Mike Danese -Mike Dillon -Mike Goelzer -Mike MacCana -mikelinjie <294893458@qq.com> -Mikhail Vasin -Milind Chawre -Mindaugas Rukas -Miroslav Gula -Misty Stanley-Jones -Mohammad Banikazemi -Mohammed Aaqib Ansari -Mohini Anne Dsouza -Moorthy RS -Morgan Bauer -Morten Hekkvang -Morten Linderud -Moysés Borges -Mozi <29089388+pzhlkj6612@users.noreply.github.com> -Mrunal Patel -muicoder -Murukesh Mohanan -Muthukumar R -Máximo Cuadros -Mårten Cassel -Nace Oroz -Nahum Shalman -Nalin Dahyabhai -Nao YONASHIRO -Nassim 'Nass' Eddequiouaq -Natalie Parker -Nate Brennand -Nathan Hsieh -Nathan LeClaire -Nathan McCauley -Neil Peterson -Nick Adcock -Nick Santos -Nico Stapelbroek -Nicola Kabar -Nicolas Borboën -Nicolas De Loof -Nikhil Chawla -Nikolas Garofil -Nikolay Milovanov -Nir Soffer -Nishant Totla -NIWA Hideyuki -Noah Treuhaft -O.S. Tezer -Odin Ugedal -ohmystack -OKA Naoya -Oliver Pomeroy -Olle Jonsson -Olli Janatuinen -Oscar Wieman -Otto Kekäläinen -Ovidio Mallo -Pascal Borreli -Patrick Böänziger -Patrick Hemmer -Patrick Lang -Paul -Paul Kehrer -Paul Lietar -Paul Mulders -Paul Weaver -Pavel Pospisil -Paweł Gronowski -Paweł Pokrywka -Paweł Szczekutowicz -Peeyush Gupta -Per Lundberg -Peter Dave Hello -Peter Edge -Peter Hsu -Peter Jaffe -Peter Kehl -Peter Nagy -Peter Salvatore -Peter Waller -Phil Estes -Philip Alexander Etling -Philipp Gillé -Philipp Schmied -Phong Tran -pidster -Pieter E Smit -pixelistik -Pratik Karki -Prayag Verma -Preston Cowley -Pure White -Qiang Huang -Qinglan Peng -qudongfang -Raghavendra K T -Rahul Kadyan -Rahul Zoldyck -Ravi Shekhar Jethani -Ray Tsang -Reficul -Remy Suen -Renaud Gaubert -Ricardo N Feliciano -Rich Moyse -Richard Chen Zheng <58443436+rchenzheng@users.noreply.github.com> -Richard Mathie -Richard Scothern -Rick Wieman -Ritesh H Shukla -Riyaz Faizullabhoy -Rob Gulewich -Robert Wallis -Robin Naundorf -Robin Speekenbrink -Roch Feuillade -Rodolfo Ortiz -Rogelio Canedo -Rohan Verma -Roland Kammerer -Roman Dudin -Rory Hunter -Ross Boucher -Rubens Figueiredo -Rui Cao -Ryan Belgrave -Ryan Detzel -Ryan Stelly -Ryan Wilson-Perkin -Ryan Zhang -Sainath Grandhi -Sakeven Jiang -Sally O'Malley -Sam Neirinck -Sam Thibault -Samarth Shah -Sambuddha Basu -Sami Tabet -Samuel Cochran -Samuel Karp -Sandro Jäckel -Santhosh Manohar -Sargun Dhillon -Saswat Bhattacharya -Scott Brenner -Scott Collier -Sean Christopherson -Sean Rodman -Sebastiaan van Stijn -Sergey Tryuber -Serhat Gülçiçek -Sevki Hasirci -Shaun Kaasten -Sheng Yang -Shijiang Wei -Shishir Mahajan -Shoubhik Bose -Shukui Yang -Sian Lerk Lau -Sidhartha Mani -sidharthamani -Silvin Lubecki -Simei He -Simon Ferquel -Simon Heimberg -Sindhu S -Slava Semushin -Solomon Hykes -Song Gao -Spencer Brown -Spring Lee -squeegels -Srini Brahmaroutu -Stefan S. -Stefan Scherer -Stefan Weil -Stephane Jeandeaux -Stephen Day -Stephen Rust -Steve Durrheimer -Steve Richards -Steven Burgess -Stoica-Marcu Floris-Andrei -Subhajit Ghosh -Sun Jianbo -Sune Keller -Sungwon Han -Sunny Gogoi -Sven Dowideit -Sylvain Baubeau -Sébastien HOUZÉ -T K Sourabh -TAGOMORI Satoshi -taiji-tech -Takeshi Koenuma -Takuya Noguchi -Taylor Jones -Teiva Harsanyi -Tejaswini Duggaraju -Tengfei Wang -Teppei Fukuda -Thatcher Peskens -Thibault Coupin -Thomas Gazagnaire -Thomas Krzero -Thomas Leonard -Thomas Léveil -Thomas Riccardi -Thomas Swift -Tianon Gravi -Tianyi Wang -Tibor Vass -Tim Dettrick -Tim Hockin -Tim Sampson -Tim Smith -Tim Waugh -Tim Wraight -timfeirg -Timothy Hobbs -Tobias Bradtke -Tobias Gesellchen -Todd Whiteman -Tom Denham -Tom Fotherby -Tom Klingenberg -Tom Milligan -Tom X. Tobin -Tomas Bäckman -Tomas Tomecek -Tomasz Kopczynski -Tomáš Hrčka -Tony Abboud -Tõnis Tiigi -Trapier Marshall -Travis Cline -Tristan Carel -Tycho Andersen -Tycho Andersen -uhayate -Ulrich Bareth -Ulysses Souza -Umesh Yadav -Valentin Lorentz -Vardan Pogosian -Venkateswara Reddy Bukkasamudram -Veres Lajos -Victor Vieux -Victoria Bialas -Viktor Stanchev -Vimal Raghubir -Vincent Batts -Vincent Bernat -Vincent Demeester -Vincent Woo -Vishnu Kannan -Vivek Goyal -Wang Jie -Wang Lei -Wang Long -Wang Ping -Wang Xing -Wang Yuexiao -Wang Yumu <37442693@qq.com> -Wataru Ishida -Wayne Song -Wen Cheng Ma -Wenzhi Liang -Wes Morgan -Wewang Xiaorenfine -William Henry -Xianglin Gao -Xiaodong Liu -Xiaodong Zhang -Xiaoxi He -Xinbo Weng -Xuecong Liao -Yan Feng -Yanqiang Miao -Yassine Tijani -Yi EungJun -Ying Li -Yong Tang -Yosef Fertel -Yu Peng -Yuan Sun -Yue Zhang -Yunxiang Huang -Zachary Romero -Zander Mackie -zebrilee -Zeel B Patel -Zhang Kun -Zhang Wei -Zhang Wentao -ZhangHang -zhenghenghuo -Zhou Hao -Zhoulin Xie -Zhu Guihua -Álex González -Álvaro Lázaro -Átila Camurça Alves -Александр Менщиков <__Singleton__@hackerdom.ru> -徐俊杰 diff --git a/vendor/github.com/docker/cli/LICENSE b/vendor/github.com/docker/cli/LICENSE deleted file mode 100644 index 9c8e20ab..00000000 --- a/vendor/github.com/docker/cli/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - https://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 - - Copyright 2013-2017 Docker, Inc. - - 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 - - https://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/docker/cli/NOTICE b/vendor/github.com/docker/cli/NOTICE deleted file mode 100644 index 58b19b6d..00000000 --- a/vendor/github.com/docker/cli/NOTICE +++ /dev/null @@ -1,19 +0,0 @@ -Docker -Copyright 2012-2017 Docker, Inc. - -This product includes software developed at Docker, Inc. (https://www.docker.com). - -This product contains software (https://github.com/creack/pty) developed -by Keith Rarick, licensed under the MIT License. - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see https://www.bis.doc.gov - -See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/cli/cli/config/config.go b/vendor/github.com/docker/cli/cli/config/config.go deleted file mode 100644 index b7c05c3f..00000000 --- a/vendor/github.com/docker/cli/cli/config/config.go +++ /dev/null @@ -1,153 +0,0 @@ -package config - -import ( - "fmt" - "io" - "os" - "path/filepath" - "strings" - "sync" - - "github.com/docker/cli/cli/config/configfile" - "github.com/docker/cli/cli/config/credentials" - "github.com/docker/cli/cli/config/types" - "github.com/docker/docker/pkg/homedir" - "github.com/pkg/errors" -) - -const ( - // ConfigFileName is the name of config file - ConfigFileName = "config.json" - configFileDir = ".docker" - oldConfigfile = ".dockercfg" // Deprecated: remove once we stop printing deprecation warning - contextsDir = "contexts" -) - -var ( - initConfigDir = new(sync.Once) - configDir string - homeDir string -) - -// resetHomeDir is used in testing to reset the "homeDir" package variable to -// force re-lookup of the home directory between tests. -func resetHomeDir() { - homeDir = "" -} - -func getHomeDir() string { - if homeDir == "" { - homeDir = homedir.Get() - } - return homeDir -} - -// resetConfigDir is used in testing to reset the "configDir" package variable -// and its sync.Once to force re-lookup between tests. -func resetConfigDir() { - configDir = "" - initConfigDir = new(sync.Once) -} - -func setConfigDir() { - if configDir != "" { - return - } - configDir = os.Getenv("DOCKER_CONFIG") - if configDir == "" { - configDir = filepath.Join(getHomeDir(), configFileDir) - } -} - -// Dir returns the directory the configuration file is stored in -func Dir() string { - initConfigDir.Do(setConfigDir) - return configDir -} - -// ContextStoreDir returns the directory the docker contexts are stored in -func ContextStoreDir() string { - return filepath.Join(Dir(), contextsDir) -} - -// SetDir sets the directory the configuration file is stored in -func SetDir(dir string) { - configDir = filepath.Clean(dir) -} - -// Path returns the path to a file relative to the config dir -func Path(p ...string) (string, error) { - path := filepath.Join(append([]string{Dir()}, p...)...) - if !strings.HasPrefix(path, Dir()+string(filepath.Separator)) { - return "", errors.Errorf("path %q is outside of root config directory %q", path, Dir()) - } - return path, nil -} - -// LoadFromReader is a convenience function that creates a ConfigFile object from -// a reader -func LoadFromReader(configData io.Reader) (*configfile.ConfigFile, error) { - configFile := configfile.ConfigFile{ - AuthConfigs: make(map[string]types.AuthConfig), - } - err := configFile.LoadFromReader(configData) - return &configFile, err -} - -// Load reads the configuration files in the given directory, and sets up -// the auth config information and returns values. -// FIXME: use the internal golang config parser -func Load(configDir string) (*configfile.ConfigFile, error) { - cfg, _, err := load(configDir) - return cfg, err -} - -// TODO remove this temporary hack, which is used to warn about the deprecated ~/.dockercfg file -// so we can remove the bool return value and collapse this back into `Load` -func load(configDir string) (*configfile.ConfigFile, bool, error) { - printLegacyFileWarning := false - - if configDir == "" { - configDir = Dir() - } - - filename := filepath.Join(configDir, ConfigFileName) - configFile := configfile.New(filename) - - // Try happy path first - latest config file - if file, err := os.Open(filename); err == nil { - defer file.Close() - err = configFile.LoadFromReader(file) - if err != nil { - err = errors.Wrap(err, filename) - } - return configFile, printLegacyFileWarning, err - } else if !os.IsNotExist(err) { - // if file is there but we can't stat it for any reason other - // than it doesn't exist then stop - return configFile, printLegacyFileWarning, errors.Wrap(err, filename) - } - - // Can't find latest config file so check for the old one - filename = filepath.Join(getHomeDir(), oldConfigfile) - if _, err := os.Stat(filename); err == nil { - printLegacyFileWarning = true - } - return configFile, printLegacyFileWarning, nil -} - -// LoadDefaultConfigFile attempts to load the default config file and returns -// an initialized ConfigFile struct if none is found. -func LoadDefaultConfigFile(stderr io.Writer) *configfile.ConfigFile { - configFile, printLegacyFileWarning, err := load(Dir()) - if err != nil { - fmt.Fprintf(stderr, "WARNING: Error loading config file: %v\n", err) - } - if printLegacyFileWarning { - _, _ = fmt.Fprintln(stderr, "WARNING: Support for the legacy ~/.dockercfg configuration file and file-format has been removed and the configuration file will be ignored") - } - if !configFile.ContainsAuth() { - configFile.CredentialsStore = credentials.DetectDefaultStore(configFile.CredentialsStore) - } - return configFile -} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file.go b/vendor/github.com/docker/cli/cli/config/configfile/file.go deleted file mode 100644 index 442c3111..00000000 --- a/vendor/github.com/docker/cli/cli/config/configfile/file.go +++ /dev/null @@ -1,352 +0,0 @@ -package configfile - -import ( - "encoding/base64" - "encoding/json" - "io" - "os" - "path/filepath" - "strings" - - "github.com/docker/cli/cli/config/credentials" - "github.com/docker/cli/cli/config/types" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" -) - -// ConfigFile ~/.docker/config.json file info -type ConfigFile struct { - AuthConfigs map[string]types.AuthConfig `json:"auths"` - HTTPHeaders map[string]string `json:"HttpHeaders,omitempty"` - PsFormat string `json:"psFormat,omitempty"` - ImagesFormat string `json:"imagesFormat,omitempty"` - NetworksFormat string `json:"networksFormat,omitempty"` - PluginsFormat string `json:"pluginsFormat,omitempty"` - VolumesFormat string `json:"volumesFormat,omitempty"` - StatsFormat string `json:"statsFormat,omitempty"` - DetachKeys string `json:"detachKeys,omitempty"` - CredentialsStore string `json:"credsStore,omitempty"` - CredentialHelpers map[string]string `json:"credHelpers,omitempty"` - Filename string `json:"-"` // Note: for internal use only - ServiceInspectFormat string `json:"serviceInspectFormat,omitempty"` - ServicesFormat string `json:"servicesFormat,omitempty"` - TasksFormat string `json:"tasksFormat,omitempty"` - SecretFormat string `json:"secretFormat,omitempty"` - ConfigFormat string `json:"configFormat,omitempty"` - NodesFormat string `json:"nodesFormat,omitempty"` - PruneFilters []string `json:"pruneFilters,omitempty"` - Proxies map[string]ProxyConfig `json:"proxies,omitempty"` - Experimental string `json:"experimental,omitempty"` - CurrentContext string `json:"currentContext,omitempty"` - CLIPluginsExtraDirs []string `json:"cliPluginsExtraDirs,omitempty"` - Plugins map[string]map[string]string `json:"plugins,omitempty"` - Aliases map[string]string `json:"aliases,omitempty"` -} - -// ProxyConfig contains proxy configuration settings -type ProxyConfig struct { - HTTPProxy string `json:"httpProxy,omitempty"` - HTTPSProxy string `json:"httpsProxy,omitempty"` - NoProxy string `json:"noProxy,omitempty"` - FTPProxy string `json:"ftpProxy,omitempty"` - AllProxy string `json:"allProxy,omitempty"` -} - -// New initializes an empty configuration file for the given filename 'fn' -func New(fn string) *ConfigFile { - return &ConfigFile{ - AuthConfigs: make(map[string]types.AuthConfig), - HTTPHeaders: make(map[string]string), - Filename: fn, - Plugins: make(map[string]map[string]string), - Aliases: make(map[string]string), - } -} - -// LoadFromReader reads the configuration data given and sets up the auth config -// information with given directory and populates the receiver object -func (configFile *ConfigFile) LoadFromReader(configData io.Reader) error { - if err := json.NewDecoder(configData).Decode(configFile); err != nil && !errors.Is(err, io.EOF) { - return err - } - var err error - for addr, ac := range configFile.AuthConfigs { - if ac.Auth != "" { - ac.Username, ac.Password, err = decodeAuth(ac.Auth) - if err != nil { - return err - } - } - ac.Auth = "" - ac.ServerAddress = addr - configFile.AuthConfigs[addr] = ac - } - return nil -} - -// ContainsAuth returns whether there is authentication configured -// in this file or not. -func (configFile *ConfigFile) ContainsAuth() bool { - return configFile.CredentialsStore != "" || - len(configFile.CredentialHelpers) > 0 || - len(configFile.AuthConfigs) > 0 -} - -// GetAuthConfigs returns the mapping of repo to auth configuration -func (configFile *ConfigFile) GetAuthConfigs() map[string]types.AuthConfig { - if configFile.AuthConfigs == nil { - configFile.AuthConfigs = make(map[string]types.AuthConfig) - } - return configFile.AuthConfigs -} - -// SaveToWriter encodes and writes out all the authorization information to -// the given writer -func (configFile *ConfigFile) SaveToWriter(writer io.Writer) error { - // Encode sensitive data into a new/temp struct - tmpAuthConfigs := make(map[string]types.AuthConfig, len(configFile.AuthConfigs)) - for k, authConfig := range configFile.AuthConfigs { - authCopy := authConfig - // encode and save the authstring, while blanking out the original fields - authCopy.Auth = encodeAuth(&authCopy) - authCopy.Username = "" - authCopy.Password = "" - authCopy.ServerAddress = "" - tmpAuthConfigs[k] = authCopy - } - - saveAuthConfigs := configFile.AuthConfigs - configFile.AuthConfigs = tmpAuthConfigs - defer func() { configFile.AuthConfigs = saveAuthConfigs }() - - // User-Agent header is automatically set, and should not be stored in the configuration - for v := range configFile.HTTPHeaders { - if strings.EqualFold(v, "User-Agent") { - delete(configFile.HTTPHeaders, v) - } - } - - data, err := json.MarshalIndent(configFile, "", "\t") - if err != nil { - return err - } - _, err = writer.Write(data) - return err -} - -// Save encodes and writes out all the authorization information -func (configFile *ConfigFile) Save() (retErr error) { - if configFile.Filename == "" { - return errors.Errorf("Can't save config with empty filename") - } - - dir := filepath.Dir(configFile.Filename) - if err := os.MkdirAll(dir, 0o700); err != nil { - return err - } - temp, err := os.CreateTemp(dir, filepath.Base(configFile.Filename)) - if err != nil { - return err - } - defer func() { - temp.Close() - if retErr != nil { - if err := os.Remove(temp.Name()); err != nil { - logrus.WithError(err).WithField("file", temp.Name()).Debug("Error cleaning up temp file") - } - } - }() - - err = configFile.SaveToWriter(temp) - if err != nil { - return err - } - - if err := temp.Close(); err != nil { - return errors.Wrap(err, "error closing temp file") - } - - // Handle situation where the configfile is a symlink - cfgFile := configFile.Filename - if f, err := os.Readlink(cfgFile); err == nil { - cfgFile = f - } - - // Try copying the current config file (if any) ownership and permissions - copyFilePermissions(cfgFile, temp.Name()) - return os.Rename(temp.Name(), cfgFile) -} - -// ParseProxyConfig computes proxy configuration by retrieving the config for the provided host and -// then checking this against any environment variables provided to the container -func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts map[string]*string) map[string]*string { - var cfgKey string - - if _, ok := configFile.Proxies[host]; !ok { - cfgKey = "default" - } else { - cfgKey = host - } - - config := configFile.Proxies[cfgKey] - permitted := map[string]*string{ - "HTTP_PROXY": &config.HTTPProxy, - "HTTPS_PROXY": &config.HTTPSProxy, - "NO_PROXY": &config.NoProxy, - "FTP_PROXY": &config.FTPProxy, - "ALL_PROXY": &config.AllProxy, - } - m := runOpts - if m == nil { - m = make(map[string]*string) - } - for k := range permitted { - if *permitted[k] == "" { - continue - } - if _, ok := m[k]; !ok { - m[k] = permitted[k] - } - if _, ok := m[strings.ToLower(k)]; !ok { - m[strings.ToLower(k)] = permitted[k] - } - } - return m -} - -// encodeAuth creates a base64 encoded string to containing authorization information -func encodeAuth(authConfig *types.AuthConfig) string { - if authConfig.Username == "" && authConfig.Password == "" { - return "" - } - - authStr := authConfig.Username + ":" + authConfig.Password - msg := []byte(authStr) - encoded := make([]byte, base64.StdEncoding.EncodedLen(len(msg))) - base64.StdEncoding.Encode(encoded, msg) - return string(encoded) -} - -// decodeAuth decodes a base64 encoded string and returns username and password -func decodeAuth(authStr string) (string, string, error) { - if authStr == "" { - return "", "", nil - } - - decLen := base64.StdEncoding.DecodedLen(len(authStr)) - decoded := make([]byte, decLen) - authByte := []byte(authStr) - n, err := base64.StdEncoding.Decode(decoded, authByte) - if err != nil { - return "", "", err - } - if n > decLen { - return "", "", errors.Errorf("Something went wrong decoding auth config") - } - userName, password, ok := strings.Cut(string(decoded), ":") - if !ok || userName == "" { - return "", "", errors.Errorf("Invalid auth configuration file") - } - return userName, strings.Trim(password, "\x00"), nil -} - -// GetCredentialsStore returns a new credentials store from the settings in the -// configuration file -func (configFile *ConfigFile) GetCredentialsStore(registryHostname string) credentials.Store { - if helper := getConfiguredCredentialStore(configFile, registryHostname); helper != "" { - return newNativeStore(configFile, helper) - } - return credentials.NewFileStore(configFile) -} - -// var for unit testing. -var newNativeStore = func(configFile *ConfigFile, helperSuffix string) credentials.Store { - return credentials.NewNativeStore(configFile, helperSuffix) -} - -// GetAuthConfig for a repository from the credential store -func (configFile *ConfigFile) GetAuthConfig(registryHostname string) (types.AuthConfig, error) { - return configFile.GetCredentialsStore(registryHostname).Get(registryHostname) -} - -// getConfiguredCredentialStore returns the credential helper configured for the -// given registry, the default credsStore, or the empty string if neither are -// configured. -func getConfiguredCredentialStore(c *ConfigFile, registryHostname string) string { - if c.CredentialHelpers != nil && registryHostname != "" { - if helper, exists := c.CredentialHelpers[registryHostname]; exists { - return helper - } - } - return c.CredentialsStore -} - -// GetAllCredentials returns all of the credentials stored in all of the -// configured credential stores. -func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, error) { - auths := make(map[string]types.AuthConfig) - addAll := func(from map[string]types.AuthConfig) { - for reg, ac := range from { - auths[reg] = ac - } - } - - defaultStore := configFile.GetCredentialsStore("") - newAuths, err := defaultStore.GetAll() - if err != nil { - return nil, err - } - addAll(newAuths) - - // Auth configs from a registry-specific helper should override those from the default store. - for registryHostname := range configFile.CredentialHelpers { - newAuth, err := configFile.GetAuthConfig(registryHostname) - if err != nil { - logrus.WithError(err).Warnf("Failed to get credentials for registry: %s", registryHostname) - continue - } - auths[registryHostname] = newAuth - } - return auths, nil -} - -// GetFilename returns the file name that this config file is based on. -func (configFile *ConfigFile) GetFilename() string { - return configFile.Filename -} - -// PluginConfig retrieves the requested option for the given plugin. -func (configFile *ConfigFile) PluginConfig(pluginname, option string) (string, bool) { - if configFile.Plugins == nil { - return "", false - } - pluginConfig, ok := configFile.Plugins[pluginname] - if !ok { - return "", false - } - value, ok := pluginConfig[option] - return value, ok -} - -// SetPluginConfig sets the option to the given value for the given -// plugin. Passing a value of "" will remove the option. If removing -// the final config item for a given plugin then also cleans up the -// overall plugin entry. -func (configFile *ConfigFile) SetPluginConfig(pluginname, option, value string) { - if configFile.Plugins == nil { - configFile.Plugins = make(map[string]map[string]string) - } - pluginConfig, ok := configFile.Plugins[pluginname] - if !ok { - pluginConfig = make(map[string]string) - configFile.Plugins[pluginname] = pluginConfig - } - if value != "" { - pluginConfig[option] = value - } else { - delete(pluginConfig, option) - } - if len(pluginConfig) == 0 { - delete(configFile.Plugins, pluginname) - } -} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go b/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go deleted file mode 100644 index 35388754..00000000 --- a/vendor/github.com/docker/cli/cli/config/configfile/file_unix.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build !windows -// +build !windows - -package configfile - -import ( - "os" - "syscall" -) - -// copyFilePermissions copies file ownership and permissions from "src" to "dst", -// ignoring any error during the process. -func copyFilePermissions(src, dst string) { - var ( - mode os.FileMode = 0o600 - uid, gid int - ) - - fi, err := os.Stat(src) - if err != nil { - return - } - if fi.Mode().IsRegular() { - mode = fi.Mode() - } - if err := os.Chmod(dst, mode); err != nil { - return - } - - uid = int(fi.Sys().(*syscall.Stat_t).Uid) - gid = int(fi.Sys().(*syscall.Stat_t).Gid) - - if uid > 0 && gid > 0 { - _ = os.Chown(dst, uid, gid) - } -} diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go b/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go deleted file mode 100644 index 42fffc39..00000000 --- a/vendor/github.com/docker/cli/cli/config/configfile/file_windows.go +++ /dev/null @@ -1,5 +0,0 @@ -package configfile - -func copyFilePermissions(src, dst string) { - // TODO implement for Windows -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/credentials.go b/vendor/github.com/docker/cli/cli/config/credentials/credentials.go deleted file mode 100644 index 28d58ec4..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/credentials.go +++ /dev/null @@ -1,17 +0,0 @@ -package credentials - -import ( - "github.com/docker/cli/cli/config/types" -) - -// Store is the interface that any credentials store must implement. -type Store interface { - // Erase removes credentials from the store for a given server. - Erase(serverAddress string) error - // Get retrieves credentials from the store for a given server. - Get(serverAddress string) (types.AuthConfig, error) - // GetAll retrieves all the credentials from the store. - GetAll() (map[string]types.AuthConfig, error) - // Store saves credentials in the store. - Store(authConfig types.AuthConfig) error -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store.go deleted file mode 100644 index 402235bf..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/default_store.go +++ /dev/null @@ -1,21 +0,0 @@ -package credentials - -import ( - exec "golang.org/x/sys/execabs" -) - -// DetectDefaultStore return the default credentials store for the platform if -// the store executable is available. -func DetectDefaultStore(store string) string { - platformDefault := defaultCredentialsStore() - - // user defined or no default for platform - if store != "" || platformDefault == "" { - return store - } - - if _, err := exec.LookPath(remoteCredentialsPrefix + platformDefault); err == nil { - return platformDefault - } - return "" -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go deleted file mode 100644 index 5d42dec6..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/default_store_darwin.go +++ /dev/null @@ -1,5 +0,0 @@ -package credentials - -func defaultCredentialsStore() string { - return "osxkeychain" -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go deleted file mode 100644 index a9012c6d..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/default_store_linux.go +++ /dev/null @@ -1,13 +0,0 @@ -package credentials - -import ( - "os/exec" -) - -func defaultCredentialsStore() string { - if _, err := exec.LookPath("pass"); err == nil { - return "pass" - } - - return "secretservice" -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go deleted file mode 100644 index c9630ea5..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/default_store_unsupported.go +++ /dev/null @@ -1,8 +0,0 @@ -//go:build !windows && !darwin && !linux -// +build !windows,!darwin,!linux - -package credentials - -func defaultCredentialsStore() string { - return "" -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go b/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go deleted file mode 100644 index bb799ca6..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/default_store_windows.go +++ /dev/null @@ -1,5 +0,0 @@ -package credentials - -func defaultCredentialsStore() string { - return "wincred" -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go b/vendor/github.com/docker/cli/cli/config/credentials/file_store.go deleted file mode 100644 index ea30fc30..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/file_store.go +++ /dev/null @@ -1,81 +0,0 @@ -package credentials - -import ( - "strings" - - "github.com/docker/cli/cli/config/types" -) - -type store interface { - Save() error - GetAuthConfigs() map[string]types.AuthConfig - GetFilename() string -} - -// fileStore implements a credentials store using -// the docker configuration file to keep the credentials in plain text. -type fileStore struct { - file store -} - -// NewFileStore creates a new file credentials store. -func NewFileStore(file store) Store { - return &fileStore{file: file} -} - -// Erase removes the given credentials from the file store. -func (c *fileStore) Erase(serverAddress string) error { - delete(c.file.GetAuthConfigs(), serverAddress) - return c.file.Save() -} - -// Get retrieves credentials for a specific server from the file store. -func (c *fileStore) Get(serverAddress string) (types.AuthConfig, error) { - authConfig, ok := c.file.GetAuthConfigs()[serverAddress] - if !ok { - // Maybe they have a legacy config file, we will iterate the keys converting - // them to the new format and testing - for r, ac := range c.file.GetAuthConfigs() { - if serverAddress == ConvertToHostname(r) { - return ac, nil - } - } - - authConfig = types.AuthConfig{} - } - return authConfig, nil -} - -func (c *fileStore) GetAll() (map[string]types.AuthConfig, error) { - return c.file.GetAuthConfigs(), nil -} - -// Store saves the given credentials in the file store. -func (c *fileStore) Store(authConfig types.AuthConfig) error { - authConfigs := c.file.GetAuthConfigs() - authConfigs[authConfig.ServerAddress] = authConfig - return c.file.Save() -} - -func (c *fileStore) GetFilename() string { - return c.file.GetFilename() -} - -func (c *fileStore) IsFileStore() bool { - return true -} - -// ConvertToHostname converts a registry url which has http|https prepended -// to just an hostname. -// Copied from github.com/docker/docker/registry.ConvertToHostname to reduce dependencies. -func ConvertToHostname(url string) string { - stripped := url - if strings.HasPrefix(url, "http://") { - stripped = strings.TrimPrefix(url, "http://") - } else if strings.HasPrefix(url, "https://") { - stripped = strings.TrimPrefix(url, "https://") - } - - hostName, _, _ := strings.Cut(stripped, "/") - return hostName -} diff --git a/vendor/github.com/docker/cli/cli/config/credentials/native_store.go b/vendor/github.com/docker/cli/cli/config/credentials/native_store.go deleted file mode 100644 index f9619b03..00000000 --- a/vendor/github.com/docker/cli/cli/config/credentials/native_store.go +++ /dev/null @@ -1,143 +0,0 @@ -package credentials - -import ( - "github.com/docker/cli/cli/config/types" - "github.com/docker/docker-credential-helpers/client" - "github.com/docker/docker-credential-helpers/credentials" -) - -const ( - remoteCredentialsPrefix = "docker-credential-" //nolint:gosec // ignore G101: Potential hardcoded credentials - tokenUsername = "" -) - -// nativeStore implements a credentials store -// using native keychain to keep credentials secure. -// It piggybacks into a file store to keep users' emails. -type nativeStore struct { - programFunc client.ProgramFunc - fileStore Store -} - -// NewNativeStore creates a new native store that -// uses a remote helper program to manage credentials. -func NewNativeStore(file store, helperSuffix string) Store { - name := remoteCredentialsPrefix + helperSuffix - return &nativeStore{ - programFunc: client.NewShellProgramFunc(name), - fileStore: NewFileStore(file), - } -} - -// Erase removes the given credentials from the native store. -func (c *nativeStore) Erase(serverAddress string) error { - if err := client.Erase(c.programFunc, serverAddress); err != nil { - return err - } - - // Fallback to plain text store to remove email - return c.fileStore.Erase(serverAddress) -} - -// Get retrieves credentials for a specific server from the native store. -func (c *nativeStore) Get(serverAddress string) (types.AuthConfig, error) { - // load user email if it exist or an empty auth config. - auth, _ := c.fileStore.Get(serverAddress) - - creds, err := c.getCredentialsFromStore(serverAddress) - if err != nil { - return auth, err - } - auth.Username = creds.Username - auth.IdentityToken = creds.IdentityToken - auth.Password = creds.Password - - return auth, nil -} - -// GetAll retrieves all the credentials from the native store. -func (c *nativeStore) GetAll() (map[string]types.AuthConfig, error) { - auths, err := c.listCredentialsInStore() - if err != nil { - return nil, err - } - - // Emails are only stored in the file store. - // This call can be safely eliminated when emails are removed. - fileConfigs, _ := c.fileStore.GetAll() - - authConfigs := make(map[string]types.AuthConfig) - for registry := range auths { - creds, err := c.getCredentialsFromStore(registry) - if err != nil { - return nil, err - } - ac := fileConfigs[registry] // might contain Email - ac.Username = creds.Username - ac.Password = creds.Password - ac.IdentityToken = creds.IdentityToken - authConfigs[registry] = ac - } - - return authConfigs, nil -} - -// Store saves the given credentials in the file store. -func (c *nativeStore) Store(authConfig types.AuthConfig) error { - if err := c.storeCredentialsInStore(authConfig); err != nil { - return err - } - authConfig.Username = "" - authConfig.Password = "" - authConfig.IdentityToken = "" - - // Fallback to old credential in plain text to save only the email - return c.fileStore.Store(authConfig) -} - -// storeCredentialsInStore executes the command to store the credentials in the native store. -func (c *nativeStore) storeCredentialsInStore(config types.AuthConfig) error { - creds := &credentials.Credentials{ - ServerURL: config.ServerAddress, - Username: config.Username, - Secret: config.Password, - } - - if config.IdentityToken != "" { - creds.Username = tokenUsername - creds.Secret = config.IdentityToken - } - - return client.Store(c.programFunc, creds) -} - -// getCredentialsFromStore executes the command to get the credentials from the native store. -func (c *nativeStore) getCredentialsFromStore(serverAddress string) (types.AuthConfig, error) { - var ret types.AuthConfig - - creds, err := client.Get(c.programFunc, serverAddress) - if err != nil { - if credentials.IsErrCredentialsNotFound(err) { - // do not return an error if the credentials are not - // in the keychain. Let docker ask for new credentials. - return ret, nil - } - return ret, err - } - - if creds.Username == tokenUsername { - ret.IdentityToken = creds.Secret - } else { - ret.Password = creds.Secret - ret.Username = creds.Username - } - - ret.ServerAddress = serverAddress - return ret, nil -} - -// listCredentialsInStore returns a listing of stored credentials as a map of -// URL -> username. -func (c *nativeStore) listCredentialsInStore() (map[string]string, error) { - return client.List(c.programFunc) -} diff --git a/vendor/github.com/docker/cli/cli/config/types/authconfig.go b/vendor/github.com/docker/cli/cli/config/types/authconfig.go deleted file mode 100644 index 056af6b8..00000000 --- a/vendor/github.com/docker/cli/cli/config/types/authconfig.go +++ /dev/null @@ -1,22 +0,0 @@ -package types - -// AuthConfig contains authorization information for connecting to a Registry -type AuthConfig struct { - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty"` - Auth string `json:"auth,omitempty"` - - // Email is an optional value associated with the username. - // This field is deprecated and will be removed in a later - // version of docker. - Email string `json:"email,omitempty"` - - ServerAddress string `json:"serveraddress,omitempty"` - - // IdentityToken is used to authenticate the user and get - // an access token for the registry. - IdentityToken string `json:"identitytoken,omitempty"` - - // RegistryToken is a bearer token to be sent to a registry - RegistryToken string `json:"registrytoken,omitempty"` -} diff --git a/vendor/github.com/docker/distribution/LICENSE b/vendor/github.com/docker/distribution/LICENSE deleted file mode 100644 index e06d2081..00000000 --- a/vendor/github.com/docker/distribution/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/docker/distribution/registry/client/auth/challenge/addr.go b/vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go deleted file mode 100644 index 2c3ebe16..00000000 --- a/vendor/github.com/docker/distribution/registry/client/auth/challenge/addr.go +++ /dev/null @@ -1,27 +0,0 @@ -package challenge - -import ( - "net/url" - "strings" -) - -// FROM: https://golang.org/src/net/http/http.go -// Given a string of the form "host", "host:port", or "[ipv6::address]:port", -// return true if the string includes a port. -func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") } - -// FROM: http://golang.org/src/net/http/transport.go -var portMap = map[string]string{ - "http": "80", - "https": "443", -} - -// canonicalAddr returns url.Host but always with a ":port" suffix -// FROM: http://golang.org/src/net/http/transport.go -func canonicalAddr(url *url.URL) string { - addr := url.Host - if !hasPort(addr) { - return addr + ":" + portMap[url.Scheme] - } - return addr -} diff --git a/vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go b/vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go deleted file mode 100644 index fe238210..00000000 --- a/vendor/github.com/docker/distribution/registry/client/auth/challenge/authchallenge.go +++ /dev/null @@ -1,237 +0,0 @@ -package challenge - -import ( - "fmt" - "net/http" - "net/url" - "strings" - "sync" -) - -// Challenge carries information from a WWW-Authenticate response header. -// See RFC 2617. -type Challenge struct { - // Scheme is the auth-scheme according to RFC 2617 - Scheme string - - // Parameters are the auth-params according to RFC 2617 - Parameters map[string]string -} - -// Manager manages the challenges for endpoints. -// The challenges are pulled out of HTTP responses. Only -// responses which expect challenges should be added to -// the manager, since a non-unauthorized request will be -// viewed as not requiring challenges. -type Manager interface { - // GetChallenges returns the challenges for the given - // endpoint URL. - GetChallenges(endpoint url.URL) ([]Challenge, error) - - // AddResponse adds the response to the challenge - // manager. The challenges will be parsed out of - // the WWW-Authenicate headers and added to the - // URL which was produced the response. If the - // response was authorized, any challenges for the - // endpoint will be cleared. - AddResponse(resp *http.Response) error -} - -// NewSimpleManager returns an instance of -// Manger which only maps endpoints to challenges -// based on the responses which have been added the -// manager. The simple manager will make no attempt to -// perform requests on the endpoints or cache the responses -// to a backend. -func NewSimpleManager() Manager { - return &simpleManager{ - Challenges: make(map[string][]Challenge), - } -} - -type simpleManager struct { - sync.RWMutex - Challenges map[string][]Challenge -} - -func normalizeURL(endpoint *url.URL) { - endpoint.Host = strings.ToLower(endpoint.Host) - endpoint.Host = canonicalAddr(endpoint) -} - -func (m *simpleManager) GetChallenges(endpoint url.URL) ([]Challenge, error) { - normalizeURL(&endpoint) - - m.RLock() - defer m.RUnlock() - challenges := m.Challenges[endpoint.String()] - return challenges, nil -} - -func (m *simpleManager) AddResponse(resp *http.Response) error { - challenges := ResponseChallenges(resp) - if resp.Request == nil { - return fmt.Errorf("missing request reference") - } - urlCopy := url.URL{ - Path: resp.Request.URL.Path, - Host: resp.Request.URL.Host, - Scheme: resp.Request.URL.Scheme, - } - normalizeURL(&urlCopy) - - m.Lock() - defer m.Unlock() - m.Challenges[urlCopy.String()] = challenges - return nil -} - -// Octet types from RFC 2616. -type octetType byte - -var octetTypes [256]octetType - -const ( - isToken octetType = 1 << iota - isSpace -) - -func init() { - // OCTET = - // CHAR = - // CTL = - // CR = - // LF = - // SP = - // HT = - // <"> = - // CRLF = CR LF - // LWS = [CRLF] 1*( SP | HT ) - // TEXT = - // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> - // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT - // token = 1* - // qdtext = > - - for c := 0; c < 256; c++ { - var t octetType - isCtl := c <= 31 || c == 127 - isChar := 0 <= c && c <= 127 - isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) - if strings.ContainsRune(" \t\r\n", rune(c)) { - t |= isSpace - } - if isChar && !isCtl && !isSeparator { - t |= isToken - } - octetTypes[c] = t - } -} - -// ResponseChallenges returns a list of authorization challenges -// for the given http Response. Challenges are only checked if -// the response status code was a 401. -func ResponseChallenges(resp *http.Response) []Challenge { - if resp.StatusCode == http.StatusUnauthorized { - // Parse the WWW-Authenticate Header and store the challenges - // on this endpoint object. - return parseAuthHeader(resp.Header) - } - - return nil -} - -func parseAuthHeader(header http.Header) []Challenge { - challenges := []Challenge{} - for _, h := range header[http.CanonicalHeaderKey("WWW-Authenticate")] { - v, p := parseValueAndParams(h) - if v != "" { - challenges = append(challenges, Challenge{Scheme: v, Parameters: p}) - } - } - return challenges -} - -func parseValueAndParams(header string) (value string, params map[string]string) { - params = make(map[string]string) - value, s := expectToken(header) - if value == "" { - return - } - value = strings.ToLower(value) - s = "," + skipSpace(s) - for strings.HasPrefix(s, ",") { - var pkey string - pkey, s = expectToken(skipSpace(s[1:])) - if pkey == "" { - return - } - if !strings.HasPrefix(s, "=") { - return - } - var pvalue string - pvalue, s = expectTokenOrQuoted(s[1:]) - if pvalue == "" { - return - } - pkey = strings.ToLower(pkey) - params[pkey] = pvalue - s = skipSpace(s) - } - return -} - -func skipSpace(s string) (rest string) { - i := 0 - for ; i < len(s); i++ { - if octetTypes[s[i]]&isSpace == 0 { - break - } - } - return s[i:] -} - -func expectToken(s string) (token, rest string) { - i := 0 - for ; i < len(s); i++ { - if octetTypes[s[i]]&isToken == 0 { - break - } - } - return s[:i], s[i:] -} - -func expectTokenOrQuoted(s string) (value string, rest string) { - if !strings.HasPrefix(s, "\"") { - return expectToken(s) - } - s = s[1:] - for i := 0; i < len(s); i++ { - switch s[i] { - case '"': - return s[:i], s[i+1:] - case '\\': - p := make([]byte, len(s)-1) - j := copy(p, s[:i]) - escape := true - for i = i + 1; i < len(s); i++ { - b := s[i] - switch { - case escape: - escape = false - p[j] = b - j++ - case b == '\\': - escape = true - case b == '"': - return string(p[:j]), s[i+1:] - default: - p[j] = b - j++ - } - } - return "", "" - } - } - return "", "" -} diff --git a/vendor/github.com/docker/docker-credential-helpers/LICENSE b/vendor/github.com/docker/docker-credential-helpers/LICENSE deleted file mode 100644 index 1ea555e2..00000000 --- a/vendor/github.com/docker/docker-credential-helpers/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2016 David Calavera - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/docker/docker-credential-helpers/client/client.go b/vendor/github.com/docker/docker-credential-helpers/client/client.go deleted file mode 100644 index 678153cf..00000000 --- a/vendor/github.com/docker/docker-credential-helpers/client/client.go +++ /dev/null @@ -1,121 +0,0 @@ -package client - -import ( - "bytes" - "encoding/json" - "fmt" - "strings" - - "github.com/docker/docker-credential-helpers/credentials" -) - -// isValidCredsMessage checks if 'msg' contains invalid credentials error message. -// It returns whether the logs are free of invalid credentials errors and the error if it isn't. -// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername. -func isValidCredsMessage(msg string) error { - if credentials.IsCredentialsMissingServerURLMessage(msg) { - return credentials.NewErrCredentialsMissingServerURL() - } - - if credentials.IsCredentialsMissingUsernameMessage(msg) { - return credentials.NewErrCredentialsMissingUsername() - } - - return nil -} - -// Store uses an external program to save credentials. -func Store(program ProgramFunc, creds *credentials.Credentials) error { - cmd := program(credentials.ActionStore) - - buffer := new(bytes.Buffer) - if err := json.NewEncoder(buffer).Encode(creds); err != nil { - return err - } - cmd.Input(buffer) - - out, err := cmd.Output() - if err != nil { - t := strings.TrimSpace(string(out)) - - if isValidErr := isValidCredsMessage(t); isValidErr != nil { - err = isValidErr - } - - return fmt.Errorf("error storing credentials - err: %v, out: `%s`", err, t) - } - - return nil -} - -// Get executes an external program to get the credentials from a native store. -func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error) { - cmd := program(credentials.ActionGet) - cmd.Input(strings.NewReader(serverURL)) - - out, err := cmd.Output() - if err != nil { - t := strings.TrimSpace(string(out)) - - if credentials.IsErrCredentialsNotFoundMessage(t) { - return nil, credentials.NewErrCredentialsNotFound() - } - - if isValidErr := isValidCredsMessage(t); isValidErr != nil { - err = isValidErr - } - - return nil, fmt.Errorf("error getting credentials - err: %v, out: `%s`", err, t) - } - - resp := &credentials.Credentials{ - ServerURL: serverURL, - } - - if err := json.NewDecoder(bytes.NewReader(out)).Decode(resp); err != nil { - return nil, err - } - - return resp, nil -} - -// Erase executes a program to remove the server credentials from the native store. -func Erase(program ProgramFunc, serverURL string) error { - cmd := program(credentials.ActionErase) - cmd.Input(strings.NewReader(serverURL)) - out, err := cmd.Output() - if err != nil { - t := strings.TrimSpace(string(out)) - - if isValidErr := isValidCredsMessage(t); isValidErr != nil { - err = isValidErr - } - - return fmt.Errorf("error erasing credentials - err: %v, out: `%s`", err, t) - } - - return nil -} - -// List executes a program to list server credentials in the native store. -func List(program ProgramFunc) (map[string]string, error) { - cmd := program(credentials.ActionList) - cmd.Input(strings.NewReader("unused")) - out, err := cmd.Output() - if err != nil { - t := strings.TrimSpace(string(out)) - - if isValidErr := isValidCredsMessage(t); isValidErr != nil { - err = isValidErr - } - - return nil, fmt.Errorf("error listing credentials - err: %v, out: `%s`", err, t) - } - - var resp map[string]string - if err = json.NewDecoder(bytes.NewReader(out)).Decode(&resp); err != nil { - return nil, err - } - - return resp, nil -} diff --git a/vendor/github.com/docker/docker-credential-helpers/client/command.go b/vendor/github.com/docker/docker-credential-helpers/client/command.go deleted file mode 100644 index 1936234b..00000000 --- a/vendor/github.com/docker/docker-credential-helpers/client/command.go +++ /dev/null @@ -1,54 +0,0 @@ -package client - -import ( - "io" - "os" - "os/exec" -) - -// Program is an interface to execute external programs. -type Program interface { - Output() ([]byte, error) - Input(in io.Reader) -} - -// ProgramFunc is a type of function that initializes programs based on arguments. -type ProgramFunc func(args ...string) Program - -// NewShellProgramFunc creates programs that are executed in a Shell. -func NewShellProgramFunc(name string) ProgramFunc { - return NewShellProgramFuncWithEnv(name, nil) -} - -// NewShellProgramFuncWithEnv creates programs that are executed in a Shell with environment variables -func NewShellProgramFuncWithEnv(name string, env *map[string]string) ProgramFunc { - return func(args ...string) Program { - return &Shell{cmd: createProgramCmdRedirectErr(name, args, env)} - } -} - -func createProgramCmdRedirectErr(commandName string, args []string, env *map[string]string) *exec.Cmd { - programCmd := exec.Command(commandName, args...) - if env != nil { - for k, v := range *env { - programCmd.Env = append(programCmd.Environ(), k+"="+v) - } - } - programCmd.Stderr = os.Stderr - return programCmd -} - -// Shell invokes shell commands to talk with a remote credentials-helper. -type Shell struct { - cmd *exec.Cmd -} - -// Output returns responses from the remote credentials-helper. -func (s *Shell) Output() ([]byte, error) { - return s.cmd.Output() -} - -// Input sets the input to send to a remote credentials-helper. -func (s *Shell) Input(in io.Reader) { - s.cmd.Stdin = in -} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go b/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go deleted file mode 100644 index eac55188..00000000 --- a/vendor/github.com/docker/docker-credential-helpers/credentials/credentials.go +++ /dev/null @@ -1,209 +0,0 @@ -package credentials - -import ( - "bufio" - "bytes" - "encoding/json" - "fmt" - "io" - "os" - "strings" -) - -// Action defines the name of an action (sub-command) supported by a -// credential-helper binary. It is an alias for "string", and mostly -// for convenience. -type Action = string - -// List of actions (sub-commands) supported by credential-helper binaries. -const ( - ActionStore Action = "store" - ActionGet Action = "get" - ActionErase Action = "erase" - ActionList Action = "list" - ActionVersion Action = "version" -) - -// Credentials holds the information shared between docker and the credentials store. -type Credentials struct { - ServerURL string - Username string - Secret string -} - -// isValid checks the integrity of Credentials object such that no credentials lack -// a server URL or a username. -// It returns whether the credentials are valid and the error if it isn't. -// error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername -func (c *Credentials) isValid() (bool, error) { - if len(c.ServerURL) == 0 { - return false, NewErrCredentialsMissingServerURL() - } - - if len(c.Username) == 0 { - return false, NewErrCredentialsMissingUsername() - } - - return true, nil -} - -// CredsLabel holds the way Docker credentials should be labeled as such in credentials stores that allow labelling. -// That label allows to filter out non-Docker credentials too at lookup/search in macOS keychain, -// Windows credentials manager and Linux libsecret. Default value is "Docker Credentials" -var CredsLabel = "Docker Credentials" - -// SetCredsLabel is a simple setter for CredsLabel -func SetCredsLabel(label string) { - CredsLabel = label -} - -// Serve initializes the credentials-helper and parses the action argument. -// This function is designed to be called from a command line interface. -// It uses os.Args[1] as the key for the action. -// It uses os.Stdin as input and os.Stdout as output. -// This function terminates the program with os.Exit(1) if there is an error. -func Serve(helper Helper) { - if len(os.Args) != 2 { - _, _ = fmt.Fprintln(os.Stdout, usage()) - os.Exit(1) - } - - switch os.Args[1] { - case "--version", "-v": - _ = PrintVersion(os.Stdout) - os.Exit(0) - case "--help", "-h": - _, _ = fmt.Fprintln(os.Stdout, usage()) - os.Exit(0) - } - - if err := HandleCommand(helper, os.Args[1], os.Stdin, os.Stdout); err != nil { - _, _ = fmt.Fprintln(os.Stdout, err) - os.Exit(1) - } -} - -func usage() string { - return fmt.Sprintf("Usage: %s ", Name) -} - -// HandleCommand runs a helper to execute a credential action. -func HandleCommand(helper Helper, action Action, in io.Reader, out io.Writer) error { - switch action { - case ActionStore: - return Store(helper, in) - case ActionGet: - return Get(helper, in, out) - case ActionErase: - return Erase(helper, in) - case ActionList: - return List(helper, out) - case ActionVersion: - return PrintVersion(out) - default: - return fmt.Errorf("%s: unknown action: %s", Name, action) - } -} - -// Store uses a helper and an input reader to save credentials. -// The reader must contain the JSON serialization of a Credentials struct. -func Store(helper Helper, reader io.Reader) error { - scanner := bufio.NewScanner(reader) - - buffer := new(bytes.Buffer) - for scanner.Scan() { - buffer.Write(scanner.Bytes()) - } - - if err := scanner.Err(); err != nil && err != io.EOF { - return err - } - - var creds Credentials - if err := json.NewDecoder(buffer).Decode(&creds); err != nil { - return err - } - - if ok, err := creds.isValid(); !ok { - return err - } - - return helper.Add(&creds) -} - -// Get retrieves the credentials for a given server url. -// The reader must contain the server URL to search. -// The writer is used to write the JSON serialization of the credentials. -func Get(helper Helper, reader io.Reader, writer io.Writer) error { - scanner := bufio.NewScanner(reader) - - buffer := new(bytes.Buffer) - for scanner.Scan() { - buffer.Write(scanner.Bytes()) - } - - if err := scanner.Err(); err != nil && err != io.EOF { - return err - } - - serverURL := strings.TrimSpace(buffer.String()) - if len(serverURL) == 0 { - return NewErrCredentialsMissingServerURL() - } - - username, secret, err := helper.Get(serverURL) - if err != nil { - return err - } - - buffer.Reset() - err = json.NewEncoder(buffer).Encode(Credentials{ - ServerURL: serverURL, - Username: username, - Secret: secret, - }) - if err != nil { - return err - } - - _, _ = fmt.Fprint(writer, buffer.String()) - return nil -} - -// Erase removes credentials from the store. -// The reader must contain the server URL to remove. -func Erase(helper Helper, reader io.Reader) error { - scanner := bufio.NewScanner(reader) - - buffer := new(bytes.Buffer) - for scanner.Scan() { - buffer.Write(scanner.Bytes()) - } - - if err := scanner.Err(); err != nil && err != io.EOF { - return err - } - - serverURL := strings.TrimSpace(buffer.String()) - if len(serverURL) == 0 { - return NewErrCredentialsMissingServerURL() - } - - return helper.Delete(serverURL) -} - -// List returns all the serverURLs of keys in -// the OS store as a list of strings -func List(helper Helper, writer io.Writer) error { - accts, err := helper.List() - if err != nil { - return err - } - return json.NewEncoder(writer).Encode(accts) -} - -// PrintVersion outputs the current version. -func PrintVersion(writer io.Writer) error { - _, _ = fmt.Fprintf(writer, "%s (%s) %s\n", Name, Package, Version) - return nil -} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/error.go b/vendor/github.com/docker/docker-credential-helpers/credentials/error.go deleted file mode 100644 index 8fa4d5d2..00000000 --- a/vendor/github.com/docker/docker-credential-helpers/credentials/error.go +++ /dev/null @@ -1,121 +0,0 @@ -package credentials - -import "errors" - -const ( - // ErrCredentialsNotFound standardizes the not found error, so every helper returns - // the same message and docker can handle it properly. - errCredentialsNotFoundMessage = "credentials not found in native keychain" - - // ErrCredentialsMissingServerURL and ErrCredentialsMissingUsername standardize - // invalid credentials or credentials management operations - errCredentialsMissingServerURLMessage = "no credentials server URL" - errCredentialsMissingUsernameMessage = "no credentials username" -) - -// errCredentialsNotFound represents an error -// raised when credentials are not in the store. -type errCredentialsNotFound struct{} - -// Error returns the standard error message -// for when the credentials are not in the store. -func (errCredentialsNotFound) Error() string { - return errCredentialsNotFoundMessage -} - -// NotFound implements the [ErrNotFound][errdefs.ErrNotFound] interface. -// -// [errdefs.ErrNotFound]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrNotFound -func (errCredentialsNotFound) NotFound() {} - -// NewErrCredentialsNotFound creates a new error -// for when the credentials are not in the store. -func NewErrCredentialsNotFound() error { - return errCredentialsNotFound{} -} - -// IsErrCredentialsNotFound returns true if the error -// was caused by not having a set of credentials in a store. -func IsErrCredentialsNotFound(err error) bool { - var target errCredentialsNotFound - return errors.As(err, &target) -} - -// IsErrCredentialsNotFoundMessage returns true if the error -// was caused by not having a set of credentials in a store. -// -// This function helps to check messages returned by an -// external program via its standard output. -func IsErrCredentialsNotFoundMessage(err string) bool { - return err == errCredentialsNotFoundMessage -} - -// errCredentialsMissingServerURL represents an error raised -// when the credentials object has no server URL or when no -// server URL is provided to a credentials operation requiring -// one. -type errCredentialsMissingServerURL struct{} - -func (errCredentialsMissingServerURL) Error() string { - return errCredentialsMissingServerURLMessage -} - -// InvalidParameter implements the [ErrInvalidParameter][errdefs.ErrInvalidParameter] -// interface. -// -// [errdefs.ErrInvalidParameter]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrInvalidParameter -func (errCredentialsMissingServerURL) InvalidParameter() {} - -// errCredentialsMissingUsername represents an error raised -// when the credentials object has no username or when no -// username is provided to a credentials operation requiring -// one. -type errCredentialsMissingUsername struct{} - -func (errCredentialsMissingUsername) Error() string { - return errCredentialsMissingUsernameMessage -} - -// InvalidParameter implements the [ErrInvalidParameter][errdefs.ErrInvalidParameter] -// interface. -// -// [errdefs.ErrInvalidParameter]: https://pkg.go.dev/github.com/docker/docker@v24.0.1+incompatible/errdefs#ErrInvalidParameter -func (errCredentialsMissingUsername) InvalidParameter() {} - -// NewErrCredentialsMissingServerURL creates a new error for -// errCredentialsMissingServerURL. -func NewErrCredentialsMissingServerURL() error { - return errCredentialsMissingServerURL{} -} - -// NewErrCredentialsMissingUsername creates a new error for -// errCredentialsMissingUsername. -func NewErrCredentialsMissingUsername() error { - return errCredentialsMissingUsername{} -} - -// IsCredentialsMissingServerURL returns true if the error -// was an errCredentialsMissingServerURL. -func IsCredentialsMissingServerURL(err error) bool { - var target errCredentialsMissingServerURL - return errors.As(err, &target) -} - -// IsCredentialsMissingServerURLMessage checks for an -// errCredentialsMissingServerURL in the error message. -func IsCredentialsMissingServerURLMessage(err string) bool { - return err == errCredentialsMissingServerURLMessage -} - -// IsCredentialsMissingUsername returns true if the error -// was an errCredentialsMissingUsername. -func IsCredentialsMissingUsername(err error) bool { - var target errCredentialsMissingUsername - return errors.As(err, &target) -} - -// IsCredentialsMissingUsernameMessage checks for an -// errCredentialsMissingUsername in the error message. -func IsCredentialsMissingUsernameMessage(err string) bool { - return err == errCredentialsMissingUsernameMessage -} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go b/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go deleted file mode 100644 index 135acd25..00000000 --- a/vendor/github.com/docker/docker-credential-helpers/credentials/helper.go +++ /dev/null @@ -1,14 +0,0 @@ -package credentials - -// Helper is the interface a credentials store helper must implement. -type Helper interface { - // Add appends credentials to the store. - Add(*Credentials) error - // Delete removes credentials from the store. - Delete(serverURL string) error - // Get retrieves credentials from the store. - // It returns username and secret as strings. - Get(serverURL string) (string, string, error) - // List returns the stored serverURLs and their associated usernames. - List() (map[string]string, error) -} diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/version.go b/vendor/github.com/docker/docker-credential-helpers/credentials/version.go deleted file mode 100644 index 84377c26..00000000 --- a/vendor/github.com/docker/docker-credential-helpers/credentials/version.go +++ /dev/null @@ -1,16 +0,0 @@ -package credentials - -var ( - // Name is filled at linking time - Name = "" - - // Package is filled at linking time - Package = "github.com/docker/docker-credential-helpers" - - // Version holds the complete version number. Filled in at linking time. - Version = "v0.0.0+unknown" - - // Revision is filled with the VCS (e.g. git) revision being used to build - // the program at linking time. - Revision = "" -) diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS deleted file mode 100644 index b3141819..00000000 --- a/vendor/github.com/docker/docker/AUTHORS +++ /dev/null @@ -1,2390 +0,0 @@ -# File @generated by hack/generate-authors.sh. DO NOT EDIT. -# This file lists all contributors to the repository. -# See hack/generate-authors.sh to make modifications. - -Aanand Prasad -Aaron Davidson -Aaron Feng -Aaron Hnatiw -Aaron Huslage -Aaron L. Xu -Aaron Lehmann -Aaron Welch -Abel Muiño -Abhijeet Kasurde -Abhinandan Prativadi -Abhinav Ajgaonkar -Abhishek Chanda -Abhishek Sharma -Abin Shahab -Abirdcfly -Ada Mancini -Adam Avilla -Adam Dobrawy -Adam Eijdenberg -Adam Kunk -Adam Miller -Adam Mills -Adam Pointer -Adam Singer -Adam Walz -Adam Williams -AdamKorcz -Addam Hardy -Aditi Rajagopal -Aditya -Adnan Khan -Adolfo Ochagavía -Adria Casas -Adrian Moisey -Adrian Mouat -Adrian Oprea -Adrien Folie -Adrien Gallouët -Ahmed Kamal -Ahmet Alp Balkan -Aidan Feldman -Aidan Hobson Sayers -AJ Bowen -Ajey Charantimath -ajneu -Akash Gupta -Akhil Mohan -Akihiro Matsushima -Akihiro Suda -Akim Demaille -Akira Koyasu -Akshay Karle -Akshay Moghe -Al Tobey -alambike -Alan Hoyle -Alan Scherger -Alan Thompson -Albert Callarisa -Albert Zhang -Albin Kerouanton -Alec Benson -Alejandro González Hevia -Aleksa Sarai -Aleksandr Chebotov -Aleksandrs Fadins -Alena Prokharchyk -Alessandro Boch -Alessio Biancalana -Alex Chan -Alex Chen -Alex Coventry -Alex Crawford -Alex Ellis -Alex Gaynor -Alex Goodman -Alex Nordlund -Alex Olshansky -Alex Samorukov -Alex Stockinger -Alex Warhawk -Alexander Artemenko -Alexander Boyd -Alexander Larsson -Alexander Midlash -Alexander Morozov -Alexander Polakov -Alexander Shopov -Alexandre Beslic -Alexandre Garnier -Alexandre González -Alexandre Jomin -Alexandru Sfirlogea -Alexei Margasov -Alexey Guskov -Alexey Kotlyarov -Alexey Shamrin -Alexis Ries -Alexis Thomas -Alfred Landrum -Ali Dehghani -Alicia Lauerman -Alihan Demir -Allen Madsen -Allen Sun -almoehi -Alvaro Saurin -Alvin Deng -Alvin Richards -amangoel -Amen Belayneh -Ameya Gawde -Amir Goldstein -Amit Bakshi -Amit Krishnan -Amit Shukla -Amr Gawish -Amy Lindburg -Anand Patil -AnandkumarPatel -Anatoly Borodin -Anca Iordache -Anchal Agrawal -Anda Xu -Anders Janmyr -Andre Dublin <81dublin@gmail.com> -Andre Granovsky -Andrea Denisse Gómez -Andrea Luzzardi -Andrea Turli -Andreas Elvers -Andreas Köhler -Andreas Savvides -Andreas Tiefenthaler -Andrei Gherzan -Andrei Ushakov -Andrei Vagin -Andrew C. Bodine -Andrew Clay Shafer -Andrew Duckworth -Andrew France -Andrew Gerrand -Andrew Guenther -Andrew He -Andrew Hsu -Andrew Kim -Andrew Kuklewicz -Andrew Macgregor -Andrew Macpherson -Andrew Martin -Andrew McDonnell -Andrew Munsell -Andrew Pennebaker -Andrew Po -Andrew Weiss -Andrew Williams -Andrews Medina -Andrey Kolomentsev -Andrey Petrov -Andrey Stolbovsky -André Martins -Andy Chambers -andy diller -Andy Goldstein -Andy Kipp -Andy Lindeman -Andy Rothfusz -Andy Smith -Andy Wilson -Andy Zhang -Anes Hasicic -Angel Velazquez -Anil Belur -Anil Madhavapeddy -Ankit Jain -Ankush Agarwal -Anonmily -Anran Qiao -Anshul Pundir -Anthon van der Neut -Anthony Baire -Anthony Bishopric -Anthony Dahanne -Anthony Sottile -Anton Löfgren -Anton Nikitin -Anton Polonskiy -Anton Tiurin -Antonio Murdaca -Antonis Kalipetis -Antony Messerli -Anuj Bahuguna -Anuj Varma -Anusha Ragunathan -Anyu Wang -apocas -Arash Deshmeh -arcosx -ArikaChen -Arko Dasgupta -Arnaud Lefebvre -Arnaud Porterie -Arnaud Rebillout -Artem Khramov -Arthur Barr -Arthur Gautier -Artur Meyster -Arun Gupta -Asad Saeeduddin -Asbjørn Enge -Austin Vazquez -averagehuman -Avi Das -Avi Kivity -Avi Miller -Avi Vaid -ayoshitake -Azat Khuyiyakhmetov -Bao Yonglei -Bardia Keyoumarsi -Barnaby Gray -Barry Allard -Bartłomiej Piotrowski -Bastiaan Bakker -Bastien Pascard -bdevloed -Bearice Ren -Ben Bonnefoy -Ben Firshman -Ben Golub -Ben Gould -Ben Hall -Ben Langfeld -Ben Sargent -Ben Severson -Ben Toews -Ben Wiklund -Benjamin Atkin -Benjamin Baker -Benjamin Boudreau -Benjamin Böhmke -Benjamin Wang -Benjamin Yolken -Benny Ng -Benoit Chesneau -Bernerd Schaefer -Bernhard M. Wiedemann -Bert Goethals -Bertrand Roussel -Bevisy Zhang -Bharath Thiruveedula -Bhiraj Butala -Bhumika Bayani -Bilal Amarni -Bill Wang -Billy Ridgway -Bily Zhang -Bin Liu -Bingshen Wang -Bjorn Neergaard -Blake Geno -Boaz Shuster -bobby abbott -Bojun Zhu -Boqin Qin -Boris Pruessmann -Boshi Lian -Bouke Haarsma -Boyd Hemphill -boynux -Bradley Cicenas -Bradley Wright -Brandon Liu -Brandon Philips -Brandon Rhodes -Brendan Dixon -Brent Salisbury -Brett Higgins -Brett Kochendorfer -Brett Milford -Brett Randall -Brian (bex) Exelbierd -Brian Bland -Brian DeHamer -Brian Dorsey -Brian Flad -Brian Goff -Brian McCallister -Brian Olsen -Brian Schwind -Brian Shumate -Brian Torres-Gil -Brian Trump -Brice Jaglin -Briehan Lombaard -Brielle Broder -Bruno Bigras -Bruno Binet -Bruno Gazzera -Bruno Renié -Bruno Tavares -Bryan Bess -Bryan Boreham -Bryan Matsuo -Bryan Murphy -Burke Libbey -Byung Kang -Caleb Spare -Calen Pennington -Cameron Boehmer -Cameron Sparr -Cameron Spear -Campbell Allen -Candid Dauth -Cao Weiwei -Carl Henrik Lunde -Carl Loa Odin -Carl X. Su -Carlo Mion -Carlos Alexandro Becker -Carlos de Paula -Carlos Sanchez -Carol Fager-Higgins -Cary -Casey Bisson -Catalin Pirvu -Ce Gao -Cedric Davies -Cezar Sa Espinola -Chad Swenson -Chance Zibolski -Chander Govindarajan -Chanhun Jeong -Chao Wang -Charles Chan -Charles Hooper -Charles Law -Charles Lindsay -Charles Merriam -Charles Sarrazin -Charles Smith -Charlie Drage -Charlie Lewis -Chase Bolt -ChaYoung You -Chee Hau Lim -Chen Chao -Chen Chuanliang -Chen Hanxiao -Chen Min -Chen Mingjie -Chen Qiu -Cheng-mean Liu -Chengfei Shang -Chengguang Xu -Chenyang Yan -chenyuzhu -Chetan Birajdar -Chewey -Chia-liang Kao -chli -Cholerae Hu -Chris Alfonso -Chris Armstrong -Chris Dias -Chris Dituri -Chris Fordham -Chris Gavin -Chris Gibson -Chris Khoo -Chris Kreussling (Flatbush Gardener) -Chris McKinnel -Chris McKinnel -Chris Price -Chris Seto -Chris Snow -Chris St. Pierre -Chris Stivers -Chris Swan -Chris Telfer -Chris Wahl -Chris Weyl -Chris White -Christian Becker -Christian Berendt -Christian Brauner -Christian Böhme -Christian Muehlhaeuser -Christian Persson -Christian Rotzoll -Christian Simon -Christian Stefanescu -Christoph Ziebuhr -Christophe Mehay -Christophe Troestler -Christophe Vidal -Christopher Biscardi -Christopher Crone -Christopher Currie -Christopher Jones -Christopher Latham -Christopher Rigor -Christy Norman -Chun Chen -Ciro S. Costa -Clayton Coleman -Clint Armstrong -Clinton Kitson -clubby789 -Cody Roseborough -Coenraad Loubser -Colin Dunklau -Colin Hebert -Colin Panisset -Colin Rice -Colin Walters -Collin Guarino -Colm Hally -companycy -Conor Evans -Corbin Coleman -Corey Farrell -Cory Forsyth -Cory Snider -cressie176 -Cristian Ariza -Cristian Staretu -cristiano balducci -Cristina Yenyxe Gonzalez Garcia -Cruceru Calin-Cristian -CUI Wei -cuishuang -Cuong Manh Le -Cyprian Gracz -Cyril F -Da McGrady -Daan van Berkel -Daehyeok Mun -Dafydd Crosby -dalanlan -Damian Smyth -Damien Nadé -Damien Nozay -Damjan Georgievski -Dan Anolik -Dan Buch -Dan Cotora -Dan Feldman -Dan Griffin -Dan Hirsch -Dan Keder -Dan Levy -Dan McPherson -Dan Plamadeala -Dan Stine -Dan Williams -Dani Hodovic -Dani Louca -Daniel Antlinger -Daniel Black -Daniel Dao -Daniel Exner -Daniel Farrell -Daniel Garcia -Daniel Gasienica -Daniel Grunwell -Daniel Helfand -Daniel Hiltgen -Daniel J Walsh -Daniel Menet -Daniel Mizyrycki -Daniel Nephin -Daniel Norberg -Daniel Nordberg -Daniel P. Berrangé -Daniel Robinson -Daniel S -Daniel Sweet -Daniel Von Fange -Daniel Watkins -Daniel X Moore -Daniel YC Lin -Daniel Zhang -Daniele Rondina -Danny Berger -Danny Milosavljevic -Danny Yates -Danyal Khaliq -Darren Coxall -Darren Shepherd -Darren Stahl -Dattatraya Kumbhar -Davanum Srinivas -Dave Barboza -Dave Goodchild -Dave Henderson -Dave MacDonald -Dave Tucker -David Anderson -David Bellotti -David Calavera -David Chung -David Corking -David Cramer -David Currie -David Davis -David Dooling -David Gageot -David Gebler -David Glasser -David Lawrence -David Lechner -David M. Karr -David Mackey -David Manouchehri -David Mat -David Mcanulty -David McKay -David O'Rourke -David P Hilton -David Pelaez -David R. Jenni -David Röthlisberger -David Sheets -David Sissitka -David Trott -David Wang <00107082@163.com> -David Williamson -David Xia -David Young -Davide Ceretti -Dawn Chen -dbdd -dcylabs -Debayan De -Deborah Gertrude Digges -deed02392 -Deep Debroy -Deng Guangxing -Deni Bertovic -Denis Defreyne -Denis Gladkikh -Denis Ollier -Dennis Chen -Dennis Chen -Dennis Docter -Derek -Derek -Derek Ch -Derek McGowan -Deric Crago -Deshi Xiao -Devon Estes -Devvyn Murphy -Dharmit Shah -Dhawal Yogesh Bhanushali -Dhilip Kumars -Diego Romero -Diego Siqueira -Dieter Reuter -Dillon Dixon -Dima Stopel -Dimitri John Ledkov -Dimitris Mandalidis -Dimitris Rozakis -Dimitry Andric -Dinesh Subhraveti -Ding Fei -dingwei -Diogo Monica -DiuDiugirl -Djibril Koné -Djordje Lukic -dkumor -Dmitri Logvinenko -Dmitri Shuralyov -Dmitry Demeshchuk -Dmitry Gusev -Dmitry Kononenko -Dmitry Sharshakov -Dmitry Shyshkin -Dmitry Smirnov -Dmitry V. Krivenok -Dmitry Vorobev -Dmytro Iakovliev -docker-unir[bot] -Dolph Mathews -Dominic Tubach -Dominic Yin -Dominik Dingel -Dominik Finkbeiner -Dominik Honnef -Don Kirkby -Don Kjer -Don Spaulding -Donald Huang -Dong Chen -Donghwa Kim -Donovan Jones -Doron Podoleanu -Doug Davis -Doug MacEachern -Doug Tangren -Douglas Curtis -Dr Nic Williams -dragon788 -Dražen Lučanin -Drew Erny -Drew Hubl -Dustin Sallings -Ed Costello -Edmund Wagner -Eiichi Tsukata -Eike Herzbach -Eivin Giske Skaaren -Eivind Uggedal -Elan Ruusamäe -Elango Sivanandam -Elena Morozova -Eli Uriegas -Elias Faxö -Elias Koromilas -Elias Probst -Elijah Zupancic -eluck -Elvir Kuric -Emil Davtyan -Emil Hernvall -Emily Maier -Emily Rose -Emir Ozer -Eng Zer Jun -Enguerran -Eohyung Lee -epeterso -er0k -Eric Barch -Eric Curtin -Eric G. Noriega -Eric Hanchrow -Eric Lee -Eric Mountain -Eric Myhre -Eric Paris -Eric Rafaloff -Eric Rosenberg -Eric Sage -Eric Soderstrom -Eric Yang -Eric-Olivier Lamey -Erica Windisch -Erich Cordoba -Erik Bray -Erik Dubbelboer -Erik Hollensbe -Erik Inge Bolsø -Erik Kristensen -Erik Sipsma -Erik St. Martin -Erik Weathers -Erno Hopearuoho -Erwin van der Koogh -Espen Suenson -Ethan Bell -Ethan Mosbaugh -Euan Harris -Euan Kemp -Eugen Krizo -Eugene Yakubovich -Evan Allrich -Evan Carmi -Evan Hazlett -Evan Krall -Evan Phoenix -Evan Wies -Evelyn Xu -Everett Toews -Evgeniy Makhrov -Evgeny Shmarnev -Evgeny Vereshchagin -Ewa Czechowska -Eystein Måløy Stenberg -ezbercih -Ezra Silvera -Fabian Kramm -Fabian Lauer -Fabian Raetz -Fabiano Rosas -Fabio Falci -Fabio Kung -Fabio Rapposelli -Fabio Rehm -Fabrizio Regini -Fabrizio Soppelsa -Faiz Khan -falmp -Fangming Fang -Fangyuan Gao <21551127@zju.edu.cn> -fanjiyun -Fareed Dudhia -Fathi Boudra -Federico Gimenez -Felipe Oliveira -Felipe Ruhland -Felix Abecassis -Felix Geisendörfer -Felix Hupfeld -Felix Rabe -Felix Ruess -Felix Schindler -Feng Yan -Fengtu Wang -Ferenc Szabo -Fernando -Fero Volar -Feroz Salam -Ferran Rodenas -Filipe Brandenburger -Filipe Oliveira -Flavio Castelli -Flavio Crisciani -Florian -Florian Klein -Florian Maier -Florian Noeding -Florian Schmaus -Florian Weingarten -Florin Asavoaie -Florin Patan -fonglh -Foysal Iqbal -Francesc Campoy -Francesco Degrassi -Francesco Mari -Francis Chuang -Francisco Carriedo -Francisco Souza -Frank Groeneveld -Frank Herrmann -Frank Macreery -Frank Rosquin -Frank Yang -Fred Lifton -Frederick F. Kautz IV -Frederico F. de Oliveira -Frederik Loeffert -Frederik Nordahl Jul Sabroe -Freek Kalter -Frieder Bluemle -frobnicaty <92033765+frobnicaty@users.noreply.github.com> -Frédéric Dalleau -Fu JinLin -Félix Baylac-Jacqué -Félix Cantournet -Gabe Rosenhouse -Gabor Nagy -Gabriel Adrian Samfira -Gabriel Goller -Gabriel L. Somlo -Gabriel Linder -Gabriel Monroy -Gabriel Nicolas Avellaneda -Gaetan de Villele -Galen Sampson -Gang Qiao -Gareth Rushgrove -Garrett Barboza -Gary Schaetz -Gaurav -Gaurav Singh -Gaël PORTAY -Genki Takiuchi -GennadySpb -Geoff Levand -Geoffrey Bachelet -Geon Kim -George Kontridze -George MacRorie -George Xie -Georgi Hristozov -Georgy Yakovlev -Gereon Frey -German DZ -Gert van Valkenhoef -Gerwim Feiken -Ghislain Bourgeois -Giampaolo Mancini -Gianluca Borello -Gildas Cuisinier -Giovan Isa Musthofa -gissehel -Giuseppe Mazzotta -Giuseppe Scrivano -Gleb Fotengauer-Malinovskiy -Gleb M Borisov -Glyn Normington -GoBella -Goffert van Gool -Goldwyn Rodrigues -Gopikannan Venugopalsamy -Gosuke Miyashita -Gou Rao -Govinda Fichtner -Grant Millar -Grant Reaber -Graydon Hoare -Greg Fausak -Greg Pflaum -Greg Stephens -Greg Thornton -Grzegorz Jaśkiewicz -Guilhem Lettron -Guilherme Salgado -Guillaume Dufour -Guillaume J. Charmes -Gunadhya S. <6939749+gunadhya@users.noreply.github.com> -Guoqiang QI -guoxiuyan -Guri -Gurjeet Singh -Guruprasad -Gustav Sinder -gwx296173 -Günter Zöchbauer -Haichao Yang -haikuoliu -haining.cao -Hakan Özler -Hamish Hutchings -Hannes Ljungberg -Hans Kristian Flaatten -Hans Rødtang -Hao Shu Wei -Hao Zhang <21521210@zju.edu.cn> -Harald Albers -Harald Niesche -Harley Laue -Harold Cooper -Harrison Turton -Harry Zhang -Harshal Patil -Harshal Patil -He Simei -He Xiaoxi -He Xin -heartlock <21521209@zju.edu.cn> -Hector Castro -Helen Xie -Henning Sprang -Hiroshi Hatake -Hiroyuki Sasagawa -Hobofan -Hollie Teal -Hong Xu -Hongbin Lu -Hongxu Jia -Honza Pokorny -Hsing-Hui Hsu -Hsing-Yu (David) Chen -hsinko <21551195@zju.edu.cn> -Hu Keping -Hu Tao -HuanHuan Ye -Huanzhong Zhang -Huayi Zhang -Hugo Barrera -Hugo Duncan -Hugo Marisco <0x6875676f@gmail.com> -Hui Kang -Hunter Blanks -huqun -Huu Nguyen -Hyeongkyu Lee -Hyzhou Zhy -Iago López Galeiras -Ian Bishop -Ian Bull -Ian Calvert -Ian Campbell -Ian Chen -Ian Lee -Ian Main -Ian Philpot -Ian Truslove -Iavael -Icaro Seara -Ignacio Capurro -Igor Dolzhikov -Igor Karpovich -Iliana Weller -Ilkka Laukkanen -Illia Antypenko -Illo Abdulrahim -Ilya Dmitrichenko -Ilya Gusev -Ilya Khlopotov -imre Fitos -inglesp -Ingo Gottwald -Innovimax -Isaac Dupree -Isabel Jimenez -Isaiah Grace -Isao Jonas -Iskander Sharipov -Ivan Babrou -Ivan Fraixedes -Ivan Grcic -Ivan Markin -J Bruni -J. Nunn -Jack Danger Canty -Jack Laxson -Jacob Atzen -Jacob Edelman -Jacob Tomlinson -Jacob Vallejo -Jacob Wen -Jaime Cepeda -Jaivish Kothari -Jake Champlin -Jake Moshenko -Jake Sanders -Jakub Drahos -Jakub Guzik -James Allen -James Carey -James Carr -James DeFelice -James Harrison Fisher -James Kyburz -James Kyle -James Lal -James Mills -James Nesbitt -James Nugent -James Sanders -James Turnbull -James Watkins-Harvey -Jamie Hannaford -Jamshid Afshar -Jan Breig -Jan Chren -Jan Garcia -Jan Götte -Jan Keromnes -Jan Koprowski -Jan Pazdziora -Jan Toebes -Jan-Gerd Tenberge -Jan-Jaap Driessen -Jana Radhakrishnan -Jannick Fahlbusch -Januar Wayong -Jared Biel -Jared Hocutt -Jaroslaw Zabiello -Jasmine Hegman -Jason A. Donenfeld -Jason Divock -Jason Giedymin -Jason Green -Jason Hall -Jason Heiss -Jason Livesay -Jason McVetta -Jason Plum -Jason Shepherd -Jason Smith -Jason Sommer -Jason Stangroome -Javier Bassi -jaxgeller -Jay -Jay Kamat -Jay Lim -Jean Rouge -Jean-Baptiste Barth -Jean-Baptiste Dalido -Jean-Christophe Berthon -Jean-Paul Calderone -Jean-Pierre Huynh -Jean-Tiare Le Bigot -Jeeva S. Chelladhurai -Jeff Anderson -Jeff Hajewski -Jeff Johnston -Jeff Lindsay -Jeff Mickey -Jeff Minard -Jeff Nickoloff -Jeff Silberman -Jeff Welch -Jeff Zvier -Jeffrey Bolle -Jeffrey Morgan -Jeffrey van Gogh -Jenny Gebske -Jeremy Chambers -Jeremy Grosser -Jeremy Huntwork -Jeremy Price -Jeremy Qian -Jeremy Unruh -Jeremy Yallop -Jeroen Franse -Jeroen Jacobs -Jesse Dearing -Jesse Dubay -Jessica Frazelle -Jezeniel Zapanta -Jhon Honce -Ji.Zhilong -Jian Liao -Jian Zhang -Jiang Jinyang -Jianyong Wu -Jie Luo -Jie Ma -Jihyun Hwang -Jilles Oldenbeuving -Jim Alateras -Jim Carroll -Jim Ehrismann -Jim Galasyn -Jim Lin -Jim Minter -Jim Perrin -Jimmy Cuadra -Jimmy Puckett -Jimmy Song -Jinsoo Park -Jintao Zhang -Jiri Appl -Jiri Popelka -Jiuyue Ma -Jiří Župka -Joakim Roubert -Joao Fernandes -Joao Trindade -Joe Beda -Joe Doliner -Joe Ferguson -Joe Gordon -Joe Shaw -Joe Van Dyk -Joel Friedly -Joel Handwell -Joel Hansson -Joel Wurtz -Joey Geiger -Joey Geiger -Joey Gibson -Joffrey F -Johan Euphrosine -Johan Rydberg -Johanan Lieberman -Johannes 'fish' Ziemke -John Costa -John Feminella -John Gardiner Myers -John Gossman -John Harris -John Howard -John Laswell -John Maguire -John Mulhausen -John OBrien III -John Starks -John Stephens -John Tims -John V. Martinez -John Warwick -John Willis -Jon Johnson -Jon Surrell -Jon Wedaman -Jonas Dohse -Jonas Heinrich -Jonas Pfenniger -Jonathan A. Schweder -Jonathan A. Sternberg -Jonathan Boulle -Jonathan Camp -Jonathan Choy -Jonathan Dowland -Jonathan Lebon -Jonathan Lomas -Jonathan McCrohan -Jonathan Mueller -Jonathan Pares -Jonathan Rudenberg -Jonathan Stoppani -Jonh Wendell -Joni Sar -Joost Cassee -Jordan Arentsen -Jordan Jennings -Jordan Sissel -Jordi Massaguer Pla -Jorge Marin -Jorit Kleine-Möllhoff -Jose Diaz-Gonzalez -Joseph Anthony Pasquale Holsten -Joseph Hager -Joseph Kern -Joseph Rothrock -Josh -Josh Bodah -Josh Bonczkowski -Josh Chorlton -Josh Eveleth -Josh Hawn -Josh Horwitz -Josh Poimboeuf -Josh Soref -Josh Wilson -Josiah Kiehl -José Tomás Albornoz -Joyce Jang -JP -Julian Taylor -Julien Barbier -Julien Bisconti -Julien Bordellier -Julien Dubois -Julien Kassar -Julien Maitrehenry -Julien Pervillé -Julien Pivotto -Julio Guerra -Julio Montes -Jun Du -Jun-Ru Chang -junxu -Jussi Nummelin -Justas Brazauskas -Justen Martin -Justin Cormack -Justin Force -Justin Keller <85903732+jk-vb@users.noreply.github.com> -Justin Menga -Justin Plock -Justin Simonelis -Justin Terry -Justyn Temme -Jyrki Puttonen -Jérémy Leherpeur -Jérôme Petazzoni -Jörg Thalheim -K. Heller -Kai Blin -Kai Qiang Wu (Kennan) -Kaijie Chen -Kamil Domański -Kamjar Gerami -Kanstantsin Shautsou -Kara Alexandra -Karan Lyons -Kareem Khazem -kargakis -Karl Grzeszczak -Karol Duleba -Karthik Karanth -Karthik Nayak -Kasper Fabæch Brandt -Kate Heddleston -Katie McLaughlin -Kato Kazuyoshi -Katrina Owen -Kawsar Saiyeed -Kay Yan -kayrus -Kazuhiro Sera -Kazuyoshi Kato -Ke Li -Ke Xu -Kei Ohmura -Keith Hudgins -Keli Hu -Ken Cochrane -Ken Herner -Ken ICHIKAWA -Ken Reese -Kenfe-Mickaël Laventure -Kenjiro Nakayama -Kent Johnson -Kenta Tada -Kevin "qwazerty" Houdebert -Kevin Alvarez -Kevin Burke -Kevin Clark -Kevin Feyrer -Kevin J. Lynagh -Kevin Jing Qiu -Kevin Kern -Kevin Menard -Kevin Meredith -Kevin P. Kucharczyk -Kevin Parsons -Kevin Richardson -Kevin Shi -Kevin Wallace -Kevin Yap -Keyvan Fatehi -kies -Kim BKC Carlbacker -Kim Eik -Kimbro Staken -Kir Kolyshkin -Kiran Gangadharan -Kirill SIbirev -Kirk Easterson -knappe -Kohei Tsuruta -Koichi Shiraishi -Konrad Kleine -Konrad Ponichtera -Konstantin Gribov -Konstantin L -Konstantin Pelykh -Kostadin Plachkov -Krasi Georgiev -Krasimir Georgiev -Kris-Mikael Krister -Kristian Haugene -Kristina Zabunova -Krystian Wojcicki -Kunal Kushwaha -Kunal Tyagi -Kyle Conroy -Kyle Linden -Kyle Squizzato -Kyle Wuolle -kyu -Lachlan Coote -Lai Jiangshan -Lajos Papp -Lakshan Perera -Lalatendu Mohanty -Lance Chen -Lance Kinley -Lars Butler -Lars Kellogg-Stedman -Lars R. Damerow -Lars-Magnus Skog -Laszlo Meszaros -Laura Brehm -Laura Frank -Laurent Bernaille -Laurent Erignoux -Laurie Voss -Leandro Motta Barros -Leandro Siqueira -Lee Calcote -Lee Chao <932819864@qq.com> -Lee, Meng-Han -Lei Gong -Lei Jitang -Leiiwang -Len Weincier -Lennie -Leo Gallucci -Leonardo Nodari -Leonardo Taccari -Leszek Kowalski -Levi Blackstone -Levi Gross -Levi Harrison -Lewis Daly -Lewis Marshall -Lewis Peckover -Li Yi -Liam Macgillavry -Liana Lo -Liang Mingqiang -Liang-Chi Hsieh -liangwei -Liao Qingwei -Lifubang -Lihua Tang -Lily Guo -limeidan -Lin Lu -LingFaKe -Linus Heckemann -Liran Tal -Liron Levin -Liu Bo -Liu Hua -liwenqi -lixiaobing10051267 -Liz Zhang -LIZAO LI -Lizzie Dixon <_@lizzie.io> -Lloyd Dewolf -Lokesh Mandvekar -longliqiang88 <394564827@qq.com> -Lorenz Leutgeb -Lorenzo Fontana -Lotus Fenn -Louis Delossantos -Louis Opter -Luca Favatella -Luca Marturana -Luca Orlandi -Luca-Bogdan Grigorescu -Lucas Chan -Lucas Chi -Lucas Molas -Lucas Silvestre -Luciano Mores -Luis Henrique Mulinari -Luis Martínez de Bartolomé Izquierdo -Luiz Svoboda -Lukas Heeren -Lukas Waslowski -lukaspustina -Lukasz Zajaczkowski -Luke Marsden -Lyn -Lynda O'Leary -Lénaïc Huard -Ma Müller -Ma Shimiao -Mabin -Madhan Raj Mookkandy -Madhav Puri -Madhu Venugopal -Mageee -Mahesh Tiyyagura -malnick -Malte Janduda -Manfred Touron -Manfred Zabarauskas -Manjunath A Kumatagi -Mansi Nahar -Manuel Meurer -Manuel Rüger -Manuel Woelker -mapk0y -Marc Abramowitz -Marc Kuo -Marc Tamsky -Marcel Edmund Franke -Marcelo Horacio Fortino -Marcelo Salazar -Marco Hennings -Marcus Cobden -Marcus Farkas -Marcus Linke -Marcus Martins -Marcus Ramberg -Marek Goldmann -Marian Marinov -Marianna Tessel -Mario Loriedo -Marius Gundersen -Marius Sturm -Marius Voila -Mark Allen -Mark Feit -Mark Jeromin -Mark McGranaghan -Mark McKinstry -Mark Milstein -Mark Oates -Mark Parker -Mark Vainomaa -Mark West -Markan Patel -Marko Mikulicic -Marko Tibold -Markus Fix -Markus Kortlang -Martijn Dwars -Martijn van Oosterhout -Martin Braun -Martin Dojcak -Martin Honermeyer -Martin Kelly -Martin Mosegaard Amdisen -Martin Muzatko -Martin Redmond -Maru Newby -Mary Anthony -Masahito Zembutsu -Masato Ohba -Masayuki Morita -Mason Malone -Mateusz Sulima -Mathias Monnerville -Mathieu Champlon -Mathieu Le Marec - Pasquet -Mathieu Parent -Mathieu Paturel -Matt Apperson -Matt Bachmann -Matt Bajor -Matt Bentley -Matt Haggard -Matt Hoyle -Matt McCormick -Matt Moore -Matt Morrison <3maven@gmail.com> -Matt Richardson -Matt Rickard -Matt Robenolt -Matt Schurenko -Matt Williams -Matthew Heon -Matthew Lapworth -Matthew Mayer -Matthew Mosesohn -Matthew Mueller -Matthew Riley -Matthias Klumpp -Matthias Kühnle -Matthias Rampke -Matthieu Fronton -Matthieu Hauglustaine -Mattias Jernberg -Mauricio Garavaglia -mauriyouth -Max Harmathy -Max Shytikov -Max Timchenko -Maxim Fedchyshyn -Maxim Ivanov -Maxim Kulkin -Maxim Treskin -Maxime Petazzoni -Maximiliano Maccanti -Maxwell -Meaglith Ma -meejah -Megan Kostick -Mehul Kar -Mei ChunTao -Mengdi Gao -Menghui Chen -Mert Yazıcıoğlu -mgniu -Micah Zoltu -Michael A. Smith -Michael Beskin -Michael Bridgen -Michael Brown -Michael Chiang -Michael Crosby -Michael Currie -Michael Friis -Michael Gorsuch -Michael Grauer -Michael Holzheu -Michael Hudson-Doyle -Michael Huettermann -Michael Irwin -Michael Kuehn -Michael Käufl -Michael Neale -Michael Nussbaum -Michael Prokop -Michael Scharf -Michael Spetsiotis -Michael Stapelberg -Michael Steinert -Michael Thies -Michael Weidmann -Michael West -Michael Zhao -Michal Fojtik -Michal Gebauer -Michal Jemala -Michal Kostrzewa -Michal Minář -Michal Rostecki -Michal Wieczorek -Michaël Pailloncy -Michał Czeraszkiewicz -Michał Gryko -Michał Kosek -Michiel de Jong -Mickaël Fortunato -Mickaël Remars -Miguel Angel Fernández -Miguel Morales -Miguel Perez -Mihai Borobocea -Mihuleacc Sergiu -Mikael Davranche -Mike Brown -Mike Bush -Mike Casas -Mike Chelen -Mike Danese -Mike Dillon -Mike Dougherty -Mike Estes -Mike Gaffney -Mike Goelzer -Mike Leone -Mike Lundy -Mike MacCana -Mike Naberezny -Mike Snitzer -mikelinjie <294893458@qq.com> -Mikhail Sobolev -Miklos Szegedi -Milas Bowman -Milind Chawre -Miloslav Trmač -mingqing -Mingzhen Feng -Misty Stanley-Jones -Mitch Capper -Mizuki Urushida -mlarcher -Mohammad Banikazemi -Mohammad Nasirifar -Mohammed Aaqib Ansari -Mohit Soni -Moorthy RS -Morgan Bauer -Morgante Pell -Morgy93 -Morten Siebuhr -Morton Fox -Moysés Borges -mrfly -Mrunal Patel -Muayyad Alsadi -Muhammad Zohaib Aslam -Mustafa Akın -Muthukumar R -Máximo Cuadros -Médi-Rémi Hashim -Nace Oroz -Nahum Shalman -Nakul Pathak -Nalin Dahyabhai -Nan Monnand Deng -Naoki Orii -Natalie Parker -Natanael Copa -Natasha Jarus -Nate Brennand -Nate Eagleson -Nate Jones -Nathan Carlson -Nathan Herald -Nathan Hsieh -Nathan Kleyn -Nathan LeClaire -Nathan McCauley -Nathan Williams -Naveed Jamil -Neal McBurnett -Neil Horman -Neil Peterson -Nelson Chen -Neyazul Haque -Nghia Tran -Niall O'Higgins -Nicholas E. Rabenau -Nick Adcock -Nick DeCoursin -Nick Irvine -Nick Neisen -Nick Parker -Nick Payne -Nick Russo -Nick Santos -Nick Stenning -Nick Stinemates -Nick Wood -NickrenREN -Nicola Kabar -Nicolas Borboën -Nicolas De Loof -Nicolas Dudebout -Nicolas Goy -Nicolas Kaiser -Nicolas Sterchele -Nicolas V Castet -Nicolás Hock Isaza -Niel Drummond -Nigel Poulton -Nik Nyby -Nikhil Chawla -NikolaMandic -Nikolas Garofil -Nikolay Edigaryev -Nikolay Milovanov -ningmingxiao -Nirmal Mehta -Nishant Totla -NIWA Hideyuki -Noah Meyerhans -Noah Treuhaft -NobodyOnSE -noducks -Nolan Darilek -Noriki Nakamura -nponeccop -Nurahmadie -Nuutti Kotivuori -nzwsch -O.S. Tezer -objectified -Odin Ugedal -Oguz Bilgic -Oh Jinkyun -Ohad Schneider -ohmystack -Ole Reifschneider -Oliver Neal -Oliver Reason -Olivier Gambier -Olle Jonsson -Olli Janatuinen -Olly Pomeroy -Omri Shiv -Onur Filiz -Oriol Francès -Oscar Bonilla <6f6231@gmail.com> -oscar.chen <2972789494@qq.com> -Oskar Niburski -Otto Kekäläinen -Ouyang Liduo -Ovidio Mallo -Panagiotis Moustafellos -Paolo G. Giarrusso -Pascal -Pascal Bach -Pascal Borreli -Pascal Hartig -Patrick Böänziger -Patrick Devine -Patrick Haas -Patrick Hemmer -Patrick Stapleton -Patrik Cyvoct -pattichen -Paul "TBBle" Hampson -Paul -paul -Paul Annesley -Paul Bellamy -Paul Bowsher -Paul Furtado -Paul Hammond -Paul Jimenez -Paul Kehrer -Paul Lietar -Paul Liljenberg -Paul Morie -Paul Nasrat -Paul Weaver -Paulo Gomes -Paulo Ribeiro -Pavel Lobashov -Pavel Matěja -Pavel Pletenev -Pavel Pospisil -Pavel Sutyrin -Pavel Tikhomirov -Pavlos Ratis -Pavol Vargovcik -Pawel Konczalski -Paweł Gronowski -Peeyush Gupta -Peggy Li -Pei Su -Peng Tao -Penghan Wang -Per Weijnitz -perhapszzy@sina.com -Pete Woods -Peter Bourgon -Peter Braden -Peter Bücker -Peter Choi -Peter Dave Hello -Peter Edge -Peter Ericson -Peter Esbensen -Peter Jaffe -Peter Kang -Peter Malmgren -Peter Salvatore -Peter Volpe -Peter Waller -Petr Švihlík -Petros Angelatos -Phil -Phil Estes -Phil Sphicas -Phil Spitler -Philip Alexander Etling -Philip Monroe -Philipp Gillé -Philipp Wahala -Philipp Weissensteiner -Phillip Alexander -phineas -pidster -Piergiuliano Bossi -Pierre -Pierre Carrier -Pierre Dal-Pra -Pierre Wacrenier -Pierre-Alain RIVIERE -Piotr Bogdan -Piotr Karbowski -Porjo -Poul Kjeldager Sørensen -Pradeep Chhetri -Pradip Dhara -Pradipta Kr. Banerjee -Prasanna Gautam -Pratik Karki -Prayag Verma -Priya Wadhwa -Projjol Banerji -Przemek Hejman -Puneet Pruthi -Pure White -pysqz -Qiang Huang -Qin TianHuan -Qinglan Peng -Quan Tian -qudongfang -Quentin Brossard -Quentin Perez -Quentin Tayssier -r0n22 -Radostin Stoyanov -Rafal Jeczalik -Rafe Colton -Raghavendra K T -Raghuram Devarakonda -Raja Sami -Rajat Pandit -Rajdeep Dua -Ralf Sippl -Ralle -Ralph Bean -Ramkumar Ramachandra -Ramon Brooker -Ramon van Alteren -RaviTeja Pothana -Ray Tsang -ReadmeCritic -realityone -Recursive Madman -Reficul -Regan McCooey -Remi Rampin -Remy Suen -Renato Riccieri Santos Zannon -Renaud Gaubert -Rhys Hiltner -Ri Xu -Ricardo N Feliciano -Rich Horwood -Rich Moyse -Rich Seymour -Richard Burnison -Richard Harvey -Richard Mathie -Richard Metzler -Richard Scothern -Richo Healey -Rick Bradley -Rick van de Loo -Rick Wieman -Rik Nijessen -Riku Voipio -Riley Guerin -Ritesh H Shukla -Riyaz Faizullabhoy -Rob Cowsill <42620235+rcowsill@users.noreply.github.com> -Rob Gulewich -Rob Vesse -Robert Bachmann -Robert Bittle -Robert Obryk -Robert Schneider -Robert Shade -Robert Stern -Robert Terhaar -Robert Wallis -Robert Wang -Roberto G. Hashioka -Roberto Muñoz Fernández -Robin Naundorf -Robin Schneider -Robin Speekenbrink -Robin Thoni -robpc -Rodolfo Carvalho -Rodrigo Campos -Rodrigo Vaz -Roel Van Nyen -Roger Peppe -Rohit Jnagal -Rohit Kadam -Rohit Kapur -Rojin George -Roland Huß -Roland Kammerer -Roland Moriz -Roma Sokolov -Roman Dudin -Roman Mazur -Roman Strashkin -Roman Volosatovs -Roman Zabaluev -Ron Smits -Ron Williams -Rong Gao -Rong Zhang -Rongxiang Song -Rony Weng -root -root -root -root -Rory Hunter -Rory McCune -Ross Boucher -Rovanion Luckey -Roy Reznik -Royce Remer -Rozhnov Alexandr -Rudolph Gottesheim -Rui Cao -Rui Lopes -Ruilin Li -Runshen Zhu -Russ Magee -Ryan Abrams -Ryan Anderson -Ryan Aslett -Ryan Barry -Ryan Belgrave -Ryan Campbell -Ryan Detzel -Ryan Fowler -Ryan Liu -Ryan McLaughlin -Ryan O'Donnell -Ryan Seto -Ryan Shea -Ryan Simmen -Ryan Stelly -Ryan Thomas -Ryan Trauntvein -Ryan Wallner -Ryan Zhang -ryancooper7 -RyanDeng -Ryo Nakao -Ryoga Saito -Rémy Greinhofer -s. rannou -Sabin Basyal -Sachin Joshi -Sagar Hani -Sainath Grandhi -Sakeven Jiang -Salahuddin Khan -Sally O'Malley -Sam Abed -Sam Alba -Sam Bailey -Sam J Sharpe -Sam Neirinck -Sam Reis -Sam Rijs -Sam Whited -Sambuddha Basu -Sami Wagiaalla -Samuel Andaya -Samuel Dion-Girardeau -Samuel Karp -Samuel PHAN -sanchayanghosh -Sandeep Bansal -Sankar சங்கர் -Sanket Saurav -Santhosh Manohar -sapphiredev -Sargun Dhillon -Sascha Andres -Sascha Grunert -SataQiu -Satnam Singh -Satoshi Amemiya -Satoshi Tagomori -Scott Bessler -Scott Collier -Scott Johnston -Scott Percival -Scott Stamp -Scott Walls -sdreyesg -Sean Christopherson -Sean Cronin -Sean Lee -Sean McIntyre -Sean OMeara -Sean P. Kane -Sean Rodman -Sebastiaan van Steenis -Sebastiaan van Stijn -Sebastian Höffner -Sebastian Radloff -Sebastien Goasguen -Senthil Kumar Selvaraj -Senthil Kumaran -SeongJae Park -Seongyeol Lim -Serge Hallyn -Sergey Alekseev -Sergey Evstifeev -Sergii Kabashniuk -Sergio Lopez -Serhat Gülçiçek -SeungUkLee -Sevki Hasirci -Shane Canon -Shane da Silva -Shaun Kaasten -shaunol -Shawn Landden -Shawn Siefkas -shawnhe -Shayan Pooya -Shayne Wang -Shekhar Gulati -Sheng Yang -Shengbo Song -Shengjing Zhu -Shev Yan -Shih-Yuan Lee -Shihao Xia -Shijiang Wei -Shijun Qin -Shishir Mahajan -Shoubhik Bose -Shourya Sarcar -Shu-Wai Chow -shuai-z -Shukui Yang -Sian Lerk Lau -Siarhei Rasiukevich -Sidhartha Mani -sidharthamani -Silas Sewell -Silvan Jegen -Simão Reis -Simon Barendse -Simon Eskildsen -Simon Ferquel -Simon Leinen -Simon Menke -Simon Taranto -Simon Vikstrom -Sindhu S -Sjoerd Langkemper -skanehira -Smark Meng -Solganik Alexander -Solomon Hykes -Song Gao -Soshi Katsuta -Sotiris Salloumis -Soulou -Spencer Brown -Spencer Smith -Spike Curtis -Sridatta Thatipamala -Sridhar Ratnakumar -Srini Brahmaroutu -Srinivasan Srivatsan -Staf Wagemakers -Stanislav Bondarenko -Stanislav Levin -Steeve Morin -Stefan Berger -Stefan J. Wernli -Stefan Praszalowicz -Stefan S. -Stefan Scherer -Stefan Staudenmeyer -Stefan Weil -Steffen Butzer -Stephan Spindler -Stephen Benjamin -Stephen Crosby -Stephen Day -Stephen Drake -Stephen Rust -Steve Desmond -Steve Dougherty -Steve Durrheimer -Steve Francia -Steve Koch -Steven Burgess -Steven Erenst -Steven Hartland -Steven Iveson -Steven Merrill -Steven Richards -Steven Taylor -Stéphane Este-Gracias -Stig Larsson -Su Wang -Subhajit Ghosh -Sujith Haridasan -Sun Gengze <690388648@qq.com> -Sun Jianbo -Sune Keller -Sunny Gogoi -Suryakumar Sudar -Sven Dowideit -Swapnil Daingade -Sylvain Baubeau -Sylvain Bellemare -Sébastien -Sébastien HOUZÉ -Sébastien Luttringer -Sébastien Stormacq -Sören Tempel -Tabakhase -Tadej Janež -Takuto Sato -tang0th -Tangi Colin -Tatsuki Sugiura -Tatsushi Inagaki -Taylan Isikdemir -Taylor Jones -Ted M. Young -Tehmasp Chaudhri -Tejaswini Duggaraju -Tejesh Mehta -Terry Chu -terryding77 <550147740@qq.com> -Thatcher Peskens -theadactyl -Thell 'Bo' Fowler -Thermionix -Thiago Alves Silva -Thijs Terlouw -Thomas Bikeev -Thomas Frössman -Thomas Gazagnaire -Thomas Graf -Thomas Grainger -Thomas Hansen -Thomas Ledos -Thomas Leonard -Thomas Léveil -Thomas Orozco -Thomas Riccardi -Thomas Schroeter -Thomas Sjögren -Thomas Swift -Thomas Tanaka -Thomas Texier -Ti Zhou -Tiago Seabra -Tianon Gravi -Tianyi Wang -Tibor Vass -Tiffany Jernigan -Tiffany Low -Till Claassen -Till Wegmüller -Tim -Tim Bart -Tim Bosse -Tim Dettrick -Tim Düsterhus -Tim Hockin -Tim Potter -Tim Ruffles -Tim Smith -Tim Terhorst -Tim Wagner -Tim Wang -Tim Waugh -Tim Wraight -Tim Zju <21651152@zju.edu.cn> -timchenxiaoyu <837829664@qq.com> -timfeirg -Timo Rothenpieler -Timothy Hobbs -tjwebb123 -tobe -Tobias Bieniek -Tobias Bradtke -Tobias Gesellchen -Tobias Klauser -Tobias Munk -Tobias Pfandzelter -Tobias Schmidt -Tobias Schwab -Todd Crane -Todd Lunter -Todd Whiteman -Toli Kuznets -Tom Barlow -Tom Booth -Tom Denham -Tom Fotherby -Tom Howe -Tom Hulihan -Tom Maaswinkel -Tom Parker -Tom Sweeney -Tom Wilkie -Tom X. Tobin -Tom Zhao -Tomas Janousek -Tomas Kral -Tomas Tomecek -Tomasz Kopczynski -Tomasz Lipinski -Tomasz Nurkiewicz -Tomek Mańko -Tommaso Visconti -Tomoya Tabuchi -Tomáš Hrčka -tonic -Tonny Xu -Tony Abboud -Tony Daws -Tony Miller -toogley -Torstein Husebø -Toshiaki Makita -Tõnis Tiigi -Trace Andreason -tracylihui <793912329@qq.com> -Trapier Marshall -Travis Cline -Travis Thieman -Trent Ogren -Trevor -Trevor Pounds -Trevor Sullivan -Trishna Guha -Tristan Carel -Troy Denton -Tudor Brindus -Ty Alexander -Tycho Andersen -Tyler Brock -Tyler Brown -Tzu-Jung Lee -uhayate -Ulysse Carion -Umesh Yadav -Utz Bacher -vagrant -Vaidas Jablonskis -Valentin Kulesh -vanderliang -Velko Ivanov -Veres Lajos -Victor Algaze -Victor Coisne -Victor Costan -Victor I. Wood -Victor Lyuboslavsky -Victor Marmol -Victor Palma -Victor Vieux -Victoria Bialas -Vijaya Kumar K -Vikas Choudhary -Vikram bir Singh -Viktor Stanchev -Viktor Vojnovski -VinayRaghavanKS -Vincent Batts -Vincent Bernat -Vincent Boulineau -Vincent Demeester -Vincent Giersch -Vincent Mayers -Vincent Woo -Vinod Kulkarni -Vishal Doshi -Vishnu Kannan -Vitaly Ostrosablin -Vitor Monteiro -Vivek Agarwal -Vivek Dasgupta -Vivek Goyal -Vladimir Bulyga -Vladimir Kirillov -Vladimir Pouzanov -Vladimir Rutsky -Vladimir Varankin -VladimirAus -Vladislav Kolesnikov -Vlastimil Zeman -Vojtech Vitek (V-Teq) -Walter Leibbrandt -Walter Stanish -Wang Chao -Wang Guoliang -Wang Jie -Wang Long -Wang Ping -Wang Xing -Wang Yuexiao -Wang Yumu <37442693@qq.com> -wanghuaiqing -Ward Vandewege -WarheadsSE -Wassim Dhif -Wataru Ishida -Wayne Chang -Wayne Song -Weerasak Chongnguluam -Wei Fu -Wei Wu -Wei-Ting Kuo -weipeng -weiyan -Weiyang Zhu -Wen Cheng Ma -Wendel Fleming -Wenjun Tang -Wenkai Yin -wenlxie -Wenxuan Zhao -Wenyu You <21551128@zju.edu.cn> -Wenzhi Liang -Wes Morgan -Wewang Xiaorenfine -Wiktor Kwapisiewicz -Will Dietz -Will Rouesnel -Will Weaver -willhf -William Delanoue -William Henry -William Hubbs -William Martin -William Riancho -William Thurston -Wilson Júnior -Wing-Kam Wong -WiseTrem -Wolfgang Nagele -Wolfgang Powisch -Wonjun Kim -WuLonghui -xamyzhao -Xia Wu -Xian Chaobo -Xianglin Gao -Xianjie -Xianlu Bird -Xiao YongBiao -Xiao Zhang -XiaoBing Jiang -Xiaodong Liu -Xiaodong Zhang -Xiaohua Ding -Xiaoxi He -Xiaoxu Chen -Xiaoyu Zhang -xichengliudui <1693291525@qq.com> -xiekeyang -Ximo Guanter Gonzálbez -xin.li -Xinbo Weng -Xinfeng Liu -Xinzi Zhou -Xiuming Chen -Xuecong Liao -xuzhaokui -Yadnyawalkya Tale -Yahya -yalpul -YAMADA Tsuyoshi -Yamasaki Masahide -Yamazaki Masashi -Yan Feng -Yan Zhu -Yang Bai -Yang Li -Yang Pengfei -yangchenliang -Yann Autissier -Yanqiang Miao -Yao Zaiyong -Yash Murty -Yassine Tijani -Yasunori Mahata -Yazhong Liu -Yestin Sun -Yi EungJun -Yibai Zhang -Yihang Ho -Ying Li -Yohei Ueda -Yong Tang -Yongxin Li -Yongzhi Pan -Yosef Fertel -You-Sheng Yang (楊有勝) -youcai -Youcef YEKHLEF -Youfu Zhang -Yu Changchun -Yu Chengxia -Yu Peng -Yu-Ju Hong -Yuan Sun -Yuanhong Peng -Yue Zhang -Yufei Xiong -Yuhao Fang -Yuichiro Kaneko -YujiOshima -Yunxiang Huang -Yurii Rashkovskii -Yusuf Tarık Günaydın -Yves Blusseau <90z7oey02@sneakemail.com> -Yves Junqueira -Zac Dover -Zach Borboa -Zach Gershman -Zachary Jaffee -Zain Memon -Zaiste! -Zane DeGraffenried -Zefan Li -Zen Lin(Zhinan Lin) -Zhang Kun -Zhang Wei -Zhang Wentao -ZhangHang -zhangxianwei -Zhenan Ye <21551168@zju.edu.cn> -zhenghenghuo -Zhenhai Gao -Zhenkun Bi -ZhiPeng Lu -zhipengzuo -Zhou Hao -Zhoulin Xie -Zhu Guihua -Zhu Kunjia -Zhuoyun Wei -Ziheng Liu -Zilin Du -zimbatm -Ziming Dong -ZJUshuaizhou <21551191@zju.edu.cn> -zmarouf -Zoltan Tombol -Zou Yu -zqh -Zuhayr Elahi -Zunayed Ali -Álvaro Lázaro -Átila Camurça Alves -尹吉峰 -屈骏 -徐俊杰 -慕陶 -搏通 -黄艳红00139573 -정재영 diff --git a/vendor/github.com/docker/docker/LICENSE b/vendor/github.com/docker/docker/LICENSE deleted file mode 100644 index 6d8d58fb..00000000 --- a/vendor/github.com/docker/docker/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - https://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 - - Copyright 2013-2018 Docker, Inc. - - 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 - - https://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/docker/docker/NOTICE b/vendor/github.com/docker/docker/NOTICE deleted file mode 100644 index 58b19b6d..00000000 --- a/vendor/github.com/docker/docker/NOTICE +++ /dev/null @@ -1,19 +0,0 @@ -Docker -Copyright 2012-2017 Docker, Inc. - -This product includes software developed at Docker, Inc. (https://www.docker.com). - -This product contains software (https://github.com/creack/pty) developed -by Keith Rarick, licensed under the MIT License. - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see https://www.bis.doc.gov - -See also https://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go deleted file mode 100644 index ded1c7c8..00000000 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_linux.go +++ /dev/null @@ -1,105 +0,0 @@ -package homedir // import "github.com/docker/docker/pkg/homedir" - -import ( - "errors" - "os" - "path/filepath" - "strings" -) - -// GetRuntimeDir returns XDG_RUNTIME_DIR. -// XDG_RUNTIME_DIR is typically configured via pam_systemd. -// GetRuntimeDir returns non-nil error if XDG_RUNTIME_DIR is not set. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func GetRuntimeDir() (string, error) { - if xdgRuntimeDir := os.Getenv("XDG_RUNTIME_DIR"); xdgRuntimeDir != "" { - return xdgRuntimeDir, nil - } - return "", errors.New("could not get XDG_RUNTIME_DIR") -} - -// StickRuntimeDirContents sets the sticky bit on files that are under -// XDG_RUNTIME_DIR, so that the files won't be periodically removed by the system. -// -// StickyRuntimeDir returns slice of sticked files. -// StickyRuntimeDir returns nil error if XDG_RUNTIME_DIR is not set. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func StickRuntimeDirContents(files []string) ([]string, error) { - runtimeDir, err := GetRuntimeDir() - if err != nil { - // ignore error if runtimeDir is empty - return nil, nil - } - runtimeDir, err = filepath.Abs(runtimeDir) - if err != nil { - return nil, err - } - var sticked []string - for _, f := range files { - f, err = filepath.Abs(f) - if err != nil { - return sticked, err - } - if strings.HasPrefix(f, runtimeDir+"/") { - if err = stick(f); err != nil { - return sticked, err - } - sticked = append(sticked, f) - } - } - return sticked, nil -} - -func stick(f string) error { - st, err := os.Stat(f) - if err != nil { - return err - } - m := st.Mode() - m |= os.ModeSticky - return os.Chmod(f, m) -} - -// GetDataHome returns XDG_DATA_HOME. -// GetDataHome returns $HOME/.local/share and nil error if XDG_DATA_HOME is not set. -// If HOME and XDG_DATA_HOME are not set, getpwent(3) is consulted to determine the users home directory. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func GetDataHome() (string, error) { - if xdgDataHome := os.Getenv("XDG_DATA_HOME"); xdgDataHome != "" { - return xdgDataHome, nil - } - home := Get() - if home == "" { - return "", errors.New("could not get either XDG_DATA_HOME or HOME") - } - return filepath.Join(home, ".local", "share"), nil -} - -// GetConfigHome returns XDG_CONFIG_HOME. -// GetConfigHome returns $HOME/.config and nil error if XDG_CONFIG_HOME is not set. -// If HOME and XDG_CONFIG_HOME are not set, getpwent(3) is consulted to determine the users home directory. -// -// See also https://standards.freedesktop.org/basedir-spec/latest/ar01s03.html -func GetConfigHome() (string, error) { - if xdgConfigHome := os.Getenv("XDG_CONFIG_HOME"); xdgConfigHome != "" { - return xdgConfigHome, nil - } - home := Get() - if home == "" { - return "", errors.New("could not get either XDG_CONFIG_HOME or HOME") - } - return filepath.Join(home, ".config"), nil -} - -// GetLibHome returns $HOME/.local/lib -// If HOME is not set, getpwent(3) is consulted to determine the users home directory. -func GetLibHome() (string, error) { - home := Get() - if home == "" { - return "", errors.New("could not get HOME") - } - return filepath.Join(home, ".local/lib"), nil -} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go deleted file mode 100644 index 11f1bec9..00000000 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_others.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !linux -// +build !linux - -package homedir // import "github.com/docker/docker/pkg/homedir" - -import ( - "errors" -) - -// GetRuntimeDir is unsupported on non-linux system. -func GetRuntimeDir() (string, error) { - return "", errors.New("homedir.GetRuntimeDir() is not supported on this system") -} - -// StickRuntimeDirContents is unsupported on non-linux system. -func StickRuntimeDirContents(files []string) ([]string, error) { - return nil, errors.New("homedir.StickRuntimeDirContents() is not supported on this system") -} - -// GetDataHome is unsupported on non-linux system. -func GetDataHome() (string, error) { - return "", errors.New("homedir.GetDataHome() is not supported on this system") -} - -// GetConfigHome is unsupported on non-linux system. -func GetConfigHome() (string, error) { - return "", errors.New("homedir.GetConfigHome() is not supported on this system") -} - -// GetLibHome is unsupported on non-linux system. -func GetLibHome() (string, error) { - return "", errors.New("homedir.GetLibHome() is not supported on this system") -} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go deleted file mode 100644 index d1732dee..00000000 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build !windows -// +build !windows - -package homedir // import "github.com/docker/docker/pkg/homedir" - -import ( - "os" - "os/user" -) - -// Key returns the env var name for the user's home dir based on -// the platform being run on -func Key() string { - return "HOME" -} - -// Get returns the home directory of the current user with the help of -// environment variables depending on the target operating system. -// Returned path should be used with "path/filepath" to form new paths. -// -// If linking statically with cgo enabled against glibc, ensure the -// osusergo build tag is used. -// -// If needing to do nss lookups, do not disable cgo or set osusergo. -func Get() string { - home := os.Getenv(Key()) - if home == "" { - if u, err := user.Current(); err == nil { - return u.HomeDir - } - } - return home -} - -// GetShortcutString returns the string that is shortcut to user's home directory -// in the native shell of the platform running on. -func GetShortcutString() string { - return "~" -} diff --git a/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go b/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go deleted file mode 100644 index 2f81813b..00000000 --- a/vendor/github.com/docker/docker/pkg/homedir/homedir_windows.go +++ /dev/null @@ -1,24 +0,0 @@ -package homedir // import "github.com/docker/docker/pkg/homedir" - -import ( - "os" -) - -// Key returns the env var name for the user's home dir based on -// the platform being run on -func Key() string { - return "USERPROFILE" -} - -// Get returns the home directory of the current user with the help of -// environment variables depending on the target operating system. -// Returned path should be used with "path/filepath" to form new paths. -func Get() string { - return os.Getenv(Key()) -} - -// GetShortcutString returns the string that is shortcut to user's home directory -// in the native shell of the platform running on. -func GetShortcutString() string { - return "%USERPROFILE%" // be careful while using in format functions -} diff --git a/vendor/github.com/google/go-containerregistry/LICENSE b/vendor/github.com/google/go-containerregistry/LICENSE deleted file mode 100644 index 7a4a3ea2..00000000 --- a/vendor/github.com/google/go-containerregistry/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. \ No newline at end of file diff --git a/vendor/github.com/google/go-containerregistry/internal/and/and_closer.go b/vendor/github.com/google/go-containerregistry/internal/and/and_closer.go deleted file mode 100644 index 14a05eaa..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/and/and_closer.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 and provides helpers for adding Close to io.{Reader|Writer}. -package and - -import ( - "io" -) - -// ReadCloser implements io.ReadCloser by reading from a particular io.Reader -// and then calling the provided "Close()" method. -type ReadCloser struct { - io.Reader - CloseFunc func() error -} - -var _ io.ReadCloser = (*ReadCloser)(nil) - -// Close implements io.ReadCloser -func (rac *ReadCloser) Close() error { - return rac.CloseFunc() -} - -// WriteCloser implements io.WriteCloser by reading from a particular io.Writer -// and then calling the provided "Close()" method. -type WriteCloser struct { - io.Writer - CloseFunc func() error -} - -var _ io.WriteCloser = (*WriteCloser)(nil) - -// Close implements io.WriteCloser -func (wac *WriteCloser) Close() error { - return wac.CloseFunc() -} diff --git a/vendor/github.com/google/go-containerregistry/internal/compression/compression.go b/vendor/github.com/google/go-containerregistry/internal/compression/compression.go deleted file mode 100644 index 01248715..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/compression/compression.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2022 Google LLC All Rights Reserved. -// -// 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 compression abstracts over gzip and zstd. -package compression - -import ( - "bufio" - "bytes" - "io" - - "github.com/google/go-containerregistry/internal/gzip" - "github.com/google/go-containerregistry/internal/zstd" - "github.com/google/go-containerregistry/pkg/compression" -) - -// Opener represents e.g. opening a file. -type Opener = func() (io.ReadCloser, error) - -// GetCompression detects whether an Opener is compressed and which algorithm is used. -func GetCompression(opener Opener) (compression.Compression, error) { - rc, err := opener() - if err != nil { - return compression.None, err - } - defer rc.Close() - - cp, _, err := PeekCompression(rc) - if err != nil { - return compression.None, err - } - - return cp, nil -} - -// PeekCompression detects whether the input stream is compressed and which algorithm is used. -// -// If r implements Peek, we will use that directly, otherwise a small number -// of bytes are buffered to Peek at the gzip/zstd header, and the returned -// PeekReader can be used as a replacement for the consumed input io.Reader. -func PeekCompression(r io.Reader) (compression.Compression, PeekReader, error) { - pr := intoPeekReader(r) - - if isGZip, _, err := checkHeader(pr, gzip.MagicHeader); err != nil { - return compression.None, pr, err - } else if isGZip { - return compression.GZip, pr, nil - } - - if isZStd, _, err := checkHeader(pr, zstd.MagicHeader); err != nil { - return compression.None, pr, err - } else if isZStd { - return compression.ZStd, pr, nil - } - - return compression.None, pr, nil -} - -// PeekReader is an io.Reader that also implements Peek a la bufio.Reader. -type PeekReader interface { - io.Reader - Peek(n int) ([]byte, error) -} - -// IntoPeekReader creates a PeekReader from an io.Reader. -// If the reader already has a Peek method, it will just return the passed reader. -func intoPeekReader(r io.Reader) PeekReader { - if p, ok := r.(PeekReader); ok { - return p - } - - return bufio.NewReader(r) -} - -// CheckHeader checks whether the first bytes from a PeekReader match an expected header -func checkHeader(pr PeekReader, expectedHeader []byte) (bool, PeekReader, error) { - header, err := pr.Peek(len(expectedHeader)) - if err != nil { - // https://github.com/google/go-containerregistry/issues/367 - if err == io.EOF { - return false, pr, nil - } - return false, pr, err - } - return bytes.Equal(header, expectedHeader), pr, nil -} diff --git a/vendor/github.com/google/go-containerregistry/internal/estargz/estargz.go b/vendor/github.com/google/go-containerregistry/internal/estargz/estargz.go deleted file mode 100644 index 69021bce..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/estargz/estargz.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 estargz adapts the containerd estargz package to our abstractions. -package estargz - -import ( - "bytes" - "io" - - "github.com/containerd/stargz-snapshotter/estargz" - v1 "github.com/google/go-containerregistry/pkg/v1" -) - -// Assert that what we're returning is an io.ReadCloser -var _ io.ReadCloser = (*estargz.Blob)(nil) - -// ReadCloser reads uncompressed tarball input from the io.ReadCloser and -// returns: -// - An io.ReadCloser from which compressed data may be read, and -// - A v1.Hash with the hash of the estargz table of contents, or -// - An error if the estargz processing encountered a problem. -// -// Refer to estargz for the options: -// https://pkg.go.dev/github.com/containerd/stargz-snapshotter/estargz@v0.4.1#Option -func ReadCloser(r io.ReadCloser, opts ...estargz.Option) (*estargz.Blob, v1.Hash, error) { - defer r.Close() - - // TODO(#876): Avoid buffering into memory. - bs, err := io.ReadAll(r) - if err != nil { - return nil, v1.Hash{}, err - } - br := bytes.NewReader(bs) - - rc, err := estargz.Build(io.NewSectionReader(br, 0, int64(len(bs))), opts...) - if err != nil { - return nil, v1.Hash{}, err - } - - h, err := v1.NewHash(rc.TOCDigest().String()) - return rc, h, err -} diff --git a/vendor/github.com/google/go-containerregistry/internal/gzip/zip.go b/vendor/github.com/google/go-containerregistry/internal/gzip/zip.go deleted file mode 100644 index 018c0f8c..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/gzip/zip.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 gzip provides helper functions for interacting with gzipped streams. -package gzip - -import ( - "bufio" - "bytes" - "compress/gzip" - "io" - - "github.com/google/go-containerregistry/internal/and" -) - -// MagicHeader is the start of gzip files. -var MagicHeader = []byte{'\x1f', '\x8b'} - -// ReadCloser reads uncompressed input data from the io.ReadCloser and -// returns an io.ReadCloser from which compressed data may be read. -// This uses gzip.BestSpeed for the compression level. -func ReadCloser(r io.ReadCloser) io.ReadCloser { - return ReadCloserLevel(r, gzip.BestSpeed) -} - -// ReadCloserLevel reads uncompressed input data from the io.ReadCloser and -// returns an io.ReadCloser from which compressed data may be read. -// Refer to compress/gzip for the level: -// https://golang.org/pkg/compress/gzip/#pkg-constants -func ReadCloserLevel(r io.ReadCloser, level int) io.ReadCloser { - pr, pw := io.Pipe() - - // For highly compressible layers, gzip.Writer will output a very small - // number of bytes per Write(). This is normally fine, but when pushing - // to a registry, we want to ensure that we're taking full advantage of - // the available bandwidth instead of sending tons of tiny writes over - // the wire. - // 64K ought to be small enough for anybody. - bw := bufio.NewWriterSize(pw, 2<<16) - - // Returns err so we can pw.CloseWithError(err) - go func() error { - // TODO(go1.14): Just defer {pw,gw,r}.Close like you'd expect. - // Context: https://golang.org/issue/24283 - gw, err := gzip.NewWriterLevel(bw, level) - if err != nil { - return pw.CloseWithError(err) - } - - if _, err := io.Copy(gw, r); err != nil { - defer r.Close() - defer gw.Close() - return pw.CloseWithError(err) - } - - // Close gzip writer to Flush it and write gzip trailers. - if err := gw.Close(); err != nil { - return pw.CloseWithError(err) - } - - // Flush bufio writer to ensure we write out everything. - if err := bw.Flush(); err != nil { - return pw.CloseWithError(err) - } - - // We don't really care if these fail. - defer pw.Close() - defer r.Close() - - return nil - }() - - return pr -} - -// UnzipReadCloser reads compressed input data from the io.ReadCloser and -// returns an io.ReadCloser from which uncompressed data may be read. -func UnzipReadCloser(r io.ReadCloser) (io.ReadCloser, error) { - gr, err := gzip.NewReader(r) - if err != nil { - return nil, err - } - return &and.ReadCloser{ - Reader: gr, - CloseFunc: func() error { - // If the unzip fails, then this seems to return the same - // error as the read. We don't want this to interfere with - // us closing the main ReadCloser, since this could leave - // an open file descriptor (fails on Windows). - gr.Close() - return r.Close() - }, - }, nil -} - -// Is detects whether the input stream is compressed. -func Is(r io.Reader) (bool, error) { - magicHeader := make([]byte, 2) - n, err := r.Read(magicHeader) - if n == 0 && err == io.EOF { - return false, nil - } - if err != nil { - return false, err - } - return bytes.Equal(magicHeader, MagicHeader), nil -} diff --git a/vendor/github.com/google/go-containerregistry/internal/redact/redact.go b/vendor/github.com/google/go-containerregistry/internal/redact/redact.go deleted file mode 100644 index b2e3f186..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/redact/redact.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 redact contains a simple context signal for redacting requests. -package redact - -import ( - "context" - "errors" - "net/url" -) - -type contextKey string - -var redactKey = contextKey("redact") - -// NewContext creates a new ctx with the reason for redaction. -func NewContext(ctx context.Context, reason string) context.Context { - return context.WithValue(ctx, redactKey, reason) -} - -// FromContext returns the redaction reason, if any. -func FromContext(ctx context.Context) (bool, string) { - reason, ok := ctx.Value(redactKey).(string) - return ok, reason -} - -// Error redacts potentially sensitive query parameter values in the URL from the error's message. -// -// If the error is a *url.Error, this returns a *url.Error with the URL redacted. -// Any other error type, or nil, is returned unchanged. -func Error(err error) error { - // If the error is a url.Error, we can redact the URL. - // Otherwise (including if err is nil), we can't redact. - var uerr *url.Error - if ok := errors.As(err, &uerr); !ok { - return err - } - u, perr := url.Parse(uerr.URL) - if perr != nil { - return err // If the URL can't be parsed, just return the original error. - } - uerr.URL = URL(u).String() // Update the URL to the redacted URL. - return uerr -} - -// The set of query string keys that we expect to send as part of the registry -// protocol. Anything else is potentially dangerous to leak, as it's probably -// from a redirect. These redirects often included tokens or signed URLs. -var paramAllowlist = map[string]struct{}{ - // Token exchange - "scope": {}, - "service": {}, - // Cross-repo mounting - "mount": {}, - "from": {}, - // Layer PUT - "digest": {}, - // Listing tags and catalog - "n": {}, - "last": {}, -} - -// URL redacts potentially sensitive query parameter values from the URL's query string. -func URL(u *url.URL) *url.URL { - qs := u.Query() - for k, v := range qs { - for i := range v { - if _, ok := paramAllowlist[k]; !ok { - // key is not in the Allowlist - v[i] = "REDACTED" - } - } - } - r := *u - r.RawQuery = qs.Encode() - return &r -} diff --git a/vendor/github.com/google/go-containerregistry/internal/retry/retry.go b/vendor/github.com/google/go-containerregistry/internal/retry/retry.go deleted file mode 100644 index c9e35645..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/retry/retry.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 retry provides methods for retrying operations. It is a thin wrapper -// around k8s.io/apimachinery/pkg/util/wait to make certain operations easier. -package retry - -import ( - "context" - "errors" - "fmt" - - "github.com/google/go-containerregistry/internal/retry/wait" -) - -// Backoff is an alias of our own wait.Backoff to avoid name conflicts with -// the kubernetes wait package. Typing retry.Backoff is aesier than fixing -// the wrong import every time you use wait.Backoff. -type Backoff = wait.Backoff - -// This is implemented by several errors in the net package as well as our -// transport.Error. -type temporary interface { - Temporary() bool -} - -// IsTemporary returns true if err implements Temporary() and it returns true. -func IsTemporary(err error) bool { - if errors.Is(err, context.DeadlineExceeded) { - return false - } - if te, ok := err.(temporary); ok && te.Temporary() { - return true - } - return false -} - -// IsNotNil returns true if err is not nil. -func IsNotNil(err error) bool { - return err != nil -} - -// Predicate determines whether an error should be retried. -type Predicate func(error) (retry bool) - -// Retry retries a given function, f, until a predicate is satisfied, using -// exponential backoff. If the predicate is never satisfied, it will return the -// last error returned by f. -func Retry(f func() error, p Predicate, backoff wait.Backoff) (err error) { - if f == nil { - return fmt.Errorf("nil f passed to retry") - } - if p == nil { - return fmt.Errorf("nil p passed to retry") - } - - condition := func() (bool, error) { - err = f() - if p(err) { - return false, nil - } - return true, err - } - - wait.ExponentialBackoff(backoff, condition) - return -} - -type contextKey string - -var key = contextKey("never") - -// Never returns a context that signals something should not be retried. -// This is a hack and can be used to communicate across package boundaries -// to avoid retry amplification. -func Never(ctx context.Context) context.Context { - return context.WithValue(ctx, key, true) -} - -// Ever returns true if the context was wrapped by Never. -func Ever(ctx context.Context) bool { - return ctx.Value(key) == nil -} diff --git a/vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.go b/vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.go deleted file mode 100644 index ab06e5f1..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/retry/wait/kubernetes_apimachinery_wait.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -Copyright 2014 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 wait is a subset of k8s.io/apimachinery to avoid conflicts -// in dependencies (specifically, logging). -package wait - -import ( - "errors" - "math/rand" - "time" -) - -// Jitter returns a time.Duration between duration and duration + maxFactor * -// duration. -// -// This allows clients to avoid converging on periodic behavior. If maxFactor -// is 0.0, a suggested default value will be chosen. -func Jitter(duration time.Duration, maxFactor float64) time.Duration { - if maxFactor <= 0.0 { - maxFactor = 1.0 - } - wait := duration + time.Duration(rand.Float64()*maxFactor*float64(duration)) - return wait -} - -// ErrWaitTimeout is returned when the condition exited without success. -var ErrWaitTimeout = errors.New("timed out waiting for the condition") - -// ConditionFunc returns true if the condition is satisfied, or an error -// if the loop should be aborted. -type ConditionFunc func() (done bool, err error) - -// Backoff holds parameters applied to a Backoff function. -type Backoff struct { - // The initial duration. - Duration time.Duration - // Duration is multiplied by factor each iteration, if factor is not zero - // and the limits imposed by Steps and Cap have not been reached. - // Should not be negative. - // The jitter does not contribute to the updates to the duration parameter. - Factor float64 - // The sleep at each iteration is the duration plus an additional - // amount chosen uniformly at random from the interval between - // zero and `jitter*duration`. - Jitter float64 - // The remaining number of iterations in which the duration - // parameter may change (but progress can be stopped earlier by - // hitting the cap). If not positive, the duration is not - // changed. Used for exponential backoff in combination with - // Factor and Cap. - Steps int - // A limit on revised values of the duration parameter. If a - // multiplication by the factor parameter would make the duration - // exceed the cap then the duration is set to the cap and the - // steps parameter is set to zero. - Cap time.Duration -} - -// Step (1) returns an amount of time to sleep determined by the -// original Duration and Jitter and (2) mutates the provided Backoff -// to update its Steps and Duration. -func (b *Backoff) Step() time.Duration { - if b.Steps < 1 { - if b.Jitter > 0 { - return Jitter(b.Duration, b.Jitter) - } - return b.Duration - } - b.Steps-- - - duration := b.Duration - - // calculate the next step - if b.Factor != 0 { - b.Duration = time.Duration(float64(b.Duration) * b.Factor) - if b.Cap > 0 && b.Duration > b.Cap { - b.Duration = b.Cap - b.Steps = 0 - } - } - - if b.Jitter > 0 { - duration = Jitter(duration, b.Jitter) - } - return duration -} - -// ExponentialBackoff repeats a condition check with exponential backoff. -// -// It repeatedly checks the condition and then sleeps, using `backoff.Step()` -// to determine the length of the sleep and adjust Duration and Steps. -// Stops and returns as soon as: -// 1. the condition check returns true or an error, -// 2. `backoff.Steps` checks of the condition have been done, or -// 3. a sleep truncated by the cap on duration has been completed. -// In case (1) the returned error is what the condition function returned. -// In all other cases, ErrWaitTimeout is returned. -func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error { - for backoff.Steps > 0 { - if ok, err := condition(); err != nil || ok { - return err - } - if backoff.Steps == 1 { - break - } - time.Sleep(backoff.Step()) - } - return ErrWaitTimeout -} diff --git a/vendor/github.com/google/go-containerregistry/internal/verify/verify.go b/vendor/github.com/google/go-containerregistry/internal/verify/verify.go deleted file mode 100644 index 463f7e4b..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/verify/verify.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 verify provides a ReadCloser that verifies content matches the -// expected hash values. -package verify - -import ( - "bytes" - "encoding/hex" - "errors" - "fmt" - "hash" - "io" - - "github.com/google/go-containerregistry/internal/and" - v1 "github.com/google/go-containerregistry/pkg/v1" -) - -// SizeUnknown is a sentinel value to indicate that the expected size is not known. -const SizeUnknown = -1 - -type verifyReader struct { - inner io.Reader - hasher hash.Hash - expected v1.Hash - gotSize, wantSize int64 -} - -// Error provides information about the failed hash verification. -type Error struct { - got string - want v1.Hash - gotSize int64 -} - -func (v Error) Error() string { - return fmt.Sprintf("error verifying %s checksum after reading %d bytes; got %q, want %q", - v.want.Algorithm, v.gotSize, v.got, v.want) -} - -// Read implements io.Reader -func (vc *verifyReader) Read(b []byte) (int, error) { - n, err := vc.inner.Read(b) - vc.gotSize += int64(n) - if err == io.EOF { - if vc.wantSize != SizeUnknown && vc.gotSize != vc.wantSize { - return n, fmt.Errorf("error verifying size; got %d, want %d", vc.gotSize, vc.wantSize) - } - got := hex.EncodeToString(vc.hasher.Sum(nil)) - if want := vc.expected.Hex; got != want { - return n, Error{ - got: vc.expected.Algorithm + ":" + got, - want: vc.expected, - gotSize: vc.gotSize, - } - } - } - return n, err -} - -// ReadCloser wraps the given io.ReadCloser to verify that its contents match -// the provided v1.Hash before io.EOF is returned. -// -// The reader will only be read up to size bytes, to prevent resource -// exhaustion. If EOF is returned before size bytes are read, an error is -// returned. -// -// A size of SizeUnknown (-1) indicates disables size verification when the size -// is unknown ahead of time. -func ReadCloser(r io.ReadCloser, size int64, h v1.Hash) (io.ReadCloser, error) { - w, err := v1.Hasher(h.Algorithm) - if err != nil { - return nil, err - } - r2 := io.TeeReader(r, w) // pass all writes to the hasher. - if size != SizeUnknown { - r2 = io.LimitReader(r2, size) // if we know the size, limit to that size. - } - return &and.ReadCloser{ - Reader: &verifyReader{ - inner: r2, - hasher: w, - expected: h, - wantSize: size, - }, - CloseFunc: r.Close, - }, nil -} - -// Descriptor verifies that the embedded Data field matches the Size and Digest -// fields of the given v1.Descriptor, returning an error if the Data field is -// missing or if it contains incorrect data. -func Descriptor(d v1.Descriptor) error { - if d.Data == nil { - return errors.New("error verifying descriptor; Data == nil") - } - - h, sz, err := v1.SHA256(bytes.NewReader(d.Data)) - if err != nil { - return err - } - if h != d.Digest { - return fmt.Errorf("error verifying Digest; got %q, want %q", h, d.Digest) - } - if sz != d.Size { - return fmt.Errorf("error verifying Size; got %d, want %d", sz, d.Size) - } - - return nil -} diff --git a/vendor/github.com/google/go-containerregistry/internal/windows/windows.go b/vendor/github.com/google/go-containerregistry/internal/windows/windows.go deleted file mode 100644 index 62d04cfb..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/windows/windows.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2021 Google LLC All Rights Reserved. -// -// 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 windows - -import ( - "archive/tar" - "bytes" - "errors" - "fmt" - "io" - "path" - "strings" - - "github.com/google/go-containerregistry/internal/gzip" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/tarball" -) - -// userOwnerAndGroupSID is a magic value needed to make the binary executable -// in a Windows container. -// -// owner: BUILTIN/Users group: BUILTIN/Users ($sddlValue="O:BUG:BU") -const userOwnerAndGroupSID = "AQAAgBQAAAAkAAAAAAAAAAAAAAABAgAAAAAABSAAAAAhAgAAAQIAAAAAAAUgAAAAIQIAAA==" - -// Windows returns a Layer that is converted to be pullable on Windows. -func Windows(layer v1.Layer) (v1.Layer, error) { - // TODO: do this lazily. - - layerReader, err := layer.Uncompressed() - if err != nil { - return nil, fmt.Errorf("getting layer: %w", err) - } - defer layerReader.Close() - tarReader := tar.NewReader(layerReader) - w := new(bytes.Buffer) - tarWriter := tar.NewWriter(w) - defer tarWriter.Close() - - for _, dir := range []string{"Files", "Hives"} { - if err := tarWriter.WriteHeader(&tar.Header{ - Name: dir, - Typeflag: tar.TypeDir, - // Use a fixed Mode, so that this isn't sensitive to the directory and umask - // under which it was created. Additionally, windows can only set 0222, - // 0444, or 0666, none of which are executable. - Mode: 0555, - Format: tar.FormatPAX, - }); err != nil { - return nil, fmt.Errorf("writing %s directory: %w", dir, err) - } - } - - for { - header, err := tarReader.Next() - if errors.Is(err, io.EOF) { - break - } - if err != nil { - return nil, fmt.Errorf("reading layer: %w", err) - } - - if strings.HasPrefix(header.Name, "Files/") { - return nil, fmt.Errorf("file path %q already suitable for Windows", header.Name) - } - - header.Name = path.Join("Files", header.Name) - header.Format = tar.FormatPAX - - // TODO: this seems to make the file executable on Windows; - // only do this if the file should be executable. - if header.PAXRecords == nil { - header.PAXRecords = map[string]string{} - } - header.PAXRecords["MSWINDOWS.rawsd"] = userOwnerAndGroupSID - - if err := tarWriter.WriteHeader(header); err != nil { - return nil, fmt.Errorf("writing tar header: %w", err) - } - - if header.Typeflag == tar.TypeReg { - if _, err = io.Copy(tarWriter, tarReader); err != nil { - return nil, fmt.Errorf("writing layer file: %w", err) - } - } - } - - if err := tarWriter.Close(); err != nil { - return nil, err - } - - b := w.Bytes() - // gzip the contents, then create the layer - opener := func() (io.ReadCloser, error) { - return gzip.ReadCloser(io.NopCloser(bytes.NewReader(b))), nil - } - layer, err = tarball.LayerFromOpener(opener) - if err != nil { - return nil, fmt.Errorf("creating layer: %w", err) - } - - return layer, nil -} diff --git a/vendor/github.com/google/go-containerregistry/internal/zstd/zstd.go b/vendor/github.com/google/go-containerregistry/internal/zstd/zstd.go deleted file mode 100644 index cccf54a3..00000000 --- a/vendor/github.com/google/go-containerregistry/internal/zstd/zstd.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2022 Google LLC All Rights Reserved. -// -// 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 zstd provides helper functions for interacting with zstd streams. -package zstd - -import ( - "bufio" - "bytes" - "io" - - "github.com/google/go-containerregistry/internal/and" - "github.com/klauspost/compress/zstd" -) - -// MagicHeader is the start of zstd files. -var MagicHeader = []byte{'\x28', '\xb5', '\x2f', '\xfd'} - -// ReadCloser reads uncompressed input data from the io.ReadCloser and -// returns an io.ReadCloser from which compressed data may be read. -// This uses zstd level 1 for the compression. -func ReadCloser(r io.ReadCloser) io.ReadCloser { - return ReadCloserLevel(r, 1) -} - -// ReadCloserLevel reads uncompressed input data from the io.ReadCloser and -// returns an io.ReadCloser from which compressed data may be read. -func ReadCloserLevel(r io.ReadCloser, level int) io.ReadCloser { - pr, pw := io.Pipe() - - // For highly compressible layers, zstd.Writer will output a very small - // number of bytes per Write(). This is normally fine, but when pushing - // to a registry, we want to ensure that we're taking full advantage of - // the available bandwidth instead of sending tons of tiny writes over - // the wire. - // 64K ought to be small enough for anybody. - bw := bufio.NewWriterSize(pw, 2<<16) - - // Returns err so we can pw.CloseWithError(err) - go func() error { - // TODO(go1.14): Just defer {pw,zw,r}.Close like you'd expect. - // Context: https://golang.org/issue/24283 - zw, err := zstd.NewWriter(bw, zstd.WithEncoderLevel(zstd.EncoderLevelFromZstd(level))) - if err != nil { - return pw.CloseWithError(err) - } - - if _, err := io.Copy(zw, r); err != nil { - defer r.Close() - defer zw.Close() - return pw.CloseWithError(err) - } - - // Close zstd writer to Flush it and write zstd trailers. - if err := zw.Close(); err != nil { - return pw.CloseWithError(err) - } - - // Flush bufio writer to ensure we write out everything. - if err := bw.Flush(); err != nil { - return pw.CloseWithError(err) - } - - // We don't really care if these fail. - defer pw.Close() - defer r.Close() - - return nil - }() - - return pr -} - -// UnzipReadCloser reads compressed input data from the io.ReadCloser and -// returns an io.ReadCloser from which uncompressed data may be read. -func UnzipReadCloser(r io.ReadCloser) (io.ReadCloser, error) { - gr, err := zstd.NewReader(r) - if err != nil { - return nil, err - } - return &and.ReadCloser{ - Reader: gr, - CloseFunc: func() error { - // If the unzip fails, then this seems to return the same - // error as the read. We don't want this to interfere with - // us closing the main ReadCloser, since this could leave - // an open file descriptor (fails on Windows). - gr.Close() - return r.Close() - }, - }, nil -} - -// Is detects whether the input stream is compressed. -func Is(r io.Reader) (bool, error) { - magicHeader := make([]byte, 4) - n, err := r.Read(magicHeader) - if n == 0 && err == io.EOF { - return false, nil - } - if err != nil { - return false, err - } - return bytes.Equal(magicHeader, MagicHeader), nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/README.md b/vendor/github.com/google/go-containerregistry/pkg/authn/README.md deleted file mode 100644 index 042bddec..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/README.md +++ /dev/null @@ -1,322 +0,0 @@ -# `authn` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/authn?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/authn) - -This README outlines how we acquire and use credentials when interacting with a registry. - -As much as possible, we attempt to emulate `docker`'s authentication behavior and configuration so that this library "just works" if you've already configured credentials that work with `docker`; however, when things don't work, a basic understanding of what's going on can help with debugging. - -The official documentation for how authentication with `docker` works is (reasonably) scattered across several different sites and GitHub repositories, so we've tried to summarize the relevant bits here. - -## tl;dr for consumers of this package - -By default, [`pkg/v1/remote`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/remote) uses [`Anonymous`](https://godoc.org/github.com/google/go-containerregistry/pkg/authn#Anonymous) credentials (i.e. _none_), which for most registries will only allow read access to public images. - -To use the credentials found in your Docker config file, you can use the [`DefaultKeychain`](https://godoc.org/github.com/google/go-containerregistry/pkg/authn#DefaultKeychain), e.g.: - -```go -package main - -import ( - "fmt" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -func main() { - ref, err := name.ParseReference("registry.example.com/private/repo") - if err != nil { - panic(err) - } - - // Fetch the manifest using default credentials. - img, err := remote.Get(ref, remote.WithAuthFromKeychain(authn.DefaultKeychain)) - if err != nil { - panic(err) - } - - // Prints the digest of registry.example.com/private/repo - fmt.Println(img.Digest) -} -``` - -The `DefaultKeychain` will use credentials as described in your Docker config file -- usually `~/.docker/config.json`, or `%USERPROFILE%\.docker\config.json` on Windows -- or the location described by the `DOCKER_CONFIG` environment variable, if set. - -If those are not found, `DefaultKeychain` will look for credentials configured using [Podman's expectation](https://docs.podman.io/en/latest/markdown/podman-login.1.html) that these are found in `${XDG_RUNTIME_DIR}/containers/auth.json`. - -[See below](#docker-config-auth) for more information about what is configured in this file. - -## Emulating Cloud Provider Credential Helpers - -[`pkg/v1/google.Keychain`](https://pkg.go.dev/github.com/google/go-containerregistry/pkg/v1/google#Keychain) provides a `Keychain` implementation that emulates [`docker-credential-gcr`](https://github.com/GoogleCloudPlatform/docker-credential-gcr) to find credentials in the environment. -See [`google.NewEnvAuthenticator`](https://pkg.go.dev/github.com/google/go-containerregistry/pkg/v1/google#NewEnvAuthenticator) and [`google.NewGcloudAuthenticator`](https://pkg.go.dev/github.com/google/go-containerregistry/pkg/v1/google#NewGcloudAuthenticator) for more information. - -To emulate other credential helpers without requiring them to be available as executables, [`NewKeychainFromHelper`](https://pkg.go.dev/github.com/google/go-containerregistry/pkg/authn#NewKeychainFromHelper) provides an adapter that takes a Go implementation satisfying a subset of the [`credentials.Helper`](https://pkg.go.dev/github.com/docker/docker-credential-helpers/credentials#Helper) interface, and makes it available as a `Keychain`. - -This means that you can emulate, for example, [Amazon ECR's `docker-credential-ecr-login` credential helper](https://github.com/awslabs/amazon-ecr-credential-helper) using the same implementation: - -```go -import ( - ecr "github.com/awslabs/amazon-ecr-credential-helper/ecr-login" - "github.com/awslabs/amazon-ecr-credential-helper/ecr-login/api" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -func main() { - // ... - ecrHelper := ecr.ECRHelper{ClientFactory: api.DefaultClientFactory{}} - img, err := remote.Get(ref, remote.WithAuthFromKeychain(authn.NewKeychainFromHelper(ecrHelper))) - if err != nil { - panic(err) - } - // ... -} -``` - -Likewise, you can emulate [Azure's ACR `docker-credential-acr-env` credential helper](https://github.com/chrismellard/docker-credential-acr-env): - -```go -import ( - "github.com/chrismellard/docker-credential-acr-env/pkg/credhelper" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -func main() { - // ... - acrHelper := credhelper.NewACRCredentialsHelper() - img, err := remote.Get(ref, remote.WithAuthFromKeychain(authn.NewKeychainFromHelper(acrHelper))) - if err != nil { - panic(err) - } - // ... -} -``` - - - -## Using Multiple `Keychain`s - -[`NewMultiKeychain`](https://pkg.go.dev/github.com/google/go-containerregistry/pkg/authn#NewMultiKeychain) allows you to specify multiple `Keychain` implementations, which will be checked in order when credentials are needed. - -For example: - -```go -kc := authn.NewMultiKeychain( - authn.DefaultKeychain, - google.Keychain, - authn.NewKeychainFromHelper(ecr.ECRHelper{ClientFactory: api.DefaultClientFactory{}}), - authn.NewKeychainFromHelper(acr.ACRCredHelper{}), -) -``` - -This multi-keychain will: - -- first check for credentials found in the Docker config file, as describe above, then -- check for GCP credentials available in the environment, as described above, then -- check for ECR credentials by emulating the ECR credential helper, then -- check for ACR credentials by emulating the ACR credential helper. - -If any keychain implementation is able to provide credentials for the request, they will be used, and further keychain implementations will not be consulted. - -If no implementations are able to provide credentials, `Anonymous` credentials will be used. - -## Docker Config Auth - -What follows attempts to gather useful information about Docker's config.json and make it available in one place. - -If you have questions, please [file an issue](https://github.com/google/go-containerregistry/issues/new). - -### Plaintext - -The config file is where your credentials are stored when you invoke `docker login`, e.g. the contents may look something like this: - -```json -{ - "auths": { - "registry.example.com": { - "auth": "QXp1cmVEaWFtb25kOmh1bnRlcjI=" - } - } -} -``` - -The `auths` map has an entry per registry, and the `auth` field contains your username and password encoded as [HTTP 'Basic' Auth](https://tools.ietf.org/html/rfc7617). - -**NOTE**: This means that your credentials are stored _in plaintext_: - -```bash -$ echo "QXp1cmVEaWFtb25kOmh1bnRlcjI=" | base64 -d -AzureDiamond:hunter2 -``` - -For what it's worth, this config file is equivalent to: - -```json -{ - "auths": { - "registry.example.com": { - "username": "AzureDiamond", - "password": "hunter2" - } - } -} -``` - -... which is useful to know if e.g. your CI system provides you a registry username and password via environment variables and you want to populate this file manually without invoking `docker login`. - -### Helpers - -If you log in like this, `docker` will warn you that you should use a [credential helper](https://docs.docker.com/engine/reference/commandline/login/#credentials-store), and you should! - -To configure a global credential helper: -```json -{ - "credsStore": "osxkeychain" -} -``` - -To configure a per-registry credential helper: -```json -{ - "credHelpers": { - "gcr.io": "gcr" - } -} -``` - -We use [`github.com/docker/cli/cli/config.Load`](https://godoc.org/github.com/docker/cli/cli/config#Load) to parse the config file and invoke any necessary credential helpers. This handles the logic of taking a [`ConfigFile`](https://github.com/docker/cli/blob/ba63a92655c0bea4857b8d6cc4991498858b3c60/cli/config/configfile/file.go#L25-L54) + registry domain and producing an [`AuthConfig`](https://github.com/docker/cli/blob/ba63a92655c0bea4857b8d6cc4991498858b3c60/cli/config/types/authconfig.go#L3-L22), which determines how we authenticate to the registry. - -## Credential Helpers - -The [credential helper protocol](https://github.com/docker/docker-credential-helpers) allows you to configure a binary that supplies credentials for the registry, rather than hard-coding them in the config file. - -The protocol has several verbs, but the one we most care about is `get`. - -For example, using the following config file: -```json -{ - "credHelpers": { - "gcr.io": "gcr", - "eu.gcr.io": "gcr" - } -} -``` - -To acquire credentials for `gcr.io`, we look in the `credHelpers` map to find -the credential helper for `gcr.io` is `gcr`. By appending that value to -`docker-credential-`, we can get the name of the binary we need to use. - -For this example, that's `docker-credential-gcr`, which must be on our `$PATH`. -We'll then invoke that binary to get credentials: - -```bash -$ echo "gcr.io" | docker-credential-gcr get -{"Username":"_token","Secret":""} -``` - -You can configure the same credential helper for multiple registries, which is -why we need to pass the domain in via STDIN, e.g. if we were trying to access -`eu.gcr.io`, we'd do this instead: - -```bash -$ echo "eu.gcr.io" | docker-credential-gcr get -{"Username":"_token","Secret":""} -``` - -### Debugging credential helpers - -If a credential helper is configured but doesn't seem to be working, it can be -challenging to debug. Implementing a fake credential helper lets you poke around -to make it easier to see where the failure is happening. - -This "implements" a credential helper with hard-coded values: -``` -#!/usr/bin/env bash -echo '{"Username":"","Secret":"hunter2"}' -``` - - -This implements a credential helper that prints the output of -`docker-credential-gcr` to both stderr and whatever called it, which allows you -to snoop on another credential helper: -``` -#!/usr/bin/env bash -docker-credential-gcr $@ | tee >(cat 1>&2) -``` - -Put those files somewhere on your path, naming them e.g. -`docker-credential-hardcoded` and `docker-credential-tee`, then modify the -config file to use them: - -```json -{ - "credHelpers": { - "gcr.io": "tee", - "eu.gcr.io": "hardcoded" - } -} -``` - -The `docker-credential-tee` trick works with both `crane` and `docker`: - -```bash -$ crane manifest gcr.io/google-containers/pause > /dev/null -{"ServerURL":"","Username":"_dcgcr_1_5_0_token","Secret":""} - -$ docker pull gcr.io/google-containers/pause -Using default tag: latest -{"ServerURL":"","Username":"_dcgcr_1_5_0_token","Secret":""} -latest: Pulling from google-containers/pause -a3ed95caeb02: Pull complete -4964c72cd024: Pull complete -Digest: sha256:a78c2d6208eff9b672de43f880093100050983047b7b0afe0217d3656e1b0d5f -Status: Downloaded newer image for gcr.io/google-containers/pause:latest -gcr.io/google-containers/pause:latest -``` - -## The Registry - -There are two methods for authenticating against a registry: -[token](https://docs.docker.com/registry/spec/auth/token/) and -[oauth2](https://docs.docker.com/registry/spec/auth/oauth/). - -Both methods are used to acquire an opaque `Bearer` token (or -[RegistryToken](https://github.com/docker/cli/blob/ba63a92655c0bea4857b8d6cc4991498858b3c60/cli/config/types/authconfig.go#L21)) -to use in the `Authorization` header. The registry will return a `401 -Unauthorized` during the [version -check](https://github.com/opencontainers/distribution-spec/blob/2c3975d1f03b67c9a0203199038adea0413f0573/spec.md#api-version-check) -(or during normal operations) with -[Www-Authenticate](https://tools.ietf.org/html/rfc7235#section-4.1) challenge -indicating how to proceed. - -### Token - -If we get back an `AuthConfig` containing a [`Username/Password`](https://github.com/docker/cli/blob/ba63a92655c0bea4857b8d6cc4991498858b3c60/cli/config/types/authconfig.go#L5-L6) -or -[`Auth`](https://github.com/docker/cli/blob/ba63a92655c0bea4857b8d6cc4991498858b3c60/cli/config/types/authconfig.go#L7), -we'll use the token method for authentication: - -![basic](../../images/credhelper-basic.svg) - -### OAuth 2 - -If we get back an `AuthConfig` containing an [`IdentityToken`](https://github.com/docker/cli/blob/ba63a92655c0bea4857b8d6cc4991498858b3c60/cli/config/types/authconfig.go#L18) -we'll use the oauth2 method for authentication: - -![oauth](../../images/credhelper-oauth.svg) - -This happens when a credential helper returns a response with the -[`Username`](https://github.com/docker/docker-credential-helpers/blob/f78081d1f7fef6ad74ad6b79368de6348386e591/credentials/credentials.go#L16) -set to `` (no, that's not a placeholder, the literal string `""`). -It is unclear why: [moby/moby#36926](https://github.com/moby/moby/issues/36926). - -We only support the oauth2 `grant_type` for `refresh_token` ([#629](https://github.com/google/go-containerregistry/issues/629)), -since it's impossible to determine from the registry response whether we should -use oauth, and the token method for authentication is widely implemented by -registries. diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/anon.go b/vendor/github.com/google/go-containerregistry/pkg/authn/anon.go deleted file mode 100644 index 83214957..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/anon.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn - -// anonymous implements Authenticator for anonymous authentication. -type anonymous struct{} - -// Authorization implements Authenticator. -func (a *anonymous) Authorization() (*AuthConfig, error) { - return &AuthConfig{}, nil -} - -// Anonymous is a singleton Authenticator for providing anonymous auth. -var Anonymous Authenticator = &anonymous{} diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/auth.go b/vendor/github.com/google/go-containerregistry/pkg/authn/auth.go deleted file mode 100644 index 0111f1ae..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/auth.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn - -// auth is an Authenticator that simply returns the wrapped AuthConfig. -type auth struct { - config AuthConfig -} - -// FromConfig returns an Authenticator that just returns the given AuthConfig. -func FromConfig(cfg AuthConfig) Authenticator { - return &auth{cfg} -} - -// Authorization implements Authenticator. -func (a *auth) Authorization() (*AuthConfig, error) { - return &a.config, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/authn.go b/vendor/github.com/google/go-containerregistry/pkg/authn/authn.go deleted file mode 100644 index 172d218e..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/authn.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "strings" -) - -// Authenticator is used to authenticate Docker transports. -type Authenticator interface { - // Authorization returns the value to use in an http transport's Authorization header. - Authorization() (*AuthConfig, error) -} - -// AuthConfig contains authorization information for connecting to a Registry -// Inlined what we use from github.com/docker/cli/cli/config/types -type AuthConfig struct { - Username string `json:"username,omitempty"` - Password string `json:"password,omitempty"` - Auth string `json:"auth,omitempty"` - - // IdentityToken is used to authenticate the user and get - // an access token for the registry. - IdentityToken string `json:"identitytoken,omitempty"` - - // RegistryToken is a bearer token to be sent to a registry - RegistryToken string `json:"registrytoken,omitempty"` -} - -// This is effectively a copy of the type AuthConfig. This simplifies -// JSON unmarshalling since AuthConfig methods are not inherited -type authConfig AuthConfig - -// UnmarshalJSON implements json.Unmarshaler -func (a *AuthConfig) UnmarshalJSON(data []byte) error { - var shadow authConfig - err := json.Unmarshal(data, &shadow) - if err != nil { - return err - } - - *a = (AuthConfig)(shadow) - - if len(shadow.Auth) != 0 { - var derr error - a.Username, a.Password, derr = decodeDockerConfigFieldAuth(shadow.Auth) - if derr != nil { - err = fmt.Errorf("unable to decode auth field: %w", derr) - } - } else if len(a.Username) != 0 && len(a.Password) != 0 { - a.Auth = encodeDockerConfigFieldAuth(shadow.Username, shadow.Password) - } - - return err -} - -// MarshalJSON implements json.Marshaler -func (a AuthConfig) MarshalJSON() ([]byte, error) { - shadow := (authConfig)(a) - shadow.Auth = encodeDockerConfigFieldAuth(shadow.Username, shadow.Password) - return json.Marshal(shadow) -} - -// decodeDockerConfigFieldAuth deserializes the "auth" field from dockercfg into a -// username and a password. The format of the auth field is base64(:). -// -// From https://github.com/kubernetes/kubernetes/blob/75e49ec824b183288e1dbaccfd7dbe77d89db381/pkg/credentialprovider/config.go -// Copyright 2014 The Kubernetes Authors. -// SPDX-License-Identifier: Apache-2.0 -func decodeDockerConfigFieldAuth(field string) (username, password string, err error) { - var decoded []byte - // StdEncoding can only decode padded string - // RawStdEncoding can only decode unpadded string - if strings.HasSuffix(strings.TrimSpace(field), "=") { - // decode padded data - decoded, err = base64.StdEncoding.DecodeString(field) - } else { - // decode unpadded data - decoded, err = base64.RawStdEncoding.DecodeString(field) - } - - if err != nil { - return - } - - parts := strings.SplitN(string(decoded), ":", 2) - if len(parts) != 2 { - err = fmt.Errorf("must be formatted as base64(username:password)") - return - } - - username = parts[0] - password = parts[1] - - return -} - -func encodeDockerConfigFieldAuth(username, password string) string { - return base64.StdEncoding.EncodeToString([]byte(username + ":" + password)) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/basic.go b/vendor/github.com/google/go-containerregistry/pkg/authn/basic.go deleted file mode 100644 index 500cb661..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/basic.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn - -// Basic implements Authenticator for basic authentication. -type Basic struct { - Username string - Password string -} - -// Authorization implements Authenticator. -func (b *Basic) Authorization() (*AuthConfig, error) { - return &AuthConfig{ - Username: b.Username, - Password: b.Password, - }, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/bearer.go b/vendor/github.com/google/go-containerregistry/pkg/authn/bearer.go deleted file mode 100644 index 4cf86df9..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/bearer.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn - -// Bearer implements Authenticator for bearer authentication. -type Bearer struct { - Token string `json:"token"` -} - -// Authorization implements Authenticator. -func (b *Bearer) Authorization() (*AuthConfig, error) { - return &AuthConfig{ - RegistryToken: b.Token, - }, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/doc.go b/vendor/github.com/google/go-containerregistry/pkg/authn/doc.go deleted file mode 100644 index c2a5fc02..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn defines different methods of authentication for -// talking to a container registry. -package authn diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go b/vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go deleted file mode 100644 index 99e0b81c..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/keychain.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn - -import ( - "os" - "path/filepath" - "sync" - "time" - - "github.com/docker/cli/cli/config" - "github.com/docker/cli/cli/config/configfile" - "github.com/docker/cli/cli/config/types" - "github.com/google/go-containerregistry/pkg/name" - "github.com/mitchellh/go-homedir" -) - -// Resource represents a registry or repository that can be authenticated against. -type Resource interface { - // String returns the full string representation of the target, e.g. - // gcr.io/my-project or just gcr.io. - String() string - - // RegistryStr returns just the registry portion of the target, e.g. for - // gcr.io/my-project, this should just return gcr.io. This is needed to - // pull out an appropriate hostname. - RegistryStr() string -} - -// Keychain is an interface for resolving an image reference to a credential. -type Keychain interface { - // Resolve looks up the most appropriate credential for the specified target. - Resolve(Resource) (Authenticator, error) -} - -// defaultKeychain implements Keychain with the semantics of the standard Docker -// credential keychain. -type defaultKeychain struct { - mu sync.Mutex -} - -var ( - // DefaultKeychain implements Keychain by interpreting the docker config file. - DefaultKeychain = &defaultKeychain{} -) - -const ( - // DefaultAuthKey is the key used for dockerhub in config files, which - // is hardcoded for historical reasons. - DefaultAuthKey = "https://" + name.DefaultRegistry + "/v1/" -) - -// Resolve implements Keychain. -func (dk *defaultKeychain) Resolve(target Resource) (Authenticator, error) { - dk.mu.Lock() - defer dk.mu.Unlock() - - // Podman users may have their container registry auth configured in a - // different location, that Docker packages aren't aware of. - // If the Docker config file isn't found, we'll fallback to look where - // Podman configures it, and parse that as a Docker auth config instead. - - // First, check $HOME/.docker/config.json - foundDockerConfig := false - home, err := homedir.Dir() - if err == nil { - foundDockerConfig = fileExists(filepath.Join(home, ".docker/config.json")) - } - // If $HOME/.docker/config.json isn't found, check $DOCKER_CONFIG (if set) - if !foundDockerConfig && os.Getenv("DOCKER_CONFIG") != "" { - foundDockerConfig = fileExists(filepath.Join(os.Getenv("DOCKER_CONFIG"), "config.json")) - } - // If either of those locations are found, load it using Docker's - // config.Load, which may fail if the config can't be parsed. - // - // If neither was found, look for Podman's auth at - // $XDG_RUNTIME_DIR/containers/auth.json and attempt to load it as a - // Docker config. - // - // If neither are found, fallback to Anonymous. - var cf *configfile.ConfigFile - if foundDockerConfig { - cf, err = config.Load(os.Getenv("DOCKER_CONFIG")) - if err != nil { - return nil, err - } - } else { - f, err := os.Open(filepath.Join(os.Getenv("XDG_RUNTIME_DIR"), "containers/auth.json")) - if err != nil { - return Anonymous, nil - } - defer f.Close() - cf, err = config.LoadFromReader(f) - if err != nil { - return nil, err - } - } - - // See: - // https://github.com/google/ko/issues/90 - // https://github.com/moby/moby/blob/fc01c2b481097a6057bec3cd1ab2d7b4488c50c4/registry/config.go#L397-L404 - var cfg, empty types.AuthConfig - for _, key := range []string{ - target.String(), - target.RegistryStr(), - } { - if key == name.DefaultRegistry { - key = DefaultAuthKey - } - - cfg, err = cf.GetAuthConfig(key) - if err != nil { - return nil, err - } - // cf.GetAuthConfig automatically sets the ServerAddress attribute. Since - // we don't make use of it, clear the value for a proper "is-empty" test. - // See: https://github.com/google/go-containerregistry/issues/1510 - cfg.ServerAddress = "" - if cfg != empty { - break - } - } - if cfg == empty { - return Anonymous, nil - } - - return FromConfig(AuthConfig{ - Username: cfg.Username, - Password: cfg.Password, - Auth: cfg.Auth, - IdentityToken: cfg.IdentityToken, - RegistryToken: cfg.RegistryToken, - }), nil -} - -// fileExists returns true if the given path exists and is not a directory. -func fileExists(path string) bool { - fi, err := os.Stat(path) - return err == nil && !fi.IsDir() -} - -// Helper is a subset of the Docker credential helper credentials.Helper -// interface used by NewKeychainFromHelper. -// -// See: -// https://pkg.go.dev/github.com/docker/docker-credential-helpers/credentials#Helper -type Helper interface { - Get(serverURL string) (string, string, error) -} - -// NewKeychainFromHelper returns a Keychain based on a Docker credential helper -// implementation that can Get username and password credentials for a given -// server URL. -func NewKeychainFromHelper(h Helper) Keychain { return wrapper{h} } - -type wrapper struct{ h Helper } - -func (w wrapper) Resolve(r Resource) (Authenticator, error) { - u, p, err := w.h.Get(r.RegistryStr()) - if err != nil { - return Anonymous, nil - } - // If the secret being stored is an identity token, the Username should be set to - // ref: https://docs.docker.com/engine/reference/commandline/login/#credential-helper-protocol - if u == "" { - return FromConfig(AuthConfig{Username: u, IdentityToken: p}), nil - } - return FromConfig(AuthConfig{Username: u, Password: p}), nil -} - -func RefreshingKeychain(inner Keychain, duration time.Duration) Keychain { - return &refreshingKeychain{ - keychain: inner, - duration: duration, - } -} - -type refreshingKeychain struct { - keychain Keychain - duration time.Duration - clock func() time.Time -} - -func (r *refreshingKeychain) Resolve(target Resource) (Authenticator, error) { - last := time.Now() - auth, err := r.keychain.Resolve(target) - if err != nil || auth == Anonymous { - return auth, err - } - return &refreshing{ - target: target, - keychain: r.keychain, - last: last, - cached: auth, - duration: r.duration, - clock: r.clock, - }, nil -} - -type refreshing struct { - sync.Mutex - target Resource - keychain Keychain - - duration time.Duration - - last time.Time - cached Authenticator - - // for testing - clock func() time.Time -} - -func (r *refreshing) Authorization() (*AuthConfig, error) { - r.Lock() - defer r.Unlock() - if r.cached == nil || r.expired() { - r.last = r.now() - auth, err := r.keychain.Resolve(r.target) - if err != nil { - return nil, err - } - r.cached = auth - } - return r.cached.Authorization() -} - -func (r *refreshing) now() time.Time { - if r.clock == nil { - return time.Now() - } - return r.clock() -} - -func (r *refreshing) expired() bool { - return r.now().Sub(r.last) > r.duration -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.go b/vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.go deleted file mode 100644 index 3b1804f5..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/authn/multikeychain.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 authn - -type multiKeychain struct { - keychains []Keychain -} - -// Assert that our multi-keychain implements Keychain. -var _ (Keychain) = (*multiKeychain)(nil) - -// NewMultiKeychain composes a list of keychains into one new keychain. -func NewMultiKeychain(kcs ...Keychain) Keychain { - return &multiKeychain{keychains: kcs} -} - -// Resolve implements Keychain. -func (mk *multiKeychain) Resolve(target Resource) (Authenticator, error) { - for _, kc := range mk.keychains { - auth, err := kc.Resolve(target) - if err != nil { - return nil, err - } - if auth != Anonymous { - return auth, nil - } - } - return Anonymous, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/compression/compression.go b/vendor/github.com/google/go-containerregistry/pkg/compression/compression.go deleted file mode 100644 index 6686c2d8..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/compression/compression.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2022 Google LLC All Rights Reserved. -// -// 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 compression abstracts over gzip and zstd. -package compression - -// Compression is an enumeration of the supported compression algorithms -type Compression string - -// The collection of known MediaType values. -const ( - None Compression = "none" - GZip Compression = "gzip" - ZStd Compression = "zstd" -) diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/append.go b/vendor/github.com/google/go-containerregistry/pkg/crane/append.go deleted file mode 100644 index f1c2ef69..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/append.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "fmt" - "os" - - "github.com/google/go-containerregistry/internal/windows" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/mutate" - "github.com/google/go-containerregistry/pkg/v1/stream" - "github.com/google/go-containerregistry/pkg/v1/tarball" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -func isWindows(img v1.Image) (bool, error) { - cfg, err := img.ConfigFile() - if err != nil { - return false, err - } - return cfg != nil && cfg.OS == "windows", nil -} - -// Append reads a layer from path and appends it the the v1.Image base. -// -// If the base image is a Windows base image (i.e., its config.OS is -// "windows"), the contents of the tarballs will be modified to be suitable for -// a Windows container image.`, -func Append(base v1.Image, paths ...string) (v1.Image, error) { - if base == nil { - return nil, fmt.Errorf("invalid argument: base") - } - - win, err := isWindows(base) - if err != nil { - return nil, fmt.Errorf("getting base image: %w", err) - } - - baseMediaType, err := base.MediaType() - - if err != nil { - return nil, fmt.Errorf("getting base image media type: %w", err) - } - - layerType := types.DockerLayer - - if baseMediaType == types.OCIManifestSchema1 { - layerType = types.OCILayer - } - - layers := make([]v1.Layer, 0, len(paths)) - for _, path := range paths { - layer, err := getLayer(path, layerType) - if err != nil { - return nil, fmt.Errorf("reading layer %q: %w", path, err) - } - - if win { - layer, err = windows.Windows(layer) - if err != nil { - return nil, fmt.Errorf("converting %q for Windows: %w", path, err) - } - } - - layers = append(layers, layer) - } - - return mutate.AppendLayers(base, layers...) -} - -func getLayer(path string, layerType types.MediaType) (v1.Layer, error) { - f, err := streamFile(path) - if err != nil { - return nil, err - } - if f != nil { - return stream.NewLayer(f, stream.WithMediaType(layerType)), nil - } - - return tarball.LayerFromFile(path, tarball.WithMediaType(layerType)) -} - -// If we're dealing with a named pipe, trying to open it multiple times will -// fail, so we need to do a streaming upload. -// -// returns nil, nil for non-streaming files -func streamFile(path string) (*os.File, error) { - if path == "-" { - return os.Stdin, nil - } - fi, err := os.Stat(path) - if err != nil { - return nil, err - } - - if !fi.Mode().IsRegular() { - return os.Open(path) - } - - return nil, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/catalog.go b/vendor/github.com/google/go-containerregistry/pkg/crane/catalog.go deleted file mode 100644 index f30800cc..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/catalog.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "context" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -// Catalog returns the repositories in a registry's catalog. -func Catalog(src string, opt ...Option) (res []string, err error) { - o := makeOptions(opt...) - reg, err := name.NewRegistry(src, o.Name...) - if err != nil { - return nil, err - } - - // This context gets overridden by remote.WithContext, which is set by - // crane.WithContext. - return remote.Catalog(context.Background(), reg, o.Remote...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/config.go b/vendor/github.com/google/go-containerregistry/pkg/crane/config.go deleted file mode 100644 index 3e55cc93..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/config.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -// Config returns the config file for the remote image ref. -func Config(ref string, opt ...Option) ([]byte, error) { - i, _, err := getImage(ref, opt...) - if err != nil { - return nil, err - } - return i.RawConfigFile() -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/copy.go b/vendor/github.com/google/go-containerregistry/pkg/crane/copy.go deleted file mode 100644 index bbdf5481..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/copy.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "errors" - "fmt" - "net/http" - - "github.com/google/go-containerregistry/pkg/logs" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" - "golang.org/x/sync/errgroup" -) - -// Copy copies a remote image or index from src to dst. -func Copy(src, dst string, opt ...Option) error { - o := makeOptions(opt...) - srcRef, err := name.ParseReference(src, o.Name...) - if err != nil { - return fmt.Errorf("parsing reference %q: %w", src, err) - } - - dstRef, err := name.ParseReference(dst, o.Name...) - if err != nil { - return fmt.Errorf("parsing reference for %q: %w", dst, err) - } - - puller, err := remote.NewPuller(o.Remote...) - if err != nil { - return err - } - - if tag, ok := dstRef.(name.Tag); ok { - if o.noclobber { - logs.Progress.Printf("Checking existing tag %v", tag) - head, err := puller.Head(o.ctx, tag) - var terr *transport.Error - if errors.As(err, &terr) { - if terr.StatusCode != http.StatusNotFound && terr.StatusCode != http.StatusForbidden { - return err - } - } else if err != nil { - return err - } - - if head != nil { - return fmt.Errorf("refusing to clobber existing tag %s@%s", tag, head.Digest) - } - } - } - - pusher, err := remote.NewPusher(o.Remote...) - if err != nil { - return err - } - - logs.Progress.Printf("Copying from %v to %v", srcRef, dstRef) - desc, err := puller.Get(o.ctx, srcRef) - if err != nil { - return fmt.Errorf("fetching %q: %w", src, err) - } - - if o.Platform == nil { - return pusher.Push(o.ctx, dstRef, desc) - } - - // If platform is explicitly set, don't copy the whole index, just the appropriate image. - img, err := desc.Image() - if err != nil { - return err - } - return pusher.Push(o.ctx, dstRef, img) -} - -// CopyRepository copies every tag from src to dst. -func CopyRepository(src, dst string, opt ...Option) error { - o := makeOptions(opt...) - - srcRepo, err := name.NewRepository(src, o.Name...) - if err != nil { - return err - } - - dstRepo, err := name.NewRepository(dst, o.Name...) - if err != nil { - return fmt.Errorf("parsing reference for %q: %w", dst, err) - } - - puller, err := remote.NewPuller(o.Remote...) - if err != nil { - return err - } - - ignoredTags := map[string]struct{}{} - if o.noclobber { - // TODO: It would be good to propagate noclobber down into remote so we can use Etags. - have, err := puller.List(o.ctx, dstRepo) - if err != nil { - var terr *transport.Error - if errors.As(err, &terr) { - // Some registries create repository on first push, so listing tags will fail. - // If we see 404 or 403, assume we failed because the repository hasn't been created yet. - if !(terr.StatusCode == http.StatusNotFound || terr.StatusCode == http.StatusForbidden) { - return err - } - } else { - return err - } - } - for _, tag := range have { - ignoredTags[tag] = struct{}{} - } - } - - pusher, err := remote.NewPusher(o.Remote...) - if err != nil { - return err - } - - lister, err := puller.Lister(o.ctx, srcRepo) - if err != nil { - return err - } - - g, ctx := errgroup.WithContext(o.ctx) - g.SetLimit(o.jobs) - - for lister.HasNext() { - tags, err := lister.Next(ctx) - if err != nil { - return err - } - - for _, tag := range tags.Tags { - tag := tag - - if o.noclobber { - if _, ok := ignoredTags[tag]; ok { - logs.Progress.Printf("Skipping %s due to no-clobber", tag) - continue - } - } - - g.Go(func() error { - srcTag, err := name.ParseReference(src+":"+tag, o.Name...) - if err != nil { - return fmt.Errorf("failed to parse tag: %w", err) - } - dstTag, err := name.ParseReference(dst+":"+tag, o.Name...) - if err != nil { - return fmt.Errorf("failed to parse tag: %w", err) - } - - logs.Progress.Printf("Fetching %s", srcTag) - desc, err := puller.Get(ctx, srcTag) - if err != nil { - return err - } - - logs.Progress.Printf("Pushing %s", dstTag) - return pusher.Push(ctx, dstTag, desc) - }) - } - } - - return g.Wait() -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/delete.go b/vendor/github.com/google/go-containerregistry/pkg/crane/delete.go deleted file mode 100644 index 58a8be1f..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/delete.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "fmt" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -// Delete deletes the remote reference at src. -func Delete(src string, opt ...Option) error { - o := makeOptions(opt...) - ref, err := name.ParseReference(src, o.Name...) - if err != nil { - return fmt.Errorf("parsing reference %q: %w", src, err) - } - - return remote.Delete(ref, o.Remote...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/digest.go b/vendor/github.com/google/go-containerregistry/pkg/crane/digest.go deleted file mode 100644 index 868a5701..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/digest.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import "github.com/google/go-containerregistry/pkg/logs" - -// Digest returns the sha256 hash of the remote image at ref. -func Digest(ref string, opt ...Option) (string, error) { - o := makeOptions(opt...) - if o.Platform != nil { - desc, err := getManifest(ref, opt...) - if err != nil { - return "", err - } - if !desc.MediaType.IsIndex() { - return desc.Digest.String(), nil - } - - // TODO: does not work for indexes which contain schema v1 manifests - img, err := desc.Image() - if err != nil { - return "", err - } - digest, err := img.Digest() - if err != nil { - return "", err - } - return digest.String(), nil - } - desc, err := Head(ref, opt...) - if err != nil { - logs.Warn.Printf("HEAD request failed, falling back on GET: %v", err) - rdesc, err := getManifest(ref, opt...) - if err != nil { - return "", err - } - return rdesc.Digest.String(), nil - } - return desc.Digest.String(), nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/doc.go b/vendor/github.com/google/go-containerregistry/pkg/crane/doc.go deleted file mode 100644 index 7602d795..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 crane holds libraries used to implement the crane CLI. -package crane diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/export.go b/vendor/github.com/google/go-containerregistry/pkg/crane/export.go deleted file mode 100644 index b5e1296d..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/export.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "io" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/mutate" -) - -// Export writes the filesystem contents (as a tarball) of img to w. -// If img has a single layer, just write the (uncompressed) contents to w so -// that this "just works" for images that just wrap a single blob. -func Export(img v1.Image, w io.Writer) error { - layers, err := img.Layers() - if err != nil { - return err - } - if len(layers) == 1 { - // If it's a single layer... - l := layers[0] - mt, err := l.MediaType() - if err != nil { - return err - } - - if !mt.IsLayer() { - // ...and isn't an OCI mediaType, we don't have to flatten it. - // This lets export work for single layer, non-tarball images. - rc, err := l.Uncompressed() - if err != nil { - return err - } - _, err = io.Copy(w, rc) - return err - } - } - fs := mutate.Extract(img) - _, err = io.Copy(w, fs) - return err -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/filemap.go b/vendor/github.com/google/go-containerregistry/pkg/crane/filemap.go deleted file mode 100644 index 36dfc2a6..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/filemap.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "archive/tar" - "bytes" - "io" - "sort" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/empty" - "github.com/google/go-containerregistry/pkg/v1/mutate" - "github.com/google/go-containerregistry/pkg/v1/tarball" -) - -// Layer creates a layer from a single file map. These layers are reproducible and consistent. -// A filemap is a path -> file content map representing a file system. -func Layer(filemap map[string][]byte) (v1.Layer, error) { - b := &bytes.Buffer{} - w := tar.NewWriter(b) - - fn := []string{} - for f := range filemap { - fn = append(fn, f) - } - sort.Strings(fn) - - for _, f := range fn { - c := filemap[f] - if err := w.WriteHeader(&tar.Header{ - Name: f, - Size: int64(len(c)), - }); err != nil { - return nil, err - } - if _, err := w.Write(c); err != nil { - return nil, err - } - } - if err := w.Close(); err != nil { - return nil, err - } - - // Return a new copy of the buffer each time it's opened. - return tarball.LayerFromOpener(func() (io.ReadCloser, error) { - return io.NopCloser(bytes.NewBuffer(b.Bytes())), nil - }) -} - -// Image creates a image with the given filemaps as its contents. These images are reproducible and consistent. -// A filemap is a path -> file content map representing a file system. -func Image(filemap map[string][]byte) (v1.Image, error) { - y, err := Layer(filemap) - if err != nil { - return nil, err - } - - return mutate.AppendLayers(empty.Image, y) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/get.go b/vendor/github.com/google/go-containerregistry/pkg/crane/get.go deleted file mode 100644 index 98a2e893..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/get.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "fmt" - - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -func getImage(r string, opt ...Option) (v1.Image, name.Reference, error) { - o := makeOptions(opt...) - ref, err := name.ParseReference(r, o.Name...) - if err != nil { - return nil, nil, fmt.Errorf("parsing reference %q: %w", r, err) - } - img, err := remote.Image(ref, o.Remote...) - if err != nil { - return nil, nil, fmt.Errorf("reading image %q: %w", ref, err) - } - return img, ref, nil -} - -func getManifest(r string, opt ...Option) (*remote.Descriptor, error) { - o := makeOptions(opt...) - ref, err := name.ParseReference(r, o.Name...) - if err != nil { - return nil, fmt.Errorf("parsing reference %q: %w", r, err) - } - return remote.Get(ref, o.Remote...) -} - -// Get calls remote.Get and returns an uninterpreted response. -func Get(r string, opt ...Option) (*remote.Descriptor, error) { - return getManifest(r, opt...) -} - -// Head performs a HEAD request for a manifest and returns a content descriptor -// based on the registry's response. -func Head(r string, opt ...Option) (*v1.Descriptor, error) { - o := makeOptions(opt...) - ref, err := name.ParseReference(r, o.Name...) - if err != nil { - return nil, err - } - return remote.Head(ref, o.Remote...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/list.go b/vendor/github.com/google/go-containerregistry/pkg/crane/list.go deleted file mode 100644 index 38352153..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/list.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "fmt" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -// ListTags returns the tags in repository src. -func ListTags(src string, opt ...Option) ([]string, error) { - o := makeOptions(opt...) - repo, err := name.NewRepository(src, o.Name...) - if err != nil { - return nil, fmt.Errorf("parsing repo %q: %w", src, err) - } - - return remote.List(repo, o.Remote...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/manifest.go b/vendor/github.com/google/go-containerregistry/pkg/crane/manifest.go deleted file mode 100644 index a54926ae..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/manifest.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -// Manifest returns the manifest for the remote image or index ref. -func Manifest(ref string, opt ...Option) ([]byte, error) { - desc, err := getManifest(ref, opt...) - if err != nil { - return nil, err - } - o := makeOptions(opt...) - if o.Platform != nil { - img, err := desc.Image() - if err != nil { - return nil, err - } - return img.RawManifest() - } - return desc.Manifest, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/options.go b/vendor/github.com/google/go-containerregistry/pkg/crane/options.go deleted file mode 100644 index d9d44176..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/options.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "context" - "crypto/tls" - "net/http" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -// Options hold the options that crane uses when calling other packages. -type Options struct { - Name []name.Option - Remote []remote.Option - Platform *v1.Platform - Keychain authn.Keychain - Transport http.RoundTripper - - auth authn.Authenticator - insecure bool - jobs int - noclobber bool - ctx context.Context -} - -// GetOptions exposes the underlying []remote.Option, []name.Option, and -// platform, based on the passed Option. Generally, you shouldn't need to use -// this unless you've painted yourself into a dependency corner as we have -// with the crane and gcrane cli packages. -func GetOptions(opts ...Option) Options { - return makeOptions(opts...) -} - -func makeOptions(opts ...Option) Options { - opt := Options{ - Remote: []remote.Option{ - remote.WithAuthFromKeychain(authn.DefaultKeychain), - }, - Keychain: authn.DefaultKeychain, - jobs: 4, - ctx: context.Background(), - } - - for _, o := range opts { - o(&opt) - } - - // Allow for untrusted certificates if the user - // passed Insecure but no custom transport. - if opt.insecure && opt.Transport == nil { - transport := remote.DefaultTransport.(*http.Transport).Clone() - transport.TLSClientConfig = &tls.Config{ - InsecureSkipVerify: true, //nolint: gosec - } - - WithTransport(transport)(&opt) - } else if opt.Transport == nil { - opt.Transport = remote.DefaultTransport - } - - return opt -} - -// Option is a functional option for crane. -type Option func(*Options) - -// WithTransport is a functional option for overriding the default transport -// for remote operations. Setting a transport will override the Insecure option's -// configuration allowing for image registries to use untrusted certificates. -func WithTransport(t http.RoundTripper) Option { - return func(o *Options) { - o.Remote = append(o.Remote, remote.WithTransport(t)) - o.Transport = t - } -} - -// Insecure is an Option that allows image references to be fetched without TLS. -// This will also allow for untrusted (e.g. self-signed) certificates in cases where -// the default transport is used (i.e. when WithTransport is not used). -func Insecure(o *Options) { - o.Name = append(o.Name, name.Insecure) - o.insecure = true -} - -// WithPlatform is an Option to specify the platform. -func WithPlatform(platform *v1.Platform) Option { - return func(o *Options) { - if platform != nil { - o.Remote = append(o.Remote, remote.WithPlatform(*platform)) - } - o.Platform = platform - } -} - -// WithAuthFromKeychain is a functional option for overriding the default -// authenticator for remote operations, using an authn.Keychain to find -// credentials. -// -// By default, crane will use authn.DefaultKeychain. -func WithAuthFromKeychain(keys authn.Keychain) Option { - return func(o *Options) { - // Replace the default keychain at position 0. - o.Remote[0] = remote.WithAuthFromKeychain(keys) - o.Keychain = keys - } -} - -// WithAuth is a functional option for overriding the default authenticator -// for remote operations. -// -// By default, crane will use authn.DefaultKeychain. -func WithAuth(auth authn.Authenticator) Option { - return func(o *Options) { - // Replace the default keychain at position 0. - o.Remote[0] = remote.WithAuth(auth) - o.auth = auth - } -} - -// WithUserAgent adds the given string to the User-Agent header for any HTTP -// requests. -func WithUserAgent(ua string) Option { - return func(o *Options) { - o.Remote = append(o.Remote, remote.WithUserAgent(ua)) - } -} - -// WithNondistributable is an option that allows pushing non-distributable -// layers. -func WithNondistributable() Option { - return func(o *Options) { - o.Remote = append(o.Remote, remote.WithNondistributable) - } -} - -// WithContext is a functional option for setting the context. -func WithContext(ctx context.Context) Option { - return func(o *Options) { - o.ctx = ctx - o.Remote = append(o.Remote, remote.WithContext(ctx)) - } -} - -// WithJobs sets the number of concurrent jobs to run. -// -// The default number of jobs is GOMAXPROCS. -func WithJobs(jobs int) Option { - return func(o *Options) { - if jobs > 0 { - o.jobs = jobs - } - o.Remote = append(o.Remote, remote.WithJobs(o.jobs)) - } -} - -// WithNoClobber modifies behavior to avoid overwriting existing tags, if possible. -func WithNoClobber(noclobber bool) Option { - return func(o *Options) { - o.noclobber = noclobber - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/pull.go b/vendor/github.com/google/go-containerregistry/pkg/crane/pull.go deleted file mode 100644 index 7e6e5b7b..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/pull.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "fmt" - "os" - - legacy "github.com/google/go-containerregistry/pkg/legacy/tarball" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/empty" - "github.com/google/go-containerregistry/pkg/v1/layout" - "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/google/go-containerregistry/pkg/v1/tarball" -) - -// Tag applied to images that were pulled by digest. This denotes that the -// image was (probably) never tagged with this, but lets us avoid applying the -// ":latest" tag which might be misleading. -const iWasADigestTag = "i-was-a-digest" - -// Pull returns a v1.Image of the remote image src. -func Pull(src string, opt ...Option) (v1.Image, error) { - o := makeOptions(opt...) - ref, err := name.ParseReference(src, o.Name...) - if err != nil { - return nil, fmt.Errorf("parsing reference %q: %w", src, err) - } - - return remote.Image(ref, o.Remote...) -} - -// Save writes the v1.Image img as a tarball at path with tag src. -func Save(img v1.Image, src, path string) error { - imgMap := map[string]v1.Image{src: img} - return MultiSave(imgMap, path) -} - -// MultiSave writes collection of v1.Image img with tag as a tarball. -func MultiSave(imgMap map[string]v1.Image, path string, opt ...Option) error { - o := makeOptions(opt...) - tagToImage := map[name.Tag]v1.Image{} - - for src, img := range imgMap { - ref, err := name.ParseReference(src, o.Name...) - if err != nil { - return fmt.Errorf("parsing ref %q: %w", src, err) - } - - // WriteToFile wants a tag to write to the tarball, but we might have - // been given a digest. - // If the original ref was a tag, use that. Otherwise, if it was a - // digest, tag the image with :i-was-a-digest instead. - tag, ok := ref.(name.Tag) - if !ok { - d, ok := ref.(name.Digest) - if !ok { - return fmt.Errorf("ref wasn't a tag or digest") - } - tag = d.Repository.Tag(iWasADigestTag) - } - tagToImage[tag] = img - } - // no progress channel (for now) - return tarball.MultiWriteToFile(path, tagToImage) -} - -// PullLayer returns the given layer from a registry. -func PullLayer(ref string, opt ...Option) (v1.Layer, error) { - o := makeOptions(opt...) - digest, err := name.NewDigest(ref, o.Name...) - if err != nil { - return nil, err - } - - return remote.Layer(digest, o.Remote...) -} - -// SaveLegacy writes the v1.Image img as a legacy tarball at path with tag src. -func SaveLegacy(img v1.Image, src, path string) error { - imgMap := map[string]v1.Image{src: img} - return MultiSave(imgMap, path) -} - -// MultiSaveLegacy writes collection of v1.Image img with tag as a legacy tarball. -func MultiSaveLegacy(imgMap map[string]v1.Image, path string) error { - refToImage := map[name.Reference]v1.Image{} - - for src, img := range imgMap { - ref, err := name.ParseReference(src) - if err != nil { - return fmt.Errorf("parsing ref %q: %w", src, err) - } - refToImage[ref] = img - } - - w, err := os.Create(path) - if err != nil { - return err - } - defer w.Close() - - return legacy.MultiWrite(refToImage, w) -} - -// SaveOCI writes the v1.Image img as an OCI Image Layout at path. If a layout -// already exists at that path, it will add the image to the index. -func SaveOCI(img v1.Image, path string) error { - imgMap := map[string]v1.Image{"": img} - return MultiSaveOCI(imgMap, path) -} - -// MultiSaveOCI writes collection of v1.Image img as an OCI Image Layout at path. If a layout -// already exists at that path, it will add the image to the index. -func MultiSaveOCI(imgMap map[string]v1.Image, path string) error { - p, err := layout.FromPath(path) - if err != nil { - p, err = layout.Write(path, empty.Index) - if err != nil { - return err - } - } - for _, img := range imgMap { - if err = p.AppendImage(img); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/push.go b/vendor/github.com/google/go-containerregistry/pkg/crane/push.go deleted file mode 100644 index 90a05850..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/push.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "fmt" - - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/google/go-containerregistry/pkg/v1/tarball" -) - -// Load reads the tarball at path as a v1.Image. -func Load(path string, opt ...Option) (v1.Image, error) { - return LoadTag(path, "", opt...) -} - -// LoadTag reads a tag from the tarball at path as a v1.Image. -// If tag is "", will attempt to read the tarball as a single image. -func LoadTag(path, tag string, opt ...Option) (v1.Image, error) { - if tag == "" { - return tarball.ImageFromPath(path, nil) - } - - o := makeOptions(opt...) - t, err := name.NewTag(tag, o.Name...) - if err != nil { - return nil, fmt.Errorf("parsing tag %q: %w", tag, err) - } - return tarball.ImageFromPath(path, &t) -} - -// Push pushes the v1.Image img to a registry as dst. -func Push(img v1.Image, dst string, opt ...Option) error { - o := makeOptions(opt...) - tag, err := name.ParseReference(dst, o.Name...) - if err != nil { - return fmt.Errorf("parsing reference %q: %w", dst, err) - } - return remote.Write(tag, img, o.Remote...) -} - -// Upload pushes the v1.Layer to a given repo. -func Upload(layer v1.Layer, repo string, opt ...Option) error { - o := makeOptions(opt...) - ref, err := name.NewRepository(repo, o.Name...) - if err != nil { - return fmt.Errorf("parsing repo %q: %w", repo, err) - } - - return remote.WriteLayer(ref, layer, o.Remote...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/crane/tag.go b/vendor/github.com/google/go-containerregistry/pkg/crane/tag.go deleted file mode 100644 index 13bc3958..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/crane/tag.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 crane - -import ( - "fmt" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -// Tag adds tag to the remote img. -func Tag(img, tag string, opt ...Option) error { - o := makeOptions(opt...) - ref, err := name.ParseReference(img, o.Name...) - if err != nil { - return fmt.Errorf("parsing reference %q: %w", img, err) - } - desc, err := remote.Get(ref, o.Remote...) - if err != nil { - return fmt.Errorf("fetching %q: %w", img, err) - } - - dst := ref.Context().Tag(tag) - - return remote.Tag(dst, desc, o.Remote...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/legacy/config.go b/vendor/github.com/google/go-containerregistry/pkg/legacy/config.go deleted file mode 100644 index 3364bec6..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/legacy/config.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 legacy - -import ( - v1 "github.com/google/go-containerregistry/pkg/v1" -) - -// LayerConfigFile is the configuration file that holds the metadata describing -// a v1 layer. See: -// https://github.com/moby/moby/blob/master/image/spec/v1.md -type LayerConfigFile struct { - v1.ConfigFile - - ContainerConfig v1.Config `json:"container_config,omitempty"` - - ID string `json:"id,omitempty"` - Parent string `json:"parent,omitempty"` - Throwaway bool `json:"throwaway,omitempty"` - Comment string `json:"comment,omitempty"` -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/legacy/doc.go b/vendor/github.com/google/go-containerregistry/pkg/legacy/doc.go deleted file mode 100644 index 1d166888..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/legacy/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 legacy provides functionality to work with docker images in the v1 -// format. -// See: https://github.com/moby/moby/blob/master/image/spec/v1.md -package legacy diff --git a/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/README.md b/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/README.md deleted file mode 100644 index 90b88c75..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# `legacy/tarball` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/legacy/tarball?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/legacy/tarball) - -This package implements support for writing legacy tarballs, as described -[here](https://github.com/moby/moby/blob/749d90e10f989802638ae542daf54257f3bf71f2/image/spec/v1.2.md#combined-image-json--filesystem-changeset-format). diff --git a/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/doc.go b/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/doc.go deleted file mode 100644 index 62684d6e..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 tarball provides facilities for writing v1 docker images -// (https://github.com/moby/moby/blob/master/image/spec/v1.md) from/to a tarball -// on-disk. -package tarball diff --git a/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/write.go b/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/write.go deleted file mode 100644 index 627bfbfd..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/legacy/tarball/write.go +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 tarball - -import ( - "archive/tar" - "bytes" - "encoding/json" - "fmt" - "io" - "sort" - "strings" - - "github.com/google/go-containerregistry/pkg/legacy" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/tarball" -) - -// repositoriesTarDescriptor represents the repositories file inside a `docker save` tarball. -type repositoriesTarDescriptor map[string]map[string]string - -// v1Layer represents a layer with metadata needed by the v1 image spec https://github.com/moby/moby/blob/master/image/spec/v1.md. -type v1Layer struct { - // config is the layer metadata. - config *legacy.LayerConfigFile - // layer is the v1.Layer object this v1Layer represents. - layer v1.Layer -} - -// json returns the raw bytes of the json metadata of the given v1Layer. -func (l *v1Layer) json() ([]byte, error) { - return json.Marshal(l.config) -} - -// version returns the raw bytes of the "VERSION" file of the given v1Layer. -func (l *v1Layer) version() []byte { - return []byte("1.0") -} - -// v1LayerID computes the v1 image format layer id for the given v1.Layer with the given v1 parent ID and raw image config. -func v1LayerID(layer v1.Layer, parentID string, rawConfig []byte) (string, error) { - d, err := layer.Digest() - if err != nil { - return "", fmt.Errorf("unable to get layer digest to generate v1 layer ID: %w", err) - } - s := fmt.Sprintf("%s %s", d.Hex, parentID) - if len(rawConfig) != 0 { - s = fmt.Sprintf("%s %s", s, string(rawConfig)) - } - - h, _, _ := v1.SHA256(strings.NewReader(s)) - return h.Hex, nil -} - -// newTopV1Layer creates a new v1Layer for a layer other than the top layer in a v1 image tarball. -func newV1Layer(layer v1.Layer, parent *v1Layer, history v1.History) (*v1Layer, error) { - parentID := "" - if parent != nil { - parentID = parent.config.ID - } - id, err := v1LayerID(layer, parentID, nil) - if err != nil { - return nil, fmt.Errorf("unable to generate v1 layer ID: %w", err) - } - result := &v1Layer{ - layer: layer, - config: &legacy.LayerConfigFile{ - ConfigFile: v1.ConfigFile{ - Created: history.Created, - Author: history.Author, - }, - ContainerConfig: v1.Config{ - Cmd: []string{history.CreatedBy}, - }, - ID: id, - Parent: parentID, - Throwaway: history.EmptyLayer, - Comment: history.Comment, - }, - } - return result, nil -} - -// newTopV1Layer creates a new v1Layer for the top layer in a v1 image tarball. -func newTopV1Layer(layer v1.Layer, parent *v1Layer, history v1.History, imgConfig *v1.ConfigFile, rawConfig []byte) (*v1Layer, error) { - result, err := newV1Layer(layer, parent, history) - if err != nil { - return nil, err - } - id, err := v1LayerID(layer, result.config.Parent, rawConfig) - if err != nil { - return nil, fmt.Errorf("unable to generate v1 layer ID for top layer: %w", err) - } - result.config.ID = id - result.config.Architecture = imgConfig.Architecture - result.config.Container = imgConfig.Container - result.config.DockerVersion = imgConfig.DockerVersion - result.config.OS = imgConfig.OS - result.config.Config = imgConfig.Config - result.config.Created = imgConfig.Created - return result, nil -} - -// splitTag splits the given tagged image name /: -// into / and . -func splitTag(name string) (string, string) { - // Split on ":" - parts := strings.Split(name, ":") - // Verify that we aren't confusing a tag for a hostname w/ port for the purposes of weak validation. - if len(parts) > 1 && !strings.Contains(parts[len(parts)-1], "/") { - base := strings.Join(parts[:len(parts)-1], ":") - tag := parts[len(parts)-1] - return base, tag - } - return name, "" -} - -// addTags adds the given image tags to the given "repositories" file descriptor in a v1 image tarball. -func addTags(repos repositoriesTarDescriptor, tags []string, topLayerID string) { - for _, t := range tags { - base, tag := splitTag(t) - tagToID, ok := repos[base] - if !ok { - tagToID = make(map[string]string) - repos[base] = tagToID - } - tagToID[tag] = topLayerID - } -} - -// updateLayerSources updates the given layer digest to descriptor map with the descriptor of the given layer in the given image if it's an undistributable layer. -func updateLayerSources(layerSources map[v1.Hash]v1.Descriptor, layer v1.Layer, img v1.Image) error { - d, err := layer.Digest() - if err != nil { - return err - } - // Add to LayerSources if it's a foreign layer. - desc, err := partial.BlobDescriptor(img, d) - if err != nil { - return err - } - if !desc.MediaType.IsDistributable() { - diffid, err := partial.BlobToDiffID(img, d) - if err != nil { - return err - } - layerSources[diffid] = *desc - } - return nil -} - -// Write is a wrapper to write a single image in V1 format and tag to a tarball. -func Write(ref name.Reference, img v1.Image, w io.Writer) error { - return MultiWrite(map[name.Reference]v1.Image{ref: img}, w) -} - -// filterEmpty filters out the history corresponding to empty layers from the -// given history. -func filterEmpty(h []v1.History) []v1.History { - result := []v1.History{} - for _, i := range h { - if i.EmptyLayer { - continue - } - result = append(result, i) - } - return result -} - -// MultiWrite writes the contents of each image to the provided reader, in the V1 image tarball format. -// The contents are written in the following format: -// One manifest.json file at the top level containing information about several images. -// One repositories file mapping from the image / to to the id of the top most layer. -// For every layer, a directory named with the layer ID is created with the following contents: -// -// layer.tar - The uncompressed layer tarball. -// .json- Layer metadata json. -// VERSION- Schema version string. Always set to "1.0". -// -// One file for the config blob, named after its SHA. -func MultiWrite(refToImage map[name.Reference]v1.Image, w io.Writer) error { - tf := tar.NewWriter(w) - defer tf.Close() - - sortedImages, imageToTags := dedupRefToImage(refToImage) - var m tarball.Manifest - repos := make(repositoriesTarDescriptor) - - seenLayerIDs := make(map[string]struct{}) - for _, img := range sortedImages { - tags := imageToTags[img] - - // Write the config. - cfgName, err := img.ConfigName() - if err != nil { - return err - } - cfgFileName := fmt.Sprintf("%s.json", cfgName.Hex) - cfgBlob, err := img.RawConfigFile() - if err != nil { - return err - } - if err := writeTarEntry(tf, cfgFileName, bytes.NewReader(cfgBlob), int64(len(cfgBlob))); err != nil { - return err - } - cfg, err := img.ConfigFile() - if err != nil { - return err - } - - // Store foreign layer info. - layerSources := make(map[v1.Hash]v1.Descriptor) - - // Write the layers. - layers, err := img.Layers() - if err != nil { - return err - } - history := filterEmpty(cfg.History) - // Create a blank config history if the config didn't have a history. - if len(history) == 0 && len(layers) != 0 { - history = make([]v1.History, len(layers)) - } else if len(layers) != len(history) { - return fmt.Errorf("image config had layer history which did not match the number of layers, got len(history)=%d, len(layers)=%d, want len(history)=len(layers)", len(history), len(layers)) - } - layerFiles := make([]string, len(layers)) - var prev *v1Layer - for i, l := range layers { - if err := updateLayerSources(layerSources, l, img); err != nil { - return fmt.Errorf("unable to update image metadata to include undistributable layer source information: %w", err) - } - var cur *v1Layer - if i < (len(layers) - 1) { - cur, err = newV1Layer(l, prev, history[i]) - } else { - cur, err = newTopV1Layer(l, prev, history[i], cfg, cfgBlob) - } - if err != nil { - return err - } - layerFiles[i] = fmt.Sprintf("%s/layer.tar", cur.config.ID) - if _, ok := seenLayerIDs[cur.config.ID]; ok { - prev = cur - continue - } - seenLayerIDs[cur.config.ID] = struct{}{} - - // If the v1.Layer implements UncompressedSize efficiently, use that - // for the tar header. Otherwise, this iterates over Uncompressed(). - // NOTE: If using a streaming layer, this may consume the layer. - size, err := partial.UncompressedSize(l) - if err != nil { - return err - } - u, err := l.Uncompressed() - if err != nil { - return err - } - defer u.Close() - if err := writeTarEntry(tf, layerFiles[i], u, size); err != nil { - return err - } - - j, err := cur.json() - if err != nil { - return err - } - if err := writeTarEntry(tf, fmt.Sprintf("%s/json", cur.config.ID), bytes.NewReader(j), int64(len(j))); err != nil { - return err - } - v := cur.version() - if err := writeTarEntry(tf, fmt.Sprintf("%s/VERSION", cur.config.ID), bytes.NewReader(v), int64(len(v))); err != nil { - return err - } - prev = cur - } - - // Generate the tar descriptor and write it. - m = append(m, tarball.Descriptor{ - Config: cfgFileName, - RepoTags: tags, - Layers: layerFiles, - LayerSources: layerSources, - }) - // prev should be the top layer here. Use it to add the image tags - // to the tarball repositories file. - addTags(repos, tags, prev.config.ID) - } - - mBytes, err := json.Marshal(m) - if err != nil { - return err - } - - if err := writeTarEntry(tf, "manifest.json", bytes.NewReader(mBytes), int64(len(mBytes))); err != nil { - return err - } - reposBytes, err := json.Marshal(&repos) - if err != nil { - return err - } - return writeTarEntry(tf, "repositories", bytes.NewReader(reposBytes), int64(len(reposBytes))) -} - -func dedupRefToImage(refToImage map[name.Reference]v1.Image) ([]v1.Image, map[v1.Image][]string) { - imageToTags := make(map[v1.Image][]string) - - for ref, img := range refToImage { - if tag, ok := ref.(name.Tag); ok { - if tags, ok := imageToTags[img]; ok && tags != nil { - imageToTags[img] = append(tags, tag.String()) - } else { - imageToTags[img] = []string{tag.String()} - } - } else { - if _, ok := imageToTags[img]; !ok { - imageToTags[img] = nil - } - } - } - - // Force specific order on tags - imgs := []v1.Image{} - for img, tags := range imageToTags { - sort.Strings(tags) - imgs = append(imgs, img) - } - - sort.Slice(imgs, func(i, j int) bool { - cfI, err := imgs[i].ConfigName() - if err != nil { - return false - } - cfJ, err := imgs[j].ConfigName() - if err != nil { - return false - } - return cfI.Hex < cfJ.Hex - }) - - return imgs, imageToTags -} - -// Writes a file to the provided writer with a corresponding tar header -func writeTarEntry(tf *tar.Writer, path string, r io.Reader, size int64) error { - hdr := &tar.Header{ - Mode: 0644, - Typeflag: tar.TypeReg, - Size: size, - Name: path, - } - if err := tf.WriteHeader(hdr); err != nil { - return err - } - _, err := io.Copy(tf, r) - return err -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/logs/logs.go b/vendor/github.com/google/go-containerregistry/pkg/logs/logs.go deleted file mode 100644 index a5d25b18..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/logs/logs.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 logs exposes the loggers used by this library. -package logs - -import ( - "io" - "log" -) - -var ( - // Warn is used to log non-fatal errors. - Warn = log.New(io.Discard, "", log.LstdFlags) - - // Progress is used to log notable, successful events. - Progress = log.New(io.Discard, "", log.LstdFlags) - - // Debug is used to log information that is useful for debugging. - Debug = log.New(io.Discard, "", log.LstdFlags) -) - -// Enabled checks to see if the logger's writer is set to something other -// than io.Discard. This allows callers to avoid expensive operations -// that will end up in /dev/null anyway. -func Enabled(l *log.Logger) bool { - return l.Writer() != io.Discard -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/README.md b/vendor/github.com/google/go-containerregistry/pkg/name/README.md deleted file mode 100644 index 4889b844..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `name` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/name?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/name) diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/check.go b/vendor/github.com/google/go-containerregistry/pkg/name/check.go deleted file mode 100644 index e9a240a3..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/check.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -import ( - "strings" - "unicode/utf8" -) - -// stripRunesFn returns a function which returns -1 (i.e. a value which -// signals deletion in strings.Map) for runes in 'runes', and the rune otherwise. -func stripRunesFn(runes string) func(rune) rune { - return func(r rune) rune { - if strings.ContainsRune(runes, r) { - return -1 - } - return r - } -} - -// checkElement checks a given named element matches character and length restrictions. -// Returns true if the given element adheres to the given restrictions, false otherwise. -func checkElement(name, element, allowedRunes string, minRunes, maxRunes int) error { - numRunes := utf8.RuneCountInString(element) - if (numRunes < minRunes) || (maxRunes < numRunes) { - return newErrBadName("%s must be between %d and %d characters in length: %s", name, minRunes, maxRunes, element) - } else if len(strings.Map(stripRunesFn(allowedRunes), element)) != 0 { - return newErrBadName("%s can only contain the characters `%s`: %s", name, allowedRunes, element) - } - return nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/digest.go b/vendor/github.com/google/go-containerregistry/pkg/name/digest.go deleted file mode 100644 index c049c1ef..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/digest.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -import ( - // nolint: depguard - _ "crypto/sha256" // Recommended by go-digest. - "strings" - - "github.com/opencontainers/go-digest" -) - -const digestDelim = "@" - -// Digest stores a digest name in a structured form. -type Digest struct { - Repository - digest string - original string -} - -// Ensure Digest implements Reference -var _ Reference = (*Digest)(nil) - -// Context implements Reference. -func (d Digest) Context() Repository { - return d.Repository -} - -// Identifier implements Reference. -func (d Digest) Identifier() string { - return d.DigestStr() -} - -// DigestStr returns the digest component of the Digest. -func (d Digest) DigestStr() string { - return d.digest -} - -// Name returns the name from which the Digest was derived. -func (d Digest) Name() string { - return d.Repository.Name() + digestDelim + d.DigestStr() -} - -// String returns the original input string. -func (d Digest) String() string { - return d.original -} - -// NewDigest returns a new Digest representing the given name. -func NewDigest(name string, opts ...Option) (Digest, error) { - // Split on "@" - parts := strings.Split(name, digestDelim) - if len(parts) != 2 { - return Digest{}, newErrBadName("a digest must contain exactly one '@' separator (e.g. registry/repository@digest) saw: %s", name) - } - base := parts[0] - dig := parts[1] - prefix := digest.Canonical.String() + ":" - if !strings.HasPrefix(dig, prefix) { - return Digest{}, newErrBadName("unsupported digest algorithm: %s", dig) - } - hex := strings.TrimPrefix(dig, prefix) - if err := digest.Canonical.Validate(hex); err != nil { - return Digest{}, err - } - - tag, err := NewTag(base, opts...) - if err == nil { - base = tag.Repository.Name() - } - - repo, err := NewRepository(base, opts...) - if err != nil { - return Digest{}, err - } - return Digest{ - Repository: repo, - digest: dig, - original: name, - }, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/doc.go b/vendor/github.com/google/go-containerregistry/pkg/name/doc.go deleted file mode 100644 index b294794d..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/doc.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name defines structured types for representing image references. -// -// What's in a name? For image references, not nearly enough! -// -// Image references look a lot like URLs, but they differ in that they don't -// contain the scheme (http or https), they can end with a :tag or a @digest -// (the latter being validated), and they perform defaulting for missing -// components. -// -// Since image references don't contain the scheme, we do our best to infer -// if we use http or https from the given hostname. We allow http fallback for -// any host that looks like localhost (localhost, 127.0.0.1, ::1), ends in -// ".local", or is in the "private" address space per RFC 1918. For everything -// else, we assume https only. To override this heuristic, use the Insecure -// option. -// -// Image references with a digest signal to us that we should verify the content -// of the image matches the digest. E.g. when pulling a Digest reference, we'll -// calculate the sha256 of the manifest returned by the registry and error out -// if it doesn't match what we asked for. -// -// For defaulting, we interpret "ubuntu" as -// "index.docker.io/library/ubuntu:latest" because we add the missing repo -// "library", the missing registry "index.docker.io", and the missing tag -// "latest". To disable this defaulting, use the StrictValidation option. This -// is useful e.g. to only allow image references that explicitly set a tag or -// digest, so that you don't accidentally pull "latest". -package name diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/errors.go b/vendor/github.com/google/go-containerregistry/pkg/name/errors.go deleted file mode 100644 index bf004ffc..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/errors.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -import ( - "errors" - "fmt" -) - -// ErrBadName is an error for when a bad docker name is supplied. -type ErrBadName struct { - info string -} - -func (e *ErrBadName) Error() string { - return e.info -} - -// Is reports whether target is an error of type ErrBadName -func (e *ErrBadName) Is(target error) bool { - var berr *ErrBadName - return errors.As(target, &berr) -} - -// newErrBadName returns a ErrBadName which returns the given formatted string from Error(). -func newErrBadName(fmtStr string, args ...any) *ErrBadName { - return &ErrBadName{fmt.Sprintf(fmtStr, args...)} -} - -// IsErrBadName returns true if the given error is an ErrBadName. -// -// Deprecated: Use errors.Is. -func IsErrBadName(err error) bool { - var berr *ErrBadName - return errors.As(err, &berr) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/options.go b/vendor/github.com/google/go-containerregistry/pkg/name/options.go deleted file mode 100644 index d14fedcd..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/options.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -const ( - // DefaultRegistry is the registry name that will be used if no registry - // provided and the default is not overridden. - DefaultRegistry = "index.docker.io" - defaultRegistryAlias = "docker.io" - - // DefaultTag is the tag name that will be used if no tag provided and the - // default is not overridden. - DefaultTag = "latest" -) - -type options struct { - strict bool // weak by default - insecure bool // secure by default - defaultRegistry string - defaultTag string -} - -func makeOptions(opts ...Option) options { - opt := options{ - defaultRegistry: DefaultRegistry, - defaultTag: DefaultTag, - } - for _, o := range opts { - o(&opt) - } - return opt -} - -// Option is a functional option for name parsing. -type Option func(*options) - -// StrictValidation is an Option that requires image references to be fully -// specified; i.e. no defaulting for registry (dockerhub), repo (library), -// or tag (latest). -func StrictValidation(opts *options) { - opts.strict = true -} - -// WeakValidation is an Option that sets defaults when parsing names, see -// StrictValidation. -func WeakValidation(opts *options) { - opts.strict = false -} - -// Insecure is an Option that allows image references to be fetched without TLS. -func Insecure(opts *options) { - opts.insecure = true -} - -// OptionFn is a function that returns an option. -type OptionFn func() Option - -// WithDefaultRegistry sets the default registry that will be used if one is not -// provided. -func WithDefaultRegistry(r string) Option { - return func(opts *options) { - opts.defaultRegistry = r - } -} - -// WithDefaultTag sets the default tag that will be used if one is not provided. -func WithDefaultTag(t string) Option { - return func(opts *options) { - opts.defaultTag = t - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/ref.go b/vendor/github.com/google/go-containerregistry/pkg/name/ref.go deleted file mode 100644 index 912ab330..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/ref.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -import ( - "fmt" -) - -// Reference defines the interface that consumers use when they can -// take either a tag or a digest. -type Reference interface { - fmt.Stringer - - // Context accesses the Repository context of the reference. - Context() Repository - - // Identifier accesses the type-specific portion of the reference. - Identifier() string - - // Name is the fully-qualified reference name. - Name() string - - // Scope is the scope needed to access this reference. - Scope(string) string -} - -// ParseReference parses the string as a reference, either by tag or digest. -func ParseReference(s string, opts ...Option) (Reference, error) { - if t, err := NewTag(s, opts...); err == nil { - return t, nil - } - if d, err := NewDigest(s, opts...); err == nil { - return d, nil - } - return nil, newErrBadName("could not parse reference: " + s) -} - -type stringConst string - -// MustParseReference behaves like ParseReference, but panics instead of -// returning an error. It's intended for use in tests, or when a value is -// expected to be valid at code authoring time. -// -// To discourage its use in scenarios where the value is not known at code -// authoring time, it must be passed a string constant: -// -// const str = "valid/string" -// MustParseReference(str) -// MustParseReference("another/valid/string") -// MustParseReference(str + "/and/more") -// -// These will not compile: -// -// var str = "valid/string" -// MustParseReference(str) -// MustParseReference(strings.Join([]string{"valid", "string"}, "/")) -func MustParseReference(s stringConst, opts ...Option) Reference { - ref, err := ParseReference(string(s), opts...) - if err != nil { - panic(err) - } - return ref -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/registry.go b/vendor/github.com/google/go-containerregistry/pkg/name/registry.go deleted file mode 100644 index 5b0d0176..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/registry.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -import ( - "net" - "net/url" - "path" - "regexp" - "strings" -) - -// Detect more complex forms of local references. -var reLocal = regexp.MustCompile(`.*\.local(?:host)?(?::\d{1,5})?$`) - -// Detect the loopback IP (127.0.0.1) -var reLoopback = regexp.MustCompile(regexp.QuoteMeta("127.0.0.1")) - -// Detect the loopback IPV6 (::1) -var reipv6Loopback = regexp.MustCompile(regexp.QuoteMeta("::1")) - -// Registry stores a docker registry name in a structured form. -type Registry struct { - insecure bool - registry string -} - -// RegistryStr returns the registry component of the Registry. -func (r Registry) RegistryStr() string { - return r.registry -} - -// Name returns the name from which the Registry was derived. -func (r Registry) Name() string { - return r.RegistryStr() -} - -func (r Registry) String() string { - return r.Name() -} - -// Repo returns a Repository in the Registry with the given name. -func (r Registry) Repo(repo ...string) Repository { - return Repository{Registry: r, repository: path.Join(repo...)} -} - -// Scope returns the scope required to access the registry. -func (r Registry) Scope(string) string { - // The only resource under 'registry' is 'catalog'. http://goo.gl/N9cN9Z - return "registry:catalog:*" -} - -func (r Registry) isRFC1918() bool { - ipStr := strings.Split(r.Name(), ":")[0] - ip := net.ParseIP(ipStr) - if ip == nil { - return false - } - for _, cidr := range []string{"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"} { - _, block, _ := net.ParseCIDR(cidr) - if block.Contains(ip) { - return true - } - } - return false -} - -// Scheme returns https scheme for all the endpoints except localhost or when explicitly defined. -func (r Registry) Scheme() string { - if r.insecure { - return "http" - } - if r.isRFC1918() { - return "http" - } - if strings.HasPrefix(r.Name(), "localhost:") { - return "http" - } - if reLocal.MatchString(r.Name()) { - return "http" - } - if reLoopback.MatchString(r.Name()) { - return "http" - } - if reipv6Loopback.MatchString(r.Name()) { - return "http" - } - return "https" -} - -func checkRegistry(name string) error { - // Per RFC 3986, registries (authorities) are required to be prefixed with "//" - // url.Host == hostname[:port] == authority - if url, err := url.Parse("//" + name); err != nil || url.Host != name { - return newErrBadName("registries must be valid RFC 3986 URI authorities: %s", name) - } - return nil -} - -// NewRegistry returns a Registry based on the given name. -// Strict validation requires explicit, valid RFC 3986 URI authorities to be given. -func NewRegistry(name string, opts ...Option) (Registry, error) { - opt := makeOptions(opts...) - if opt.strict && len(name) == 0 { - return Registry{}, newErrBadName("strict validation requires the registry to be explicitly defined") - } - - if err := checkRegistry(name); err != nil { - return Registry{}, err - } - - if name == "" { - name = opt.defaultRegistry - } - // Rewrite "docker.io" to "index.docker.io". - // See: https://github.com/google/go-containerregistry/issues/68 - if name == defaultRegistryAlias { - name = DefaultRegistry - } - - return Registry{registry: name, insecure: opt.insecure}, nil -} - -// NewInsecureRegistry returns an Insecure Registry based on the given name. -// -// Deprecated: Use the Insecure Option with NewRegistry instead. -func NewInsecureRegistry(name string, opts ...Option) (Registry, error) { - opts = append(opts, Insecure) - return NewRegistry(name, opts...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/repository.go b/vendor/github.com/google/go-containerregistry/pkg/name/repository.go deleted file mode 100644 index 9250e362..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/repository.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -import ( - "fmt" - "strings" -) - -const ( - defaultNamespace = "library" - repositoryChars = "abcdefghijklmnopqrstuvwxyz0123456789_-./" - regRepoDelimiter = "/" -) - -// Repository stores a docker repository name in a structured form. -type Repository struct { - Registry - repository string -} - -// See https://docs.docker.com/docker-hub/official_repos -func hasImplicitNamespace(repo string, reg Registry) bool { - return !strings.ContainsRune(repo, '/') && reg.RegistryStr() == DefaultRegistry -} - -// RepositoryStr returns the repository component of the Repository. -func (r Repository) RepositoryStr() string { - if hasImplicitNamespace(r.repository, r.Registry) { - return fmt.Sprintf("%s/%s", defaultNamespace, r.repository) - } - return r.repository -} - -// Name returns the name from which the Repository was derived. -func (r Repository) Name() string { - regName := r.Registry.Name() - if regName != "" { - return regName + regRepoDelimiter + r.RepositoryStr() - } - // TODO: As far as I can tell, this is unreachable. - return r.RepositoryStr() -} - -func (r Repository) String() string { - return r.Name() -} - -// Scope returns the scope required to perform the given action on the registry. -// TODO(jonjohnsonjr): consider moving scopes to a separate package. -func (r Repository) Scope(action string) string { - return fmt.Sprintf("repository:%s:%s", r.RepositoryStr(), action) -} - -func checkRepository(repository string) error { - return checkElement("repository", repository, repositoryChars, 2, 255) -} - -// NewRepository returns a new Repository representing the given name, according to the given strictness. -func NewRepository(name string, opts ...Option) (Repository, error) { - opt := makeOptions(opts...) - if len(name) == 0 { - return Repository{}, newErrBadName("a repository name must be specified") - } - - var registry string - repo := name - parts := strings.SplitN(name, regRepoDelimiter, 2) - if len(parts) == 2 && (strings.ContainsRune(parts[0], '.') || strings.ContainsRune(parts[0], ':')) { - // The first part of the repository is treated as the registry domain - // iff it contains a '.' or ':' character, otherwise it is all repository - // and the domain defaults to Docker Hub. - registry = parts[0] - repo = parts[1] - } - - if err := checkRepository(repo); err != nil { - return Repository{}, err - } - - reg, err := NewRegistry(registry, opts...) - if err != nil { - return Repository{}, err - } - if hasImplicitNamespace(repo, reg) && opt.strict { - return Repository{}, newErrBadName("strict validation requires the full repository path (missing 'library')") - } - return Repository{reg, repo}, nil -} - -// Tag returns a Tag in this Repository. -func (r Repository) Tag(identifier string) Tag { - t := Tag{ - tag: identifier, - Repository: r, - } - t.original = t.Name() - return t -} - -// Digest returns a Digest in this Repository. -func (r Repository) Digest(identifier string) Digest { - d := Digest{ - digest: identifier, - Repository: r, - } - d.original = d.Name() - return d -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/name/tag.go b/vendor/github.com/google/go-containerregistry/pkg/name/tag.go deleted file mode 100644 index 66bd1bec..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/name/tag.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 name - -import ( - "strings" -) - -const ( - // TODO(dekkagaijin): use the docker/distribution regexes for validation. - tagChars = "abcdefghijklmnopqrstuvwxyz0123456789_-.ABCDEFGHIJKLMNOPQRSTUVWXYZ" - tagDelim = ":" -) - -// Tag stores a docker tag name in a structured form. -type Tag struct { - Repository - tag string - original string -} - -// Ensure Tag implements Reference -var _ Reference = (*Tag)(nil) - -// Context implements Reference. -func (t Tag) Context() Repository { - return t.Repository -} - -// Identifier implements Reference. -func (t Tag) Identifier() string { - return t.TagStr() -} - -// TagStr returns the tag component of the Tag. -func (t Tag) TagStr() string { - return t.tag -} - -// Name returns the name from which the Tag was derived. -func (t Tag) Name() string { - return t.Repository.Name() + tagDelim + t.TagStr() -} - -// String returns the original input string. -func (t Tag) String() string { - return t.original -} - -// Scope returns the scope required to perform the given action on the tag. -func (t Tag) Scope(action string) string { - return t.Repository.Scope(action) -} - -func checkTag(name string) error { - return checkElement("tag", name, tagChars, 1, 128) -} - -// NewTag returns a new Tag representing the given name, according to the given strictness. -func NewTag(name string, opts ...Option) (Tag, error) { - opt := makeOptions(opts...) - base := name - tag := "" - - // Split on ":" - parts := strings.Split(name, tagDelim) - // Verify that we aren't confusing a tag for a hostname w/ port for the purposes of weak validation. - if len(parts) > 1 && !strings.Contains(parts[len(parts)-1], regRepoDelimiter) { - base = strings.Join(parts[:len(parts)-1], tagDelim) - tag = parts[len(parts)-1] - } - - // We don't require a tag, but if we get one check it's valid, - // even when not being strict. - // If we are being strict, we want to validate the tag regardless in case - // it's empty. - if tag != "" || opt.strict { - if err := checkTag(tag); err != nil { - return Tag{}, err - } - } - - if tag == "" { - tag = opt.defaultTag - } - - repo, err := NewRepository(base, opts...) - if err != nil { - return Tag{}, err - } - return Tag{ - Repository: repo, - tag: tag, - original: name, - }, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/config.go b/vendor/github.com/google/go-containerregistry/pkg/v1/config.go deleted file mode 100644 index 960c93b5..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/config.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 v1 - -import ( - "encoding/json" - "io" - "time" -) - -// ConfigFile is the configuration file that holds the metadata describing -// how to launch a container. See: -// https://github.com/opencontainers/image-spec/blob/master/config.md -// -// docker_version and os.version are not part of the spec but included -// for backwards compatibility. -type ConfigFile struct { - Architecture string `json:"architecture"` - Author string `json:"author,omitempty"` - Container string `json:"container,omitempty"` - Created Time `json:"created,omitempty"` - DockerVersion string `json:"docker_version,omitempty"` - History []History `json:"history,omitempty"` - OS string `json:"os"` - RootFS RootFS `json:"rootfs"` - Config Config `json:"config"` - OSVersion string `json:"os.version,omitempty"` - Variant string `json:"variant,omitempty"` - OSFeatures []string `json:"os.features,omitempty"` -} - -// Platform attempts to generates a Platform from the ConfigFile fields. -func (cf *ConfigFile) Platform() *Platform { - if cf.OS == "" && cf.Architecture == "" && cf.OSVersion == "" && cf.Variant == "" && len(cf.OSFeatures) == 0 { - return nil - } - return &Platform{ - OS: cf.OS, - Architecture: cf.Architecture, - OSVersion: cf.OSVersion, - Variant: cf.Variant, - OSFeatures: cf.OSFeatures, - } -} - -// History is one entry of a list recording how this container image was built. -type History struct { - Author string `json:"author,omitempty"` - Created Time `json:"created,omitempty"` - CreatedBy string `json:"created_by,omitempty"` - Comment string `json:"comment,omitempty"` - EmptyLayer bool `json:"empty_layer,omitempty"` -} - -// Time is a wrapper around time.Time to help with deep copying -type Time struct { - time.Time -} - -// DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time -// type is effectively immutable in the time API, so it is safe to -// copy-by-assign, despite the presence of (unexported) Pointer fields. -func (t *Time) DeepCopyInto(out *Time) { - *out = *t -} - -// RootFS holds the ordered list of file system deltas that comprise the -// container image's root filesystem. -type RootFS struct { - Type string `json:"type"` - DiffIDs []Hash `json:"diff_ids"` -} - -// HealthConfig holds configuration settings for the HEALTHCHECK feature. -type HealthConfig struct { - // Test is the test to perform to check that the container is healthy. - // An empty slice means to inherit the default. - // The options are: - // {} : inherit healthcheck - // {"NONE"} : disable healthcheck - // {"CMD", args...} : exec arguments directly - // {"CMD-SHELL", command} : run command with system's default shell - Test []string `json:",omitempty"` - - // Zero means to inherit. Durations are expressed as integer nanoseconds. - Interval time.Duration `json:",omitempty"` // Interval is the time to wait between checks. - Timeout time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung. - StartPeriod time.Duration `json:",omitempty"` // The start period for the container to initialize before the retries starts to count down. - - // Retries is the number of consecutive failures needed to consider a container as unhealthy. - // Zero means inherit. - Retries int `json:",omitempty"` -} - -// Config is a submessage of the config file described as: -// -// The execution parameters which SHOULD be used as a base when running -// a container using the image. -// -// The names of the fields in this message are chosen to reflect the JSON -// payload of the Config as defined here: -// https://git.io/vrAET -// and -// https://github.com/opencontainers/image-spec/blob/master/config.md -type Config struct { - AttachStderr bool `json:"AttachStderr,omitempty"` - AttachStdin bool `json:"AttachStdin,omitempty"` - AttachStdout bool `json:"AttachStdout,omitempty"` - Cmd []string `json:"Cmd,omitempty"` - Healthcheck *HealthConfig `json:"Healthcheck,omitempty"` - Domainname string `json:"Domainname,omitempty"` - Entrypoint []string `json:"Entrypoint,omitempty"` - Env []string `json:"Env,omitempty"` - Hostname string `json:"Hostname,omitempty"` - Image string `json:"Image,omitempty"` - Labels map[string]string `json:"Labels,omitempty"` - OnBuild []string `json:"OnBuild,omitempty"` - OpenStdin bool `json:"OpenStdin,omitempty"` - StdinOnce bool `json:"StdinOnce,omitempty"` - Tty bool `json:"Tty,omitempty"` - User string `json:"User,omitempty"` - Volumes map[string]struct{} `json:"Volumes,omitempty"` - WorkingDir string `json:"WorkingDir,omitempty"` - ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` - ArgsEscaped bool `json:"ArgsEscaped,omitempty"` - NetworkDisabled bool `json:"NetworkDisabled,omitempty"` - MacAddress string `json:"MacAddress,omitempty"` - StopSignal string `json:"StopSignal,omitempty"` - Shell []string `json:"Shell,omitempty"` -} - -// ParseConfigFile parses the io.Reader's contents into a ConfigFile. -func ParseConfigFile(r io.Reader) (*ConfigFile, error) { - cf := ConfigFile{} - if err := json.NewDecoder(r).Decode(&cf); err != nil { - return nil, err - } - return &cf, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/doc.go deleted file mode 100644 index 7a84736b..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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. - -// +k8s:deepcopy-gen=package - -// Package v1 defines structured types for OCI v1 images -package v1 diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.md deleted file mode 100644 index 8663a830..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# `empty` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/empty?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/empty) - -The empty packages provides an empty base for constructing a `v1.Image` or `v1.ImageIndex`. -This is especially useful when paired with the [`mutate`](/pkg/v1/mutate) package, -see [`mutate.Append`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/mutate#Append) -and [`mutate.AppendManifests`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/mutate#AppendManifests). diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go deleted file mode 100644 index 1a521e9a..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 empty provides an implementation of v1.Image equivalent to "FROM scratch". -package empty diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go deleted file mode 100644 index c58a06ce..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/image.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 empty - -import ( - "fmt" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// Image is a singleton empty image, think: FROM scratch. -var Image, _ = partial.UncompressedToImage(emptyImage{}) - -type emptyImage struct{} - -// MediaType implements partial.UncompressedImageCore. -func (i emptyImage) MediaType() (types.MediaType, error) { - return types.DockerManifestSchema2, nil -} - -// RawConfigFile implements partial.UncompressedImageCore. -func (i emptyImage) RawConfigFile() ([]byte, error) { - return partial.RawConfigFile(i) -} - -// ConfigFile implements v1.Image. -func (i emptyImage) ConfigFile() (*v1.ConfigFile, error) { - return &v1.ConfigFile{ - RootFS: v1.RootFS{ - // Some clients check this. - Type: "layers", - }, - }, nil -} - -func (i emptyImage) LayerByDiffID(h v1.Hash) (partial.UncompressedLayer, error) { - return nil, fmt.Errorf("LayerByDiffID(%s): empty image", h) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go deleted file mode 100644 index 18b41489..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/empty/index.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 empty - -import ( - "encoding/json" - "errors" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// Index is a singleton empty index, think: FROM scratch. -var Index = emptyIndex{} - -type emptyIndex struct{} - -func (i emptyIndex) MediaType() (types.MediaType, error) { - return types.OCIImageIndex, nil -} - -func (i emptyIndex) Digest() (v1.Hash, error) { - return partial.Digest(i) -} - -func (i emptyIndex) Size() (int64, error) { - return partial.Size(i) -} - -func (i emptyIndex) IndexManifest() (*v1.IndexManifest, error) { - return base(), nil -} - -func (i emptyIndex) RawManifest() ([]byte, error) { - return json.Marshal(base()) -} - -func (i emptyIndex) Image(v1.Hash) (v1.Image, error) { - return nil, errors.New("empty index") -} - -func (i emptyIndex) ImageIndex(v1.Hash) (v1.ImageIndex, error) { - return nil, errors.New("empty index") -} - -func base() *v1.IndexManifest { - return &v1.IndexManifest{ - SchemaVersion: 2, - MediaType: types.OCIImageIndex, - Manifests: []v1.Descriptor{}, - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/hash.go b/vendor/github.com/google/go-containerregistry/pkg/v1/hash.go deleted file mode 100644 index f78a5fa8..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/hash.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 v1 - -import ( - "crypto" - "encoding/hex" - "encoding/json" - "fmt" - "hash" - "io" - "strconv" - "strings" -) - -// Hash is an unqualified digest of some content, e.g. sha256:deadbeef -type Hash struct { - // Algorithm holds the algorithm used to compute the hash. - Algorithm string - - // Hex holds the hex portion of the content hash. - Hex string -} - -// String reverses NewHash returning the string-form of the hash. -func (h Hash) String() string { - return fmt.Sprintf("%s:%s", h.Algorithm, h.Hex) -} - -// NewHash validates the input string is a hash and returns a strongly type Hash object. -func NewHash(s string) (Hash, error) { - h := Hash{} - if err := h.parse(s); err != nil { - return Hash{}, err - } - return h, nil -} - -// MarshalJSON implements json.Marshaler -func (h Hash) MarshalJSON() ([]byte, error) { - return json.Marshal(h.String()) -} - -// UnmarshalJSON implements json.Unmarshaler -func (h *Hash) UnmarshalJSON(data []byte) error { - s, err := strconv.Unquote(string(data)) - if err != nil { - return err - } - return h.parse(s) -} - -// MarshalText implements encoding.TextMarshaler. This is required to use -// v1.Hash as a key in a map when marshalling JSON. -func (h Hash) MarshalText() (text []byte, err error) { - return []byte(h.String()), nil -} - -// UnmarshalText implements encoding.TextUnmarshaler. This is required to use -// v1.Hash as a key in a map when unmarshalling JSON. -func (h *Hash) UnmarshalText(text []byte) error { - return h.parse(string(text)) -} - -// Hasher returns a hash.Hash for the named algorithm (e.g. "sha256") -func Hasher(name string) (hash.Hash, error) { - switch name { - case "sha256": - return crypto.SHA256.New(), nil - default: - return nil, fmt.Errorf("unsupported hash: %q", name) - } -} - -func (h *Hash) parse(unquoted string) error { - parts := strings.Split(unquoted, ":") - if len(parts) != 2 { - return fmt.Errorf("cannot parse hash: %q", unquoted) - } - - rest := strings.TrimLeft(parts[1], "0123456789abcdef") - if len(rest) != 0 { - return fmt.Errorf("found non-hex character in hash: %c", rest[0]) - } - - hasher, err := Hasher(parts[0]) - if err != nil { - return err - } - // Compare the hex to the expected size (2 hex characters per byte) - if len(parts[1]) != hasher.Size()*2 { - return fmt.Errorf("wrong number of hex digits for %s: %s", parts[0], parts[1]) - } - - h.Algorithm = parts[0] - h.Hex = parts[1] - return nil -} - -// SHA256 computes the Hash of the provided io.Reader's content. -func SHA256(r io.Reader) (Hash, int64, error) { - hasher := crypto.SHA256.New() - n, err := io.Copy(hasher, r) - if err != nil { - return Hash{}, 0, err - } - return Hash{ - Algorithm: "sha256", - Hex: hex.EncodeToString(hasher.Sum(make([]byte, 0, hasher.Size()))), - }, n, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/image.go deleted file mode 100644 index 8de9e476..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/image.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 v1 - -import ( - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// Image defines the interface for interacting with an OCI v1 image. -type Image interface { - // Layers returns the ordered collection of filesystem layers that comprise this image. - // The order of the list is oldest/base layer first, and most-recent/top layer last. - Layers() ([]Layer, error) - - // MediaType of this image's manifest. - MediaType() (types.MediaType, error) - - // Size returns the size of the manifest. - Size() (int64, error) - - // ConfigName returns the hash of the image's config file, also known as - // the Image ID. - ConfigName() (Hash, error) - - // ConfigFile returns this image's config file. - ConfigFile() (*ConfigFile, error) - - // RawConfigFile returns the serialized bytes of ConfigFile(). - RawConfigFile() ([]byte, error) - - // Digest returns the sha256 of this image's manifest. - Digest() (Hash, error) - - // Manifest returns this image's Manifest object. - Manifest() (*Manifest, error) - - // RawManifest returns the serialized bytes of Manifest() - RawManifest() ([]byte, error) - - // LayerByDigest returns a Layer for interacting with a particular layer of - // the image, looking it up by "digest" (the compressed hash). - LayerByDigest(Hash) (Layer, error) - - // LayerByDiffID is an analog to LayerByDigest, looking up by "diff id" - // (the uncompressed hash). - LayerByDiffID(Hash) (Layer, error) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/index.go deleted file mode 100644 index 8e7bc8eb..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/index.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 v1 - -import ( - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// ImageIndex defines the interface for interacting with an OCI image index. -type ImageIndex interface { - // MediaType of this image's manifest. - MediaType() (types.MediaType, error) - - // Digest returns the sha256 of this index's manifest. - Digest() (Hash, error) - - // Size returns the size of the manifest. - Size() (int64, error) - - // IndexManifest returns this image index's manifest object. - IndexManifest() (*IndexManifest, error) - - // RawManifest returns the serialized bytes of IndexManifest(). - RawManifest() ([]byte, error) - - // Image returns a v1.Image that this ImageIndex references. - Image(Hash) (Image, error) - - // ImageIndex returns a v1.ImageIndex that this ImageIndex references. - ImageIndex(Hash) (ImageIndex, error) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layer.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layer.go deleted file mode 100644 index 57447d26..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layer.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 v1 - -import ( - "io" - - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// Layer is an interface for accessing the properties of a particular layer of a v1.Image -type Layer interface { - // Digest returns the Hash of the compressed layer. - Digest() (Hash, error) - - // DiffID returns the Hash of the uncompressed layer. - DiffID() (Hash, error) - - // Compressed returns an io.ReadCloser for the compressed layer contents. - Compressed() (io.ReadCloser, error) - - // Uncompressed returns an io.ReadCloser for the uncompressed layer contents. - Uncompressed() (io.ReadCloser, error) - - // Size returns the compressed size of the Layer. - Size() (int64, error) - - // MediaType returns the media type of the Layer. - MediaType() (types.MediaType, error) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/README.md deleted file mode 100644 index 54bee6d9..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# `layout` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/layout?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/layout) - -The `layout` package implements support for interacting with an [OCI Image Layout](https://github.com/opencontainers/image-spec/blob/master/image-layout.md). diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/blob.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/blob.go deleted file mode 100644 index 2e5f4358..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/blob.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 layout - -import ( - "io" - "os" - - v1 "github.com/google/go-containerregistry/pkg/v1" -) - -// Blob returns a blob with the given hash from the Path. -func (l Path) Blob(h v1.Hash) (io.ReadCloser, error) { - return os.Open(l.blobPath(h)) -} - -// Bytes is a convenience function to return a blob from the Path as -// a byte slice. -func (l Path) Bytes(h v1.Hash) ([]byte, error) { - return os.ReadFile(l.blobPath(h)) -} - -func (l Path) blobPath(h v1.Hash) string { - return l.path("blobs", h.Algorithm, h.Hex) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/doc.go deleted file mode 100644 index d80d2736..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 layout provides facilities for reading/writing artifacts from/to -// an OCI image layout on disk, see: -// -// https://github.com/opencontainers/image-spec/blob/master/image-layout.md -package layout diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/gc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/gc.go deleted file mode 100644 index 5fdb2c05..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/gc.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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. - -// This is an EXPERIMENTAL package, and may change in arbitrary ways without notice. -package layout - -import ( - "fmt" - "io/fs" - "path/filepath" - "strings" - - v1 "github.com/google/go-containerregistry/pkg/v1" -) - -// GarbageCollect removes unreferenced blobs from the oci-layout -// -// This is an experimental api, and not subject to any stability guarantees -// We may abandon it at any time, without prior notice. -// Deprecated: Use it at your own risk! -func (l Path) GarbageCollect() ([]v1.Hash, error) { - idx, err := l.ImageIndex() - if err != nil { - return nil, err - } - blobsToKeep := map[string]bool{} - if err := l.garbageCollectImageIndex(idx, blobsToKeep); err != nil { - return nil, err - } - blobsDir := l.path("blobs") - removedBlobs := []v1.Hash{} - - err = filepath.WalkDir(blobsDir, func(path string, d fs.DirEntry, err error) error { - if err != nil { - return err - } - - if d.IsDir() { - return nil - } - - rel, err := filepath.Rel(blobsDir, path) - if err != nil { - return err - } - hashString := strings.Replace(rel, "/", ":", 1) - if present := blobsToKeep[hashString]; !present { - h, err := v1.NewHash(hashString) - if err != nil { - return err - } - removedBlobs = append(removedBlobs, h) - } - return nil - }) - - if err != nil { - return nil, err - } - - return removedBlobs, nil -} - -func (l Path) garbageCollectImageIndex(index v1.ImageIndex, blobsToKeep map[string]bool) error { - idxm, err := index.IndexManifest() - if err != nil { - return err - } - - h, err := index.Digest() - if err != nil { - return err - } - - blobsToKeep[h.String()] = true - - for _, descriptor := range idxm.Manifests { - if descriptor.MediaType.IsImage() { - img, err := index.Image(descriptor.Digest) - if err != nil { - return err - } - if err := l.garbageCollectImage(img, blobsToKeep); err != nil { - return err - } - } else if descriptor.MediaType.IsIndex() { - idx, err := index.ImageIndex(descriptor.Digest) - if err != nil { - return err - } - if err := l.garbageCollectImageIndex(idx, blobsToKeep); err != nil { - return err - } - } else { - return fmt.Errorf("gc: unknown media type: %s", descriptor.MediaType) - } - } - return nil -} - -func (l Path) garbageCollectImage(image v1.Image, blobsToKeep map[string]bool) error { - h, err := image.Digest() - if err != nil { - return err - } - blobsToKeep[h.String()] = true - - h, err = image.ConfigName() - if err != nil { - return err - } - blobsToKeep[h.String()] = true - - ls, err := image.Layers() - if err != nil { - return err - } - for _, l := range ls { - h, err := l.Digest() - if err != nil { - return err - } - blobsToKeep[h.String()] = true - } - return nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/image.go deleted file mode 100644 index c9ae9665..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/image.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 layout - -import ( - "fmt" - "io" - "os" - "sync" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -type layoutImage struct { - path Path - desc v1.Descriptor - manifestLock sync.Mutex // Protects rawManifest - rawManifest []byte -} - -var _ partial.CompressedImageCore = (*layoutImage)(nil) - -// Image reads a v1.Image with digest h from the Path. -func (l Path) Image(h v1.Hash) (v1.Image, error) { - ii, err := l.ImageIndex() - if err != nil { - return nil, err - } - - return ii.Image(h) -} - -func (li *layoutImage) MediaType() (types.MediaType, error) { - return li.desc.MediaType, nil -} - -// Implements WithManifest for partial.Blobset. -func (li *layoutImage) Manifest() (*v1.Manifest, error) { - return partial.Manifest(li) -} - -func (li *layoutImage) RawManifest() ([]byte, error) { - li.manifestLock.Lock() - defer li.manifestLock.Unlock() - if li.rawManifest != nil { - return li.rawManifest, nil - } - - b, err := li.path.Bytes(li.desc.Digest) - if err != nil { - return nil, err - } - - li.rawManifest = b - return li.rawManifest, nil -} - -func (li *layoutImage) RawConfigFile() ([]byte, error) { - manifest, err := li.Manifest() - if err != nil { - return nil, err - } - - return li.path.Bytes(manifest.Config.Digest) -} - -func (li *layoutImage) LayerByDigest(h v1.Hash) (partial.CompressedLayer, error) { - manifest, err := li.Manifest() - if err != nil { - return nil, err - } - - if h == manifest.Config.Digest { - return &compressedBlob{ - path: li.path, - desc: manifest.Config, - }, nil - } - - for _, desc := range manifest.Layers { - if h == desc.Digest { - return &compressedBlob{ - path: li.path, - desc: desc, - }, nil - } - } - - return nil, fmt.Errorf("could not find layer in image: %s", h) -} - -type compressedBlob struct { - path Path - desc v1.Descriptor -} - -func (b *compressedBlob) Digest() (v1.Hash, error) { - return b.desc.Digest, nil -} - -func (b *compressedBlob) Compressed() (io.ReadCloser, error) { - return b.path.Blob(b.desc.Digest) -} - -func (b *compressedBlob) Size() (int64, error) { - return b.desc.Size, nil -} - -func (b *compressedBlob) MediaType() (types.MediaType, error) { - return b.desc.MediaType, nil -} - -// Descriptor implements partial.withDescriptor. -func (b *compressedBlob) Descriptor() (*v1.Descriptor, error) { - return &b.desc, nil -} - -// See partial.Exists. -func (b *compressedBlob) Exists() (bool, error) { - _, err := os.Stat(b.path.blobPath(b.desc.Digest)) - if os.IsNotExist(err) { - return false, nil - } - return err == nil, err -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/index.go deleted file mode 100644 index 7404f186..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/index.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 layout - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "os" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -var _ v1.ImageIndex = (*layoutIndex)(nil) - -type layoutIndex struct { - mediaType types.MediaType - path Path - rawIndex []byte -} - -// ImageIndexFromPath is a convenience function which constructs a Path and returns its v1.ImageIndex. -func ImageIndexFromPath(path string) (v1.ImageIndex, error) { - lp, err := FromPath(path) - if err != nil { - return nil, err - } - return lp.ImageIndex() -} - -// ImageIndex returns a v1.ImageIndex for the Path. -func (l Path) ImageIndex() (v1.ImageIndex, error) { - rawIndex, err := os.ReadFile(l.path("index.json")) - if err != nil { - return nil, err - } - - idx := &layoutIndex{ - mediaType: types.OCIImageIndex, - path: l, - rawIndex: rawIndex, - } - - return idx, nil -} - -func (i *layoutIndex) MediaType() (types.MediaType, error) { - return i.mediaType, nil -} - -func (i *layoutIndex) Digest() (v1.Hash, error) { - return partial.Digest(i) -} - -func (i *layoutIndex) Size() (int64, error) { - return partial.Size(i) -} - -func (i *layoutIndex) IndexManifest() (*v1.IndexManifest, error) { - var index v1.IndexManifest - err := json.Unmarshal(i.rawIndex, &index) - return &index, err -} - -func (i *layoutIndex) RawManifest() ([]byte, error) { - return i.rawIndex, nil -} - -func (i *layoutIndex) Image(h v1.Hash) (v1.Image, error) { - // Look up the digest in our manifest first to return a better error. - desc, err := i.findDescriptor(h) - if err != nil { - return nil, err - } - - if !isExpectedMediaType(desc.MediaType, types.OCIManifestSchema1, types.DockerManifestSchema2) { - return nil, fmt.Errorf("unexpected media type for %v: %s", h, desc.MediaType) - } - - img := &layoutImage{ - path: i.path, - desc: *desc, - } - return partial.CompressedToImage(img) -} - -func (i *layoutIndex) ImageIndex(h v1.Hash) (v1.ImageIndex, error) { - // Look up the digest in our manifest first to return a better error. - desc, err := i.findDescriptor(h) - if err != nil { - return nil, err - } - - if !isExpectedMediaType(desc.MediaType, types.OCIImageIndex, types.DockerManifestList) { - return nil, fmt.Errorf("unexpected media type for %v: %s", h, desc.MediaType) - } - - rawIndex, err := i.path.Bytes(h) - if err != nil { - return nil, err - } - - return &layoutIndex{ - mediaType: desc.MediaType, - path: i.path, - rawIndex: rawIndex, - }, nil -} - -func (i *layoutIndex) Blob(h v1.Hash) (io.ReadCloser, error) { - return i.path.Blob(h) -} - -func (i *layoutIndex) findDescriptor(h v1.Hash) (*v1.Descriptor, error) { - im, err := i.IndexManifest() - if err != nil { - return nil, err - } - - if h == (v1.Hash{}) { - if len(im.Manifests) != 1 { - return nil, errors.New("oci layout must contain only a single image to be used with layout.Image") - } - return &(im.Manifests)[0], nil - } - - for _, desc := range im.Manifests { - if desc.Digest == h { - return &desc, nil - } - } - - return nil, fmt.Errorf("could not find descriptor in index: %s", h) -} - -// TODO: Pull this out into methods on types.MediaType? e.g. instead, have: -// * mt.IsIndex() -// * mt.IsImage() -func isExpectedMediaType(mt types.MediaType, expected ...types.MediaType) bool { - for _, allowed := range expected { - if mt == allowed { - return true - } - } - return false -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/layoutpath.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/layoutpath.go deleted file mode 100644 index a031ff5a..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/layoutpath.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019 The original author or 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 layout - -import "path/filepath" - -// Path represents an OCI image layout rooted in a file system path -type Path string - -func (l Path) path(elem ...string) string { - complete := []string{string(l)} - return filepath.Join(append(complete, elem...)...) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/options.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/options.go deleted file mode 100644 index a26f9f37..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/options.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 layout - -import v1 "github.com/google/go-containerregistry/pkg/v1" - -// Option is a functional option for Layout. -type Option func(*options) - -type options struct { - descOpts []descriptorOption -} - -func makeOptions(opts ...Option) *options { - o := &options{ - descOpts: []descriptorOption{}, - } - for _, apply := range opts { - apply(o) - } - return o -} - -type descriptorOption func(*v1.Descriptor) - -// WithAnnotations adds annotations to the artifact descriptor. -func WithAnnotations(annotations map[string]string) Option { - return func(o *options) { - o.descOpts = append(o.descOpts, func(desc *v1.Descriptor) { - if desc.Annotations == nil { - desc.Annotations = make(map[string]string) - } - for k, v := range annotations { - desc.Annotations[k] = v - } - }) - } -} - -// WithURLs adds urls to the artifact descriptor. -func WithURLs(urls []string) Option { - return func(o *options) { - o.descOpts = append(o.descOpts, func(desc *v1.Descriptor) { - if desc.URLs == nil { - desc.URLs = []string{} - } - desc.URLs = append(desc.URLs, urls...) - }) - } -} - -// WithPlatform sets the platform of the artifact descriptor. -func WithPlatform(platform v1.Platform) Option { - return func(o *options) { - o.descOpts = append(o.descOpts, func(desc *v1.Descriptor) { - desc.Platform = &platform - }) - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/read.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/read.go deleted file mode 100644 index 796abc7d..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/read.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2019 The original author or 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 layout - -import ( - "os" - "path/filepath" -) - -// FromPath reads an OCI image layout at path and constructs a layout.Path. -func FromPath(path string) (Path, error) { - // TODO: check oci-layout exists - - _, err := os.Stat(filepath.Join(path, "index.json")) - if err != nil { - return "", err - } - - return Path(path), nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go b/vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go deleted file mode 100644 index d6e35c39..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/layout/write.go +++ /dev/null @@ -1,482 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 layout - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "os" - "path/filepath" - - "github.com/google/go-containerregistry/pkg/logs" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/match" - "github.com/google/go-containerregistry/pkg/v1/mutate" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/stream" - "github.com/google/go-containerregistry/pkg/v1/types" - "golang.org/x/sync/errgroup" -) - -var layoutFile = `{ - "imageLayoutVersion": "1.0.0" -}` - -// AppendImage writes a v1.Image to the Path and updates -// the index.json to reference it. -func (l Path) AppendImage(img v1.Image, options ...Option) error { - if err := l.WriteImage(img); err != nil { - return err - } - - desc, err := partial.Descriptor(img) - if err != nil { - return err - } - - o := makeOptions(options...) - for _, opt := range o.descOpts { - opt(desc) - } - - return l.AppendDescriptor(*desc) -} - -// AppendIndex writes a v1.ImageIndex to the Path and updates -// the index.json to reference it. -func (l Path) AppendIndex(ii v1.ImageIndex, options ...Option) error { - if err := l.WriteIndex(ii); err != nil { - return err - } - - desc, err := partial.Descriptor(ii) - if err != nil { - return err - } - - o := makeOptions(options...) - for _, opt := range o.descOpts { - opt(desc) - } - - return l.AppendDescriptor(*desc) -} - -// AppendDescriptor adds a descriptor to the index.json of the Path. -func (l Path) AppendDescriptor(desc v1.Descriptor) error { - ii, err := l.ImageIndex() - if err != nil { - return err - } - - index, err := ii.IndexManifest() - if err != nil { - return err - } - - index.Manifests = append(index.Manifests, desc) - - rawIndex, err := json.MarshalIndent(index, "", " ") - if err != nil { - return err - } - - return l.WriteFile("index.json", rawIndex, os.ModePerm) -} - -// ReplaceImage writes a v1.Image to the Path and updates -// the index.json to reference it, replacing any existing one that matches matcher, if found. -func (l Path) ReplaceImage(img v1.Image, matcher match.Matcher, options ...Option) error { - if err := l.WriteImage(img); err != nil { - return err - } - - return l.replaceDescriptor(img, matcher, options...) -} - -// ReplaceIndex writes a v1.ImageIndex to the Path and updates -// the index.json to reference it, replacing any existing one that matches matcher, if found. -func (l Path) ReplaceIndex(ii v1.ImageIndex, matcher match.Matcher, options ...Option) error { - if err := l.WriteIndex(ii); err != nil { - return err - } - - return l.replaceDescriptor(ii, matcher, options...) -} - -// replaceDescriptor adds a descriptor to the index.json of the Path, replacing -// any one matching matcher, if found. -func (l Path) replaceDescriptor(append mutate.Appendable, matcher match.Matcher, options ...Option) error { - ii, err := l.ImageIndex() - if err != nil { - return err - } - - desc, err := partial.Descriptor(append) - if err != nil { - return err - } - - o := makeOptions(options...) - for _, opt := range o.descOpts { - opt(desc) - } - - add := mutate.IndexAddendum{ - Add: append, - Descriptor: *desc, - } - ii = mutate.AppendManifests(mutate.RemoveManifests(ii, matcher), add) - - index, err := ii.IndexManifest() - if err != nil { - return err - } - - rawIndex, err := json.MarshalIndent(index, "", " ") - if err != nil { - return err - } - - return l.WriteFile("index.json", rawIndex, os.ModePerm) -} - -// RemoveDescriptors removes any descriptors that match the match.Matcher from the index.json of the Path. -func (l Path) RemoveDescriptors(matcher match.Matcher) error { - ii, err := l.ImageIndex() - if err != nil { - return err - } - ii = mutate.RemoveManifests(ii, matcher) - - index, err := ii.IndexManifest() - if err != nil { - return err - } - - rawIndex, err := json.MarshalIndent(index, "", " ") - if err != nil { - return err - } - - return l.WriteFile("index.json", rawIndex, os.ModePerm) -} - -// WriteFile write a file with arbitrary data at an arbitrary location in a v1 -// layout. Used mostly internally to write files like "oci-layout" and -// "index.json", also can be used to write other arbitrary files. Do *not* use -// this to write blobs. Use only WriteBlob() for that. -func (l Path) WriteFile(name string, data []byte, perm os.FileMode) error { - if err := os.MkdirAll(l.path(), os.ModePerm); err != nil && !os.IsExist(err) { - return err - } - - return os.WriteFile(l.path(name), data, perm) -} - -// WriteBlob copies a file to the blobs/ directory in the Path from the given ReadCloser at -// blobs/{hash.Algorithm}/{hash.Hex}. -func (l Path) WriteBlob(hash v1.Hash, r io.ReadCloser) error { - return l.writeBlob(hash, -1, r, nil) -} - -func (l Path) writeBlob(hash v1.Hash, size int64, rc io.ReadCloser, renamer func() (v1.Hash, error)) error { - defer rc.Close() - if hash.Hex == "" && renamer == nil { - panic("writeBlob called an invalid hash and no renamer") - } - - dir := l.path("blobs", hash.Algorithm) - if err := os.MkdirAll(dir, os.ModePerm); err != nil && !os.IsExist(err) { - return err - } - - // Check if blob already exists and is the correct size - file := filepath.Join(dir, hash.Hex) - if s, err := os.Stat(file); err == nil && !s.IsDir() && (s.Size() == size || size == -1) { - return nil - } - - // If a renamer func was provided write to a temporary file - open := func() (*os.File, error) { return os.Create(file) } - if renamer != nil { - open = func() (*os.File, error) { return os.CreateTemp(dir, hash.Hex) } - } - w, err := open() - if err != nil { - return err - } - if renamer != nil { - // Delete temp file if an error is encountered before renaming - defer func() { - if err := os.Remove(w.Name()); err != nil && !errors.Is(err, os.ErrNotExist) { - logs.Warn.Printf("error removing temporary file after encountering an error while writing blob: %v", err) - } - }() - } - defer w.Close() - - // Write to file and exit if not renaming - if n, err := io.Copy(w, rc); err != nil || renamer == nil { - return err - } else if size != -1 && n != size { - return fmt.Errorf("expected blob size %d, but only wrote %d", size, n) - } - - // Always close reader before renaming, since Close computes the digest in - // the case of streaming layers. If Close is not called explicitly, it will - // occur in a goroutine that is not guaranteed to succeed before renamer is - // called. When renamer is the layer's Digest method, it can return - // ErrNotComputed. - if err := rc.Close(); err != nil { - return err - } - - // Always close file before renaming - if err := w.Close(); err != nil { - return err - } - - // Rename file based on the final hash - finalHash, err := renamer() - if err != nil { - return fmt.Errorf("error getting final digest of layer: %w", err) - } - - renamePath := l.path("blobs", finalHash.Algorithm, finalHash.Hex) - return os.Rename(w.Name(), renamePath) -} - -// writeLayer writes the compressed layer to a blob. Unlike WriteBlob it will -// write to a temporary file (suffixed with .tmp) within the layout until the -// compressed reader is fully consumed and written to disk. Also unlike -// WriteBlob, it will not skip writing and exit without error when a blob file -// exists, but does not have the correct size. (The blob hash is not -// considered, because it may be expensive to compute.) -func (l Path) writeLayer(layer v1.Layer) error { - d, err := layer.Digest() - if errors.Is(err, stream.ErrNotComputed) { - // Allow digest errors, since streams may not have calculated the hash - // yet. Instead, use an empty value, which will be transformed into a - // random file name with `os.CreateTemp` and the final digest will be - // calculated after writing to a temp file and before renaming to the - // final path. - d = v1.Hash{Algorithm: "sha256", Hex: ""} - } else if err != nil { - return err - } - - s, err := layer.Size() - if errors.Is(err, stream.ErrNotComputed) { - // Allow size errors, since streams may not have calculated the size - // yet. Instead, use zero as a sentinel value meaning that no size - // comparison can be done and any sized blob file should be considered - // valid and not overwritten. - // - // TODO: Provide an option to always overwrite blobs. - s = -1 - } else if err != nil { - return err - } - - r, err := layer.Compressed() - if err != nil { - return err - } - - if err := l.writeBlob(d, s, r, layer.Digest); err != nil { - return fmt.Errorf("error writing layer: %w", err) - } - return nil -} - -// RemoveBlob removes a file from the blobs directory in the Path -// at blobs/{hash.Algorithm}/{hash.Hex} -// It does *not* remove any reference to it from other manifests or indexes, or -// from the root index.json. -func (l Path) RemoveBlob(hash v1.Hash) error { - dir := l.path("blobs", hash.Algorithm) - err := os.Remove(filepath.Join(dir, hash.Hex)) - if err != nil && !os.IsNotExist(err) { - return err - } - return nil -} - -// WriteImage writes an image, including its manifest, config and all of its -// layers, to the blobs directory. If any blob already exists, as determined by -// the hash filename, does not write it. -// This function does *not* update the `index.json` file. If you want to write the -// image and also update the `index.json`, call AppendImage(), which wraps this -// and also updates the `index.json`. -func (l Path) WriteImage(img v1.Image) error { - layers, err := img.Layers() - if err != nil { - return err - } - - // Write the layers concurrently. - var g errgroup.Group - for _, layer := range layers { - layer := layer - g.Go(func() error { - return l.writeLayer(layer) - }) - } - if err := g.Wait(); err != nil { - return err - } - - // Write the config. - cfgName, err := img.ConfigName() - if err != nil { - return err - } - cfgBlob, err := img.RawConfigFile() - if err != nil { - return err - } - if err := l.WriteBlob(cfgName, io.NopCloser(bytes.NewReader(cfgBlob))); err != nil { - return err - } - - // Write the img manifest. - d, err := img.Digest() - if err != nil { - return err - } - manifest, err := img.RawManifest() - if err != nil { - return err - } - - return l.WriteBlob(d, io.NopCloser(bytes.NewReader(manifest))) -} - -type withLayer interface { - Layer(v1.Hash) (v1.Layer, error) -} - -type withBlob interface { - Blob(v1.Hash) (io.ReadCloser, error) -} - -func (l Path) writeIndexToFile(indexFile string, ii v1.ImageIndex) error { - index, err := ii.IndexManifest() - if err != nil { - return err - } - - // Walk the descriptors and write any v1.Image or v1.ImageIndex that we find. - // If we come across something we don't expect, just write it as a blob. - for _, desc := range index.Manifests { - switch desc.MediaType { - case types.OCIImageIndex, types.DockerManifestList: - ii, err := ii.ImageIndex(desc.Digest) - if err != nil { - return err - } - if err := l.WriteIndex(ii); err != nil { - return err - } - case types.OCIManifestSchema1, types.DockerManifestSchema2: - img, err := ii.Image(desc.Digest) - if err != nil { - return err - } - if err := l.WriteImage(img); err != nil { - return err - } - default: - // TODO: The layout could reference arbitrary things, which we should - // probably just pass through. - - var blob io.ReadCloser - // Workaround for #819. - if wl, ok := ii.(withLayer); ok { - layer, lerr := wl.Layer(desc.Digest) - if lerr != nil { - return lerr - } - blob, err = layer.Compressed() - } else if wb, ok := ii.(withBlob); ok { - blob, err = wb.Blob(desc.Digest) - } - if err != nil { - return err - } - if err := l.WriteBlob(desc.Digest, blob); err != nil { - return err - } - } - } - - rawIndex, err := ii.RawManifest() - if err != nil { - return err - } - - return l.WriteFile(indexFile, rawIndex, os.ModePerm) -} - -// WriteIndex writes an index to the blobs directory. Walks down the children, -// including its children manifests and/or indexes, and down the tree until all of -// config and all layers, have been written. If any blob already exists, as determined by -// the hash filename, does not write it. -// This function does *not* update the `index.json` file. If you want to write the -// index and also update the `index.json`, call AppendIndex(), which wraps this -// and also updates the `index.json`. -func (l Path) WriteIndex(ii v1.ImageIndex) error { - // Always just write oci-layout file, since it's small. - if err := l.WriteFile("oci-layout", []byte(layoutFile), os.ModePerm); err != nil { - return err - } - - h, err := ii.Digest() - if err != nil { - return err - } - - indexFile := filepath.Join("blobs", h.Algorithm, h.Hex) - return l.writeIndexToFile(indexFile, ii) -} - -// Write constructs a Path at path from an ImageIndex. -// -// The contents are written in the following format: -// At the top level, there is: -// -// One oci-layout file containing the version of this image-layout. -// One index.json file listing descriptors for the contained images. -// -// Under blobs/, there is, for each image: -// -// One file for each layer, named after the layer's SHA. -// One file for each config blob, named after its SHA. -// One file for each manifest blob, named after its SHA. -func Write(path string, ii v1.ImageIndex) (Path, error) { - lp := Path(path) - // Always just write oci-layout file, since it's small. - if err := lp.WriteFile("oci-layout", []byte(layoutFile), os.ModePerm); err != nil { - return "", err - } - - // TODO create blobs/ in case there is a blobs file which would prevent the directory from being created - - return lp, lp.writeIndexToFile("index.json", ii) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/manifest.go b/vendor/github.com/google/go-containerregistry/pkg/v1/manifest.go deleted file mode 100644 index 22d483f3..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/manifest.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 v1 - -import ( - "encoding/json" - "io" - - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// Manifest represents the OCI image manifest in a structured way. -type Manifest struct { - SchemaVersion int64 `json:"schemaVersion"` - MediaType types.MediaType `json:"mediaType,omitempty"` - Config Descriptor `json:"config"` - Layers []Descriptor `json:"layers"` - Annotations map[string]string `json:"annotations,omitempty"` - Subject *Descriptor `json:"subject,omitempty"` -} - -// IndexManifest represents an OCI image index in a structured way. -type IndexManifest struct { - SchemaVersion int64 `json:"schemaVersion"` - MediaType types.MediaType `json:"mediaType,omitempty"` - Manifests []Descriptor `json:"manifests"` - Annotations map[string]string `json:"annotations,omitempty"` - Subject *Descriptor `json:"subject,omitempty"` -} - -// Descriptor holds a reference from the manifest to one of its constituent elements. -type Descriptor struct { - MediaType types.MediaType `json:"mediaType"` - Size int64 `json:"size"` - Digest Hash `json:"digest"` - Data []byte `json:"data,omitempty"` - URLs []string `json:"urls,omitempty"` - Annotations map[string]string `json:"annotations,omitempty"` - Platform *Platform `json:"platform,omitempty"` - ArtifactType string `json:"artifactType,omitempty"` -} - -// ParseManifest parses the io.Reader's contents into a Manifest. -func ParseManifest(r io.Reader) (*Manifest, error) { - m := Manifest{} - if err := json.NewDecoder(r).Decode(&m); err != nil { - return nil, err - } - return &m, nil -} - -// ParseIndexManifest parses the io.Reader's contents into an IndexManifest. -func ParseIndexManifest(r io.Reader) (*IndexManifest, error) { - im := IndexManifest{} - if err := json.NewDecoder(r).Decode(&im); err != nil { - return nil, err - } - return &im, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/match/match.go b/vendor/github.com/google/go-containerregistry/pkg/v1/match/match.go deleted file mode 100644 index 98b1ff90..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/match/match.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 match provides functionality for conveniently matching a v1.Descriptor. -package match - -import ( - v1 "github.com/google/go-containerregistry/pkg/v1" - imagespec "github.com/opencontainers/image-spec/specs-go/v1" -) - -// Matcher function that is given a v1.Descriptor, and returns whether or -// not it matches a given rule. Can match on anything it wants in the Descriptor. -type Matcher func(desc v1.Descriptor) bool - -// Name returns a match.Matcher that matches based on the value of the -// -// "org.opencontainers.image.ref.name" annotation: -// -// github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md#pre-defined-annotation-keys -func Name(name string) Matcher { - return Annotation(imagespec.AnnotationRefName, name) -} - -// Annotation returns a match.Matcher that matches based on the provided annotation. -func Annotation(key, value string) Matcher { - return func(desc v1.Descriptor) bool { - if desc.Annotations == nil { - return false - } - if aValue, ok := desc.Annotations[key]; ok && aValue == value { - return true - } - return false - } -} - -// Platforms returns a match.Matcher that matches on any one of the provided platforms. -// Ignores any descriptors that do not have a platform. -func Platforms(platforms ...v1.Platform) Matcher { - return func(desc v1.Descriptor) bool { - if desc.Platform == nil { - return false - } - for _, platform := range platforms { - if desc.Platform.Equals(platform) { - return true - } - } - return false - } -} - -// MediaTypes returns a match.Matcher that matches at least one of the provided media types. -func MediaTypes(mediaTypes ...string) Matcher { - mts := map[string]bool{} - for _, media := range mediaTypes { - mts[media] = true - } - return func(desc v1.Descriptor) bool { - if desc.MediaType == "" { - return false - } - if _, ok := mts[string(desc.MediaType)]; ok { - return true - } - return false - } -} - -// Digests returns a match.Matcher that matches at least one of the provided Digests -func Digests(digests ...v1.Hash) Matcher { - digs := map[v1.Hash]bool{} - for _, digest := range digests { - digs[digest] = true - } - return func(desc v1.Descriptor) bool { - _, ok := digs[desc.Digest] - return ok - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.md deleted file mode 100644 index 19e16124..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# `mutate` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/mutate?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/mutate) - -The `v1.Image`, `v1.ImageIndex`, and `v1.Layer` interfaces provide only -accessor methods, so they are essentially immutable. If you want to change -something about them, you need to produce a new instance of that interface. - -A common use case for this library is to read an image from somewhere (a source), -change something about it, and write the image somewhere else (a sink). - -Graphically, this looks something like: - -

- -

- -## Mutations - -This is obviously not a comprehensive set of useful transformations (PRs welcome!), -but a rough summary of what the `mutate` package currently does: - -### `Config` and `ConfigFile` - -These allow you to change the [image configuration](https://github.com/opencontainers/image-spec/blob/master/config.md#properties), -e.g. to change the entrypoint, environment, author, etc. - -### `Time`, `Canonical`, and `CreatedAt` - -These are useful in the context of [reproducible builds](https://reproducible-builds.org/), -where you may want to strip timestamps and other non-reproducible information. - -### `Append`, `AppendLayers`, and `AppendManifests` - -These functions allow the extension of a `v1.Image` or `v1.ImageIndex` with -new layers or manifests. - -For constructing an image `FROM scratch`, see the [`empty`](/pkg/v1/empty) package. - -### `MediaType` and `IndexMediaType` - -Sometimes, it is necessary to change the media type of an image or index, -e.g. to appease a registry with strict validation of images (_looking at you, GCR_). - -### `Rebase` - -Rebase has [its own README](/cmd/crane/rebase.md). - -This is the underlying implementation of [`crane rebase`](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_rebase.md). - -### `Extract` - -Extract will flatten an image filesystem into a single tar stream, -respecting whiteout files. - -This is the underlying implementation of [`crane export`](https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_export.md). diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.go deleted file mode 100644 index dfbd9951..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 mutate provides facilities for mutating v1.Images of any kind. -package mutate diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.go deleted file mode 100644 index 3ea27fe4..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/image.go +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 mutate - -import ( - "bytes" - "encoding/json" - "errors" - "sync" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/stream" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -type image struct { - base v1.Image - adds []Addendum - - computed bool - configFile *v1.ConfigFile - manifest *v1.Manifest - annotations map[string]string - mediaType *types.MediaType - configMediaType *types.MediaType - diffIDMap map[v1.Hash]v1.Layer - digestMap map[v1.Hash]v1.Layer - subject *v1.Descriptor - - sync.Mutex -} - -var _ v1.Image = (*image)(nil) - -func (i *image) MediaType() (types.MediaType, error) { - if i.mediaType != nil { - return *i.mediaType, nil - } - return i.base.MediaType() -} - -func (i *image) compute() error { - i.Lock() - defer i.Unlock() - - // Don't re-compute if already computed. - if i.computed { - return nil - } - var configFile *v1.ConfigFile - if i.configFile != nil { - configFile = i.configFile - } else { - cf, err := i.base.ConfigFile() - if err != nil { - return err - } - configFile = cf.DeepCopy() - } - diffIDs := configFile.RootFS.DiffIDs - history := configFile.History - - diffIDMap := make(map[v1.Hash]v1.Layer) - digestMap := make(map[v1.Hash]v1.Layer) - - for _, add := range i.adds { - history = append(history, add.History) - if add.Layer != nil { - diffID, err := add.Layer.DiffID() - if err != nil { - return err - } - diffIDs = append(diffIDs, diffID) - diffIDMap[diffID] = add.Layer - } - } - - m, err := i.base.Manifest() - if err != nil { - return err - } - manifest := m.DeepCopy() - manifestLayers := manifest.Layers - for _, add := range i.adds { - if add.Layer == nil { - // Empty layers include only history in manifest. - continue - } - - desc, err := partial.Descriptor(add.Layer) - if err != nil { - return err - } - - // Fields in the addendum override the original descriptor. - if len(add.Annotations) != 0 { - desc.Annotations = add.Annotations - } - if len(add.URLs) != 0 { - desc.URLs = add.URLs - } - - if add.MediaType != "" { - desc.MediaType = add.MediaType - } - - manifestLayers = append(manifestLayers, *desc) - digestMap[desc.Digest] = add.Layer - } - - configFile.RootFS.DiffIDs = diffIDs - configFile.History = history - - manifest.Layers = manifestLayers - - rcfg, err := json.Marshal(configFile) - if err != nil { - return err - } - d, sz, err := v1.SHA256(bytes.NewBuffer(rcfg)) - if err != nil { - return err - } - manifest.Config.Digest = d - manifest.Config.Size = sz - - // If Data was set in the base image, we need to update it in the mutated image. - if m.Config.Data != nil { - manifest.Config.Data = rcfg - } - - // If the user wants to mutate the media type of the config - if i.configMediaType != nil { - manifest.Config.MediaType = *i.configMediaType - } - - if i.mediaType != nil { - manifest.MediaType = *i.mediaType - } - - if i.annotations != nil { - if manifest.Annotations == nil { - manifest.Annotations = map[string]string{} - } - - for k, v := range i.annotations { - manifest.Annotations[k] = v - } - } - manifest.Subject = i.subject - - i.configFile = configFile - i.manifest = manifest - i.diffIDMap = diffIDMap - i.digestMap = digestMap - i.computed = true - return nil -} - -// Layers returns the ordered collection of filesystem layers that comprise this image. -// The order of the list is oldest/base layer first, and most-recent/top layer last. -func (i *image) Layers() ([]v1.Layer, error) { - if err := i.compute(); errors.Is(err, stream.ErrNotComputed) { - // Image contains a streamable layer which has not yet been - // consumed. Just return the layers we have in case the caller - // is going to consume the layers. - layers, err := i.base.Layers() - if err != nil { - return nil, err - } - for _, add := range i.adds { - layers = append(layers, add.Layer) - } - return layers, nil - } else if err != nil { - return nil, err - } - - diffIDs, err := partial.DiffIDs(i) - if err != nil { - return nil, err - } - ls := make([]v1.Layer, 0, len(diffIDs)) - for _, h := range diffIDs { - l, err := i.LayerByDiffID(h) - if err != nil { - return nil, err - } - ls = append(ls, l) - } - return ls, nil -} - -// ConfigName returns the hash of the image's config file. -func (i *image) ConfigName() (v1.Hash, error) { - if err := i.compute(); err != nil { - return v1.Hash{}, err - } - return partial.ConfigName(i) -} - -// ConfigFile returns this image's config file. -func (i *image) ConfigFile() (*v1.ConfigFile, error) { - if err := i.compute(); err != nil { - return nil, err - } - return i.configFile.DeepCopy(), nil -} - -// RawConfigFile returns the serialized bytes of ConfigFile() -func (i *image) RawConfigFile() ([]byte, error) { - if err := i.compute(); err != nil { - return nil, err - } - return json.Marshal(i.configFile) -} - -// Digest returns the sha256 of this image's manifest. -func (i *image) Digest() (v1.Hash, error) { - if err := i.compute(); err != nil { - return v1.Hash{}, err - } - return partial.Digest(i) -} - -// Size implements v1.Image. -func (i *image) Size() (int64, error) { - if err := i.compute(); err != nil { - return -1, err - } - return partial.Size(i) -} - -// Manifest returns this image's Manifest object. -func (i *image) Manifest() (*v1.Manifest, error) { - if err := i.compute(); err != nil { - return nil, err - } - return i.manifest.DeepCopy(), nil -} - -// RawManifest returns the serialized bytes of Manifest() -func (i *image) RawManifest() ([]byte, error) { - if err := i.compute(); err != nil { - return nil, err - } - return json.Marshal(i.manifest) -} - -// LayerByDigest returns a Layer for interacting with a particular layer of -// the image, looking it up by "digest" (the compressed hash). -func (i *image) LayerByDigest(h v1.Hash) (v1.Layer, error) { - if cn, err := i.ConfigName(); err != nil { - return nil, err - } else if h == cn { - return partial.ConfigLayer(i) - } - if layer, ok := i.digestMap[h]; ok { - return layer, nil - } - return i.base.LayerByDigest(h) -} - -// LayerByDiffID is an analog to LayerByDigest, looking up by "diff id" -// (the uncompressed hash). -func (i *image) LayerByDiffID(h v1.Hash) (v1.Layer, error) { - if layer, ok := i.diffIDMap[h]; ok { - return layer, nil - } - return i.base.LayerByDiffID(h) -} - -func validate(adds []Addendum) error { - for _, add := range adds { - if add.Layer == nil && !add.History.EmptyLayer { - return errors.New("unable to add a nil layer to the image") - } - } - return nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go deleted file mode 100644 index 512effef..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/index.go +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 mutate - -import ( - "encoding/json" - "errors" - "fmt" - "sync" - - "github.com/google/go-containerregistry/pkg/logs" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/match" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/stream" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -func computeDescriptor(ia IndexAddendum) (*v1.Descriptor, error) { - desc, err := partial.Descriptor(ia.Add) - if err != nil { - return nil, err - } - - // The IndexAddendum allows overriding Descriptor values. - if ia.Descriptor.Size != 0 { - desc.Size = ia.Descriptor.Size - } - if string(ia.Descriptor.MediaType) != "" { - desc.MediaType = ia.Descriptor.MediaType - } - if ia.Descriptor.Digest != (v1.Hash{}) { - desc.Digest = ia.Descriptor.Digest - } - if ia.Descriptor.Platform != nil { - desc.Platform = ia.Descriptor.Platform - } - if len(ia.Descriptor.URLs) != 0 { - desc.URLs = ia.Descriptor.URLs - } - if len(ia.Descriptor.Annotations) != 0 { - desc.Annotations = ia.Descriptor.Annotations - } - if ia.Descriptor.Data != nil { - desc.Data = ia.Descriptor.Data - } - - return desc, nil -} - -type index struct { - base v1.ImageIndex - adds []IndexAddendum - // remove is removed before adds - remove match.Matcher - - computed bool - manifest *v1.IndexManifest - annotations map[string]string - mediaType *types.MediaType - imageMap map[v1.Hash]v1.Image - indexMap map[v1.Hash]v1.ImageIndex - layerMap map[v1.Hash]v1.Layer - subject *v1.Descriptor - - sync.Mutex -} - -var _ v1.ImageIndex = (*index)(nil) - -func (i *index) MediaType() (types.MediaType, error) { - if i.mediaType != nil { - return *i.mediaType, nil - } - return i.base.MediaType() -} - -func (i *index) Size() (int64, error) { return partial.Size(i) } - -func (i *index) compute() error { - i.Lock() - defer i.Unlock() - - // Don't re-compute if already computed. - if i.computed { - return nil - } - - i.imageMap = make(map[v1.Hash]v1.Image) - i.indexMap = make(map[v1.Hash]v1.ImageIndex) - i.layerMap = make(map[v1.Hash]v1.Layer) - - m, err := i.base.IndexManifest() - if err != nil { - return err - } - manifest := m.DeepCopy() - manifests := manifest.Manifests - - if i.remove != nil { - var cleanedManifests []v1.Descriptor - for _, m := range manifests { - if !i.remove(m) { - cleanedManifests = append(cleanedManifests, m) - } - } - manifests = cleanedManifests - } - - for _, add := range i.adds { - desc, err := computeDescriptor(add) - if err != nil { - return err - } - - manifests = append(manifests, *desc) - if idx, ok := add.Add.(v1.ImageIndex); ok { - i.indexMap[desc.Digest] = idx - } else if img, ok := add.Add.(v1.Image); ok { - i.imageMap[desc.Digest] = img - } else if l, ok := add.Add.(v1.Layer); ok { - i.layerMap[desc.Digest] = l - } else { - logs.Warn.Printf("Unexpected index addendum: %T", add.Add) - } - } - - manifest.Manifests = manifests - - if i.mediaType != nil { - manifest.MediaType = *i.mediaType - } - - if i.annotations != nil { - if manifest.Annotations == nil { - manifest.Annotations = map[string]string{} - } - for k, v := range i.annotations { - manifest.Annotations[k] = v - } - } - manifest.Subject = i.subject - - i.manifest = manifest - i.computed = true - return nil -} - -func (i *index) Image(h v1.Hash) (v1.Image, error) { - if img, ok := i.imageMap[h]; ok { - return img, nil - } - return i.base.Image(h) -} - -func (i *index) ImageIndex(h v1.Hash) (v1.ImageIndex, error) { - if idx, ok := i.indexMap[h]; ok { - return idx, nil - } - return i.base.ImageIndex(h) -} - -type withLayer interface { - Layer(v1.Hash) (v1.Layer, error) -} - -// Workaround for #819. -func (i *index) Layer(h v1.Hash) (v1.Layer, error) { - if layer, ok := i.layerMap[h]; ok { - return layer, nil - } - if wl, ok := i.base.(withLayer); ok { - return wl.Layer(h) - } - return nil, fmt.Errorf("layer not found: %s", h) -} - -// Digest returns the sha256 of this image's manifest. -func (i *index) Digest() (v1.Hash, error) { - if err := i.compute(); err != nil { - return v1.Hash{}, err - } - return partial.Digest(i) -} - -// Manifest returns this image's Manifest object. -func (i *index) IndexManifest() (*v1.IndexManifest, error) { - if err := i.compute(); err != nil { - return nil, err - } - return i.manifest.DeepCopy(), nil -} - -// RawManifest returns the serialized bytes of Manifest() -func (i *index) RawManifest() ([]byte, error) { - if err := i.compute(); err != nil { - return nil, err - } - return json.Marshal(i.manifest) -} - -func (i *index) Manifests() ([]partial.Describable, error) { - if err := i.compute(); errors.Is(err, stream.ErrNotComputed) { - // Index contains a streamable layer which has not yet been - // consumed. Just return the manifests we have in case the caller - // is going to consume the streamable layers. - manifests, err := partial.Manifests(i.base) - if err != nil { - return nil, err - } - for _, add := range i.adds { - manifests = append(manifests, add.Add) - } - return manifests, nil - } else if err != nil { - return nil, err - } - - return partial.ComputeManifests(i) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go deleted file mode 100644 index 1a24b10d..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/mutate.go +++ /dev/null @@ -1,555 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 mutate - -import ( - "archive/tar" - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "path/filepath" - "strings" - "time" - - "github.com/google/go-containerregistry/internal/gzip" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/empty" - "github.com/google/go-containerregistry/pkg/v1/match" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/tarball" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -const whiteoutPrefix = ".wh." - -// Addendum contains layers and history to be appended -// to a base image -type Addendum struct { - Layer v1.Layer - History v1.History - URLs []string - Annotations map[string]string - MediaType types.MediaType -} - -// AppendLayers applies layers to a base image. -func AppendLayers(base v1.Image, layers ...v1.Layer) (v1.Image, error) { - additions := make([]Addendum, 0, len(layers)) - for _, layer := range layers { - additions = append(additions, Addendum{Layer: layer}) - } - - return Append(base, additions...) -} - -// Append will apply the list of addendums to the base image -func Append(base v1.Image, adds ...Addendum) (v1.Image, error) { - if len(adds) == 0 { - return base, nil - } - if err := validate(adds); err != nil { - return nil, err - } - - return &image{ - base: base, - adds: adds, - }, nil -} - -// Appendable is an interface that represents something that can be appended -// to an ImageIndex. We need to be able to construct a v1.Descriptor in order -// to append something, and this is the minimum required information for that. -type Appendable interface { - MediaType() (types.MediaType, error) - Digest() (v1.Hash, error) - Size() (int64, error) -} - -// IndexAddendum represents an appendable thing and all the properties that -// we may want to override in the resulting v1.Descriptor. -type IndexAddendum struct { - Add Appendable - v1.Descriptor -} - -// AppendManifests appends a manifest to the ImageIndex. -func AppendManifests(base v1.ImageIndex, adds ...IndexAddendum) v1.ImageIndex { - return &index{ - base: base, - adds: adds, - } -} - -// RemoveManifests removes any descriptors that match the match.Matcher. -func RemoveManifests(base v1.ImageIndex, matcher match.Matcher) v1.ImageIndex { - return &index{ - base: base, - remove: matcher, - } -} - -// Config mutates the provided v1.Image to have the provided v1.Config -func Config(base v1.Image, cfg v1.Config) (v1.Image, error) { - cf, err := base.ConfigFile() - if err != nil { - return nil, err - } - - cf.Config = cfg - - return ConfigFile(base, cf) -} - -// Subject mutates the subject on an image or index manifest. -// -// The input is expected to be a v1.Image or v1.ImageIndex, and -// returns the same type. You can type-assert the result like so: -// -// img := Subject(empty.Image, subj).(v1.Image) -// -// Or for an index: -// -// idx := Subject(empty.Index, subj).(v1.ImageIndex) -// -// If the input is not an Image or ImageIndex, the result will -// attempt to lazily annotate the raw manifest. -func Subject(f partial.WithRawManifest, subject v1.Descriptor) partial.WithRawManifest { - if img, ok := f.(v1.Image); ok { - return &image{ - base: img, - subject: &subject, - } - } - if idx, ok := f.(v1.ImageIndex); ok { - return &index{ - base: idx, - subject: &subject, - } - } - return arbitraryRawManifest{a: f, subject: &subject} -} - -// Annotations mutates the annotations on an annotatable image or index manifest. -// -// The annotatable input is expected to be a v1.Image or v1.ImageIndex, and -// returns the same type. You can type-assert the result like so: -// -// img := Annotations(empty.Image, map[string]string{ -// "foo": "bar", -// }).(v1.Image) -// -// Or for an index: -// -// idx := Annotations(empty.Index, map[string]string{ -// "foo": "bar", -// }).(v1.ImageIndex) -// -// If the input Annotatable is not an Image or ImageIndex, the result will -// attempt to lazily annotate the raw manifest. -func Annotations(f partial.WithRawManifest, anns map[string]string) partial.WithRawManifest { - if img, ok := f.(v1.Image); ok { - return &image{ - base: img, - annotations: anns, - } - } - if idx, ok := f.(v1.ImageIndex); ok { - return &index{ - base: idx, - annotations: anns, - } - } - return arbitraryRawManifest{a: f, anns: anns} -} - -type arbitraryRawManifest struct { - a partial.WithRawManifest - anns map[string]string - subject *v1.Descriptor -} - -func (a arbitraryRawManifest) RawManifest() ([]byte, error) { - b, err := a.a.RawManifest() - if err != nil { - return nil, err - } - var m map[string]any - if err := json.Unmarshal(b, &m); err != nil { - return nil, err - } - if ann, ok := m["annotations"]; ok { - if annm, ok := ann.(map[string]string); ok { - for k, v := range a.anns { - annm[k] = v - } - } else { - return nil, fmt.Errorf(".annotations is not a map: %T", ann) - } - } else { - m["annotations"] = a.anns - } - if a.subject != nil { - m["subject"] = a.subject - } - return json.Marshal(m) -} - -// ConfigFile mutates the provided v1.Image to have the provided v1.ConfigFile -func ConfigFile(base v1.Image, cfg *v1.ConfigFile) (v1.Image, error) { - m, err := base.Manifest() - if err != nil { - return nil, err - } - - image := &image{ - base: base, - manifest: m.DeepCopy(), - configFile: cfg, - } - - return image, nil -} - -// CreatedAt mutates the provided v1.Image to have the provided v1.Time -func CreatedAt(base v1.Image, created v1.Time) (v1.Image, error) { - cf, err := base.ConfigFile() - if err != nil { - return nil, err - } - - cfg := cf.DeepCopy() - cfg.Created = created - - return ConfigFile(base, cfg) -} - -// Extract takes an image and returns an io.ReadCloser containing the image's -// flattened filesystem. -// -// Callers can read the filesystem contents by passing the reader to -// tar.NewReader, or io.Copy it directly to some output. -// -// If a caller doesn't read the full contents, they should Close it to free up -// resources used during extraction. -func Extract(img v1.Image) io.ReadCloser { - pr, pw := io.Pipe() - - go func() { - // Close the writer with any errors encountered during - // extraction. These errors will be returned by the reader end - // on subsequent reads. If err == nil, the reader will return - // EOF. - pw.CloseWithError(extract(img, pw)) - }() - - return pr -} - -// Adapted from https://github.com/google/containerregistry/blob/da03b395ccdc4e149e34fbb540483efce962dc64/client/v2_2/docker_image_.py#L816 -func extract(img v1.Image, w io.Writer) error { - tarWriter := tar.NewWriter(w) - defer tarWriter.Close() - - fileMap := map[string]bool{} - - layers, err := img.Layers() - if err != nil { - return fmt.Errorf("retrieving image layers: %w", err) - } - - // we iterate through the layers in reverse order because it makes handling - // whiteout layers more efficient, since we can just keep track of the removed - // files as we see .wh. layers and ignore those in previous layers. - for i := len(layers) - 1; i >= 0; i-- { - layer := layers[i] - layerReader, err := layer.Uncompressed() - if err != nil { - return fmt.Errorf("reading layer contents: %w", err) - } - defer layerReader.Close() - tarReader := tar.NewReader(layerReader) - for { - header, err := tarReader.Next() - if errors.Is(err, io.EOF) { - break - } - if err != nil { - return fmt.Errorf("reading tar: %w", err) - } - - // Some tools prepend everything with "./", so if we don't Clean the - // name, we may have duplicate entries, which angers tar-split. - header.Name = filepath.Clean(header.Name) - // force PAX format to remove Name/Linkname length limit of 100 characters - // required by USTAR and to not depend on internal tar package guess which - // prefers USTAR over PAX - header.Format = tar.FormatPAX - - basename := filepath.Base(header.Name) - dirname := filepath.Dir(header.Name) - tombstone := strings.HasPrefix(basename, whiteoutPrefix) - if tombstone { - basename = basename[len(whiteoutPrefix):] - } - - // check if we have seen value before - // if we're checking a directory, don't filepath.Join names - var name string - if header.Typeflag == tar.TypeDir { - name = header.Name - } else { - name = filepath.Join(dirname, basename) - } - - if _, ok := fileMap[name]; ok { - continue - } - - // check for a whited out parent directory - if inWhiteoutDir(fileMap, name) { - continue - } - - // mark file as handled. non-directory implicitly tombstones - // any entries with a matching (or child) name - fileMap[name] = tombstone || !(header.Typeflag == tar.TypeDir) - if !tombstone { - if err := tarWriter.WriteHeader(header); err != nil { - return err - } - if header.Size > 0 { - if _, err := io.CopyN(tarWriter, tarReader, header.Size); err != nil { - return err - } - } - } - } - } - return nil -} - -func inWhiteoutDir(fileMap map[string]bool, file string) bool { - for { - if file == "" { - break - } - dirname := filepath.Dir(file) - if file == dirname { - break - } - if val, ok := fileMap[dirname]; ok && val { - return true - } - file = dirname - } - return false -} - -func max(a, b int) int { - if a > b { - return a - } - return b -} - -// Time sets all timestamps in an image to the given timestamp. -func Time(img v1.Image, t time.Time) (v1.Image, error) { - newImage := empty.Image - - layers, err := img.Layers() - if err != nil { - return nil, fmt.Errorf("getting image layers: %w", err) - } - - ocf, err := img.ConfigFile() - if err != nil { - return nil, fmt.Errorf("getting original config file: %w", err) - } - - addendums := make([]Addendum, max(len(ocf.History), len(layers))) - var historyIdx, addendumIdx int - for layerIdx := 0; layerIdx < len(layers); addendumIdx, layerIdx = addendumIdx+1, layerIdx+1 { - newLayer, err := layerTime(layers[layerIdx], t) - if err != nil { - return nil, fmt.Errorf("setting layer times: %w", err) - } - - // try to search for the history entry that corresponds to this layer - for ; historyIdx < len(ocf.History); historyIdx++ { - addendums[addendumIdx].History = ocf.History[historyIdx] - // if it's an EmptyLayer, do not set the Layer and have the Addendum with just the History - // and move on to the next History entry - if ocf.History[historyIdx].EmptyLayer { - addendumIdx++ - continue - } - // otherwise, we can exit from the cycle - historyIdx++ - break - } - if addendumIdx < len(addendums) { - addendums[addendumIdx].Layer = newLayer - } - } - - // add all leftover History entries - for ; historyIdx < len(ocf.History); historyIdx, addendumIdx = historyIdx+1, addendumIdx+1 { - addendums[addendumIdx].History = ocf.History[historyIdx] - } - - newImage, err = Append(newImage, addendums...) - if err != nil { - return nil, fmt.Errorf("appending layers: %w", err) - } - - cf, err := newImage.ConfigFile() - if err != nil { - return nil, fmt.Errorf("setting config file: %w", err) - } - - cfg := cf.DeepCopy() - - // Copy basic config over - cfg.Architecture = ocf.Architecture - cfg.OS = ocf.OS - cfg.OSVersion = ocf.OSVersion - cfg.Config = ocf.Config - - // Strip away timestamps from the config file - cfg.Created = v1.Time{Time: t} - - for i, h := range cfg.History { - h.Created = v1.Time{Time: t} - h.CreatedBy = ocf.History[i].CreatedBy - h.Comment = ocf.History[i].Comment - h.EmptyLayer = ocf.History[i].EmptyLayer - // Explicitly ignore Author field; which hinders reproducibility - h.Author = "" - cfg.History[i] = h - } - - return ConfigFile(newImage, cfg) -} - -func layerTime(layer v1.Layer, t time.Time) (v1.Layer, error) { - layerReader, err := layer.Uncompressed() - if err != nil { - return nil, fmt.Errorf("getting layer: %w", err) - } - defer layerReader.Close() - w := new(bytes.Buffer) - tarWriter := tar.NewWriter(w) - defer tarWriter.Close() - - tarReader := tar.NewReader(layerReader) - for { - header, err := tarReader.Next() - if errors.Is(err, io.EOF) { - break - } - if err != nil { - return nil, fmt.Errorf("reading layer: %w", err) - } - - header.ModTime = t - - //PAX and GNU Format support additional timestamps in the header - if header.Format == tar.FormatPAX || header.Format == tar.FormatGNU { - header.AccessTime = t - header.ChangeTime = t - } - - if err := tarWriter.WriteHeader(header); err != nil { - return nil, fmt.Errorf("writing tar header: %w", err) - } - - if header.Typeflag == tar.TypeReg { - // TODO(#1168): This should be lazy, and not buffer the entire layer contents. - if _, err = io.CopyN(tarWriter, tarReader, header.Size); err != nil { - return nil, fmt.Errorf("writing layer file: %w", err) - } - } - } - - if err := tarWriter.Close(); err != nil { - return nil, err - } - - b := w.Bytes() - // gzip the contents, then create the layer - opener := func() (io.ReadCloser, error) { - return gzip.ReadCloser(io.NopCloser(bytes.NewReader(b))), nil - } - layer, err = tarball.LayerFromOpener(opener) - if err != nil { - return nil, fmt.Errorf("creating layer: %w", err) - } - - return layer, nil -} - -// Canonical is a helper function to combine Time and configFile -// to remove any randomness during a docker build. -func Canonical(img v1.Image) (v1.Image, error) { - // Set all timestamps to 0 - created := time.Time{} - img, err := Time(img, created) - if err != nil { - return nil, err - } - - cf, err := img.ConfigFile() - if err != nil { - return nil, err - } - - // Get rid of host-dependent random config - cfg := cf.DeepCopy() - - cfg.Container = "" - cfg.Config.Hostname = "" - cfg.DockerVersion = "" - - return ConfigFile(img, cfg) -} - -// MediaType modifies the MediaType() of the given image. -func MediaType(img v1.Image, mt types.MediaType) v1.Image { - return &image{ - base: img, - mediaType: &mt, - } -} - -// ConfigMediaType modifies the MediaType() of the given image's Config. -// -// If !mt.IsConfig(), this will be the image's artifactType in any indexes it's a part of. -func ConfigMediaType(img v1.Image, mt types.MediaType) v1.Image { - return &image{ - base: img, - configMediaType: &mt, - } -} - -// IndexMediaType modifies the MediaType() of the given index. -func IndexMediaType(idx v1.ImageIndex, mt types.MediaType) v1.ImageIndex { - return &index{ - base: idx, - mediaType: &mt, - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.go b/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.go deleted file mode 100644 index c606e0b7..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/mutate/rebase.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 mutate - -import ( - "fmt" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/empty" -) - -// Rebase returns a new v1.Image where the oldBase in orig is replaced by newBase. -func Rebase(orig, oldBase, newBase v1.Image) (v1.Image, error) { - // Verify that oldBase's layers are present in orig, otherwise orig is - // not based on oldBase at all. - origLayers, err := orig.Layers() - if err != nil { - return nil, fmt.Errorf("failed to get layers for original: %w", err) - } - oldBaseLayers, err := oldBase.Layers() - if err != nil { - return nil, err - } - if len(oldBaseLayers) > len(origLayers) { - return nil, fmt.Errorf("image %q is not based on %q (too few layers)", orig, oldBase) - } - for i, l := range oldBaseLayers { - oldLayerDigest, err := l.Digest() - if err != nil { - return nil, fmt.Errorf("failed to get digest of layer %d of %q: %w", i, oldBase, err) - } - origLayerDigest, err := origLayers[i].Digest() - if err != nil { - return nil, fmt.Errorf("failed to get digest of layer %d of %q: %w", i, orig, err) - } - if oldLayerDigest != origLayerDigest { - return nil, fmt.Errorf("image %q is not based on %q (layer %d mismatch)", orig, oldBase, i) - } - } - - oldConfig, err := oldBase.ConfigFile() - if err != nil { - return nil, fmt.Errorf("failed to get config for old base: %w", err) - } - - origConfig, err := orig.ConfigFile() - if err != nil { - return nil, fmt.Errorf("failed to get config for original: %w", err) - } - - newConfig, err := newBase.ConfigFile() - if err != nil { - return nil, fmt.Errorf("could not get config for new base: %w", err) - } - - // Stitch together an image that contains: - // - original image's config - // - new base image's os/arch properties - // - new base image's layers + top of original image's layers - // - new base image's history + top of original image's history - rebasedImage, err := Config(empty.Image, *origConfig.Config.DeepCopy()) - if err != nil { - return nil, fmt.Errorf("failed to create empty image with original config: %w", err) - } - - // Add new config properties from existing images. - rebasedConfig, err := rebasedImage.ConfigFile() - if err != nil { - return nil, fmt.Errorf("could not get config for rebased image: %w", err) - } - // OS/Arch properties from new base - rebasedConfig.Architecture = newConfig.Architecture - rebasedConfig.OS = newConfig.OS - rebasedConfig.OSVersion = newConfig.OSVersion - - // Apply config properties to rebased. - rebasedImage, err = ConfigFile(rebasedImage, rebasedConfig) - if err != nil { - return nil, fmt.Errorf("failed to replace config for rebased image: %w", err) - } - - // Get new base layers and config for history. - newBaseLayers, err := newBase.Layers() - if err != nil { - return nil, fmt.Errorf("could not get new base layers for new base: %w", err) - } - // Add new base layers. - rebasedImage, err = Append(rebasedImage, createAddendums(0, 0, newConfig.History, newBaseLayers)...) - if err != nil { - return nil, fmt.Errorf("failed to append new base image: %w", err) - } - - // Add original layers above the old base. - rebasedImage, err = Append(rebasedImage, createAddendums(len(oldConfig.History), len(oldBaseLayers)+1, origConfig.History, origLayers)...) - if err != nil { - return nil, fmt.Errorf("failed to append original image: %w", err) - } - - return rebasedImage, nil -} - -// createAddendums makes a list of addendums from a history and layers starting from a specific history and layer -// indexes. -func createAddendums(startHistory, startLayer int, history []v1.History, layers []v1.Layer) []Addendum { - var adds []Addendum - // History should be a superset of layers; empty layers (e.g. ENV statements) only exist in history. - // They cannot be iterated identically but must be walked independently, only advancing the iterator for layers - // when a history entry for a non-empty layer is seen. - layerIndex := 0 - for historyIndex := range history { - var layer v1.Layer - emptyLayer := history[historyIndex].EmptyLayer - if !emptyLayer { - layer = layers[layerIndex] - layerIndex++ - } - if historyIndex >= startHistory || layerIndex >= startLayer { - adds = append(adds, Addendum{ - Layer: layer, - History: history[historyIndex], - }) - } - } - // In the event history was malformed or non-existent, append the remaining layers. - for i := layerIndex; i < len(layers); i++ { - if i >= startLayer { - adds = append(adds, Addendum{Layer: layers[layerIndex]}) - } - } - - return adds -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.md deleted file mode 100644 index 53ebbc6c..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# `partial` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/partial?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/partial) - -## Partial Implementations - -There are roughly two kinds of image representations: compressed and uncompressed. - -The implementations for these kinds of images are almost identical, with the only -major difference being how blobs (config and layers) are fetched. This common -code lives in this package, where you provide a _partial_ implementation of a -compressed or uncompressed image, and you get back a full `v1.Image` implementation. - -### Examples - -In a registry, blobs are compressed, so it's easiest to implement a `v1.Image` in terms -of compressed layers. `remote.remoteImage` does this by implementing `CompressedImageCore`: - -```go -type CompressedImageCore interface { - RawConfigFile() ([]byte, error) - MediaType() (types.MediaType, error) - RawManifest() ([]byte, error) - LayerByDigest(v1.Hash) (CompressedLayer, error) -} -``` - -In a tarball, blobs are (often) uncompressed, so it's easiest to implement a `v1.Image` in terms -of uncompressed layers. `tarball.uncompressedImage` does this by implementing `UncompressedImageCore`: - -```go -type UncompressedImageCore interface { - RawConfigFile() ([]byte, error) - MediaType() (types.MediaType, error) - LayerByDiffID(v1.Hash) (UncompressedLayer, error) -} -``` - -## Optional Methods - -Where possible, we access some information via optional methods as an optimization. - -### [`partial.Descriptor`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/partial#Descriptor) - -There are some properties of a [`Descriptor`](https://github.com/opencontainers/image-spec/blob/master/descriptor.md#properties) that aren't derivable from just image data: - -* `MediaType` -* `Platform` -* `URLs` -* `Annotations` - -For example, in a `tarball.Image`, there is a `LayerSources` field that contains -an entire layer descriptor with `URLs` information for foreign layers. This -information can be passed through to callers by implementing this optional -`Descriptor` method. - -See [`#654`](https://github.com/google/go-containerregistry/pull/654). - -### [`partial.UncompressedSize`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/partial#UncompressedSize) - -Usually, you don't need to know the uncompressed size of a layer, since that -information isn't stored in a config file (just he sha256 is needed); however, -there are cases where it is very helpful to know the layer size, e.g. when -writing the uncompressed layer into a tarball. - -See [`#655`](https://github.com/google/go-containerregistry/pull/655). - -### [`partial.Exists`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/partial#Exists) - -We generally don't care about the existence of something as granular as a -layer, and would rather ensure all the invariants of an image are upheld via -the `validate` package. However, there are situations where we want to do a -quick smoke test to ensure that the underlying storage engine hasn't been -corrupted by something e.g. deleting files or blobs. Thus, we've exposed an -optional `Exists` method that does an existence check without actually reading -any bytes. - -The `remote` package implements this via `HEAD` requests. - -The `layout` package implements this via `os.Stat`. - -See [`#838`](https://github.com/google/go-containerregistry/pull/838). diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.go b/vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.go deleted file mode 100644 index 44989ac9..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/compressed.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 partial - -import ( - "io" - - "github.com/google/go-containerregistry/internal/and" - "github.com/google/go-containerregistry/internal/compression" - "github.com/google/go-containerregistry/internal/gzip" - "github.com/google/go-containerregistry/internal/zstd" - comp "github.com/google/go-containerregistry/pkg/compression" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// CompressedLayer represents the bare minimum interface a natively -// compressed layer must implement for us to produce a v1.Layer -type CompressedLayer interface { - // Digest returns the Hash of the compressed layer. - Digest() (v1.Hash, error) - - // Compressed returns an io.ReadCloser for the compressed layer contents. - Compressed() (io.ReadCloser, error) - - // Size returns the compressed size of the Layer. - Size() (int64, error) - - // Returns the mediaType for the compressed Layer - MediaType() (types.MediaType, error) -} - -// compressedLayerExtender implements v1.Image using the compressed base properties. -type compressedLayerExtender struct { - CompressedLayer -} - -// Uncompressed implements v1.Layer -func (cle *compressedLayerExtender) Uncompressed() (io.ReadCloser, error) { - rc, err := cle.Compressed() - if err != nil { - return nil, err - } - - // Often, the "compressed" bytes are not actually-compressed. - // Peek at the first two bytes to determine whether it's correct to - // wrap this with gzip.UnzipReadCloser or zstd.UnzipReadCloser. - cp, pr, err := compression.PeekCompression(rc) - if err != nil { - return nil, err - } - - prc := &and.ReadCloser{ - Reader: pr, - CloseFunc: rc.Close, - } - - switch cp { - case comp.GZip: - return gzip.UnzipReadCloser(prc) - case comp.ZStd: - return zstd.UnzipReadCloser(prc) - default: - return prc, nil - } -} - -// DiffID implements v1.Layer -func (cle *compressedLayerExtender) DiffID() (v1.Hash, error) { - // If our nested CompressedLayer implements DiffID, - // then delegate to it instead. - if wdi, ok := cle.CompressedLayer.(WithDiffID); ok { - return wdi.DiffID() - } - r, err := cle.Uncompressed() - if err != nil { - return v1.Hash{}, err - } - defer r.Close() - h, _, err := v1.SHA256(r) - return h, err -} - -// CompressedToLayer fills in the missing methods from a CompressedLayer so that it implements v1.Layer -func CompressedToLayer(ul CompressedLayer) (v1.Layer, error) { - return &compressedLayerExtender{ul}, nil -} - -// CompressedImageCore represents the base minimum interface a natively -// compressed image must implement for us to produce a v1.Image. -type CompressedImageCore interface { - ImageCore - - // RawManifest returns the serialized bytes of the manifest. - RawManifest() ([]byte, error) - - // LayerByDigest is a variation on the v1.Image method, which returns - // a CompressedLayer instead. - LayerByDigest(v1.Hash) (CompressedLayer, error) -} - -// compressedImageExtender implements v1.Image by extending CompressedImageCore with the -// appropriate methods computed from the minimal core. -type compressedImageExtender struct { - CompressedImageCore -} - -// Assert that our extender type completes the v1.Image interface -var _ v1.Image = (*compressedImageExtender)(nil) - -// Digest implements v1.Image -func (i *compressedImageExtender) Digest() (v1.Hash, error) { - return Digest(i) -} - -// ConfigName implements v1.Image -func (i *compressedImageExtender) ConfigName() (v1.Hash, error) { - return ConfigName(i) -} - -// Layers implements v1.Image -func (i *compressedImageExtender) Layers() ([]v1.Layer, error) { - hs, err := FSLayers(i) - if err != nil { - return nil, err - } - ls := make([]v1.Layer, 0, len(hs)) - for _, h := range hs { - l, err := i.LayerByDigest(h) - if err != nil { - return nil, err - } - ls = append(ls, l) - } - return ls, nil -} - -// LayerByDigest implements v1.Image -func (i *compressedImageExtender) LayerByDigest(h v1.Hash) (v1.Layer, error) { - cl, err := i.CompressedImageCore.LayerByDigest(h) - if err != nil { - return nil, err - } - return CompressedToLayer(cl) -} - -// LayerByDiffID implements v1.Image -func (i *compressedImageExtender) LayerByDiffID(h v1.Hash) (v1.Layer, error) { - h, err := DiffIDToBlob(i, h) - if err != nil { - return nil, err - } - return i.LayerByDigest(h) -} - -// ConfigFile implements v1.Image -func (i *compressedImageExtender) ConfigFile() (*v1.ConfigFile, error) { - return ConfigFile(i) -} - -// Manifest implements v1.Image -func (i *compressedImageExtender) Manifest() (*v1.Manifest, error) { - return Manifest(i) -} - -// Size implements v1.Image -func (i *compressedImageExtender) Size() (int64, error) { - return Size(i) -} - -// CompressedToImage fills in the missing methods from a CompressedImageCore so that it implements v1.Image -func CompressedToImage(cic CompressedImageCore) (v1.Image, error) { - return &compressedImageExtender{ - CompressedImageCore: cic, - }, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.go deleted file mode 100644 index 153dfe4d..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 partial defines methods for building up a v1.Image from -// minimal subsets that are sufficient for defining a v1.Image. -package partial diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.go deleted file mode 100644 index c65f45e0..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/image.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 partial - -import ( - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// ImageCore is the core set of properties without which we cannot build a v1.Image -type ImageCore interface { - // RawConfigFile returns the serialized bytes of this image's config file. - RawConfigFile() ([]byte, error) - - // MediaType of this image's manifest. - MediaType() (types.MediaType, error) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.go deleted file mode 100644 index 10cfb2b2..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/index.go +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 partial - -import ( - "fmt" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/match" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// FindManifests given a v1.ImageIndex, find the manifests that fit the matcher. -func FindManifests(index v1.ImageIndex, matcher match.Matcher) ([]v1.Descriptor, error) { - // get the actual manifest list - indexManifest, err := index.IndexManifest() - if err != nil { - return nil, fmt.Errorf("unable to get raw index: %w", err) - } - manifests := []v1.Descriptor{} - // try to get the root of our image - for _, manifest := range indexManifest.Manifests { - if matcher(manifest) { - manifests = append(manifests, manifest) - } - } - return manifests, nil -} - -// FindImages given a v1.ImageIndex, find the images that fit the matcher. If a Descriptor -// matches the provider Matcher, but the referenced item is not an Image, ignores it. -// Only returns those that match the Matcher and are images. -func FindImages(index v1.ImageIndex, matcher match.Matcher) ([]v1.Image, error) { - matches := []v1.Image{} - manifests, err := FindManifests(index, matcher) - if err != nil { - return nil, err - } - for _, desc := range manifests { - // if it is not an image, ignore it - if !desc.MediaType.IsImage() { - continue - } - img, err := index.Image(desc.Digest) - if err != nil { - return nil, err - } - matches = append(matches, img) - } - return matches, nil -} - -// FindIndexes given a v1.ImageIndex, find the indexes that fit the matcher. If a Descriptor -// matches the provider Matcher, but the referenced item is not an Index, ignores it. -// Only returns those that match the Matcher and are indexes. -func FindIndexes(index v1.ImageIndex, matcher match.Matcher) ([]v1.ImageIndex, error) { - matches := []v1.ImageIndex{} - manifests, err := FindManifests(index, matcher) - if err != nil { - return nil, err - } - for _, desc := range manifests { - if !desc.MediaType.IsIndex() { - continue - } - // if it is not an index, ignore it - idx, err := index.ImageIndex(desc.Digest) - if err != nil { - return nil, err - } - matches = append(matches, idx) - } - return matches, nil -} - -type withManifests interface { - Manifests() ([]Describable, error) -} - -type withLayer interface { - Layer(v1.Hash) (v1.Layer, error) -} - -type describable struct { - desc v1.Descriptor -} - -func (d describable) Digest() (v1.Hash, error) { - return d.desc.Digest, nil -} - -func (d describable) Size() (int64, error) { - return d.desc.Size, nil -} - -func (d describable) MediaType() (types.MediaType, error) { - return d.desc.MediaType, nil -} - -func (d describable) Descriptor() (*v1.Descriptor, error) { - return &d.desc, nil -} - -// Manifests is analogous to v1.Image.Layers in that it allows values in the -// returned list to be lazily evaluated, which enables an index to contain -// an image that contains a streaming layer. -// -// This should have been part of the v1.ImageIndex interface, but wasn't. -// It is instead usable through this extension interface. -func Manifests(idx v1.ImageIndex) ([]Describable, error) { - if wm, ok := idx.(withManifests); ok { - return wm.Manifests() - } - - return ComputeManifests(idx) -} - -// ComputeManifests provides a fallback implementation for Manifests. -func ComputeManifests(idx v1.ImageIndex) ([]Describable, error) { - m, err := idx.IndexManifest() - if err != nil { - return nil, err - } - manifests := []Describable{} - for _, desc := range m.Manifests { - switch { - case desc.MediaType.IsImage(): - img, err := idx.Image(desc.Digest) - if err != nil { - return nil, err - } - manifests = append(manifests, img) - case desc.MediaType.IsIndex(): - idx, err := idx.ImageIndex(desc.Digest) - if err != nil { - return nil, err - } - manifests = append(manifests, idx) - default: - if wl, ok := idx.(withLayer); ok { - layer, err := wl.Layer(desc.Digest) - if err != nil { - return nil, err - } - manifests = append(manifests, layer) - } else { - manifests = append(manifests, describable{desc}) - } - } - } - - return manifests, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.go b/vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.go deleted file mode 100644 index df20d3aa..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/uncompressed.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 partial - -import ( - "bytes" - "io" - "sync" - - "github.com/google/go-containerregistry/internal/gzip" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// UncompressedLayer represents the bare minimum interface a natively -// uncompressed layer must implement for us to produce a v1.Layer -type UncompressedLayer interface { - // DiffID returns the Hash of the uncompressed layer. - DiffID() (v1.Hash, error) - - // Uncompressed returns an io.ReadCloser for the uncompressed layer contents. - Uncompressed() (io.ReadCloser, error) - - // Returns the mediaType for the compressed Layer - MediaType() (types.MediaType, error) -} - -// uncompressedLayerExtender implements v1.Image using the uncompressed base properties. -type uncompressedLayerExtender struct { - UncompressedLayer - // Memoize size/hash so that the methods aren't twice as - // expensive as doing this manually. - hash v1.Hash - size int64 - hashSizeError error - once sync.Once -} - -// Compressed implements v1.Layer -func (ule *uncompressedLayerExtender) Compressed() (io.ReadCloser, error) { - u, err := ule.Uncompressed() - if err != nil { - return nil, err - } - return gzip.ReadCloser(u), nil -} - -// Digest implements v1.Layer -func (ule *uncompressedLayerExtender) Digest() (v1.Hash, error) { - ule.calcSizeHash() - return ule.hash, ule.hashSizeError -} - -// Size implements v1.Layer -func (ule *uncompressedLayerExtender) Size() (int64, error) { - ule.calcSizeHash() - return ule.size, ule.hashSizeError -} - -func (ule *uncompressedLayerExtender) calcSizeHash() { - ule.once.Do(func() { - var r io.ReadCloser - r, ule.hashSizeError = ule.Compressed() - if ule.hashSizeError != nil { - return - } - defer r.Close() - ule.hash, ule.size, ule.hashSizeError = v1.SHA256(r) - }) -} - -// UncompressedToLayer fills in the missing methods from an UncompressedLayer so that it implements v1.Layer -func UncompressedToLayer(ul UncompressedLayer) (v1.Layer, error) { - return &uncompressedLayerExtender{UncompressedLayer: ul}, nil -} - -// UncompressedImageCore represents the bare minimum interface a natively -// uncompressed image must implement for us to produce a v1.Image -type UncompressedImageCore interface { - ImageCore - - // LayerByDiffID is a variation on the v1.Image method, which returns - // an UncompressedLayer instead. - LayerByDiffID(v1.Hash) (UncompressedLayer, error) -} - -// UncompressedToImage fills in the missing methods from an UncompressedImageCore so that it implements v1.Image. -func UncompressedToImage(uic UncompressedImageCore) (v1.Image, error) { - return &uncompressedImageExtender{ - UncompressedImageCore: uic, - }, nil -} - -// uncompressedImageExtender implements v1.Image by extending UncompressedImageCore with the -// appropriate methods computed from the minimal core. -type uncompressedImageExtender struct { - UncompressedImageCore - - lock sync.Mutex - manifest *v1.Manifest -} - -// Assert that our extender type completes the v1.Image interface -var _ v1.Image = (*uncompressedImageExtender)(nil) - -// Digest implements v1.Image -func (i *uncompressedImageExtender) Digest() (v1.Hash, error) { - return Digest(i) -} - -// Manifest implements v1.Image -func (i *uncompressedImageExtender) Manifest() (*v1.Manifest, error) { - i.lock.Lock() - defer i.lock.Unlock() - if i.manifest != nil { - return i.manifest, nil - } - - b, err := i.RawConfigFile() - if err != nil { - return nil, err - } - - cfgHash, cfgSize, err := v1.SHA256(bytes.NewReader(b)) - if err != nil { - return nil, err - } - - m := &v1.Manifest{ - SchemaVersion: 2, - MediaType: types.DockerManifestSchema2, - Config: v1.Descriptor{ - MediaType: types.DockerConfigJSON, - Size: cfgSize, - Digest: cfgHash, - }, - } - - ls, err := i.Layers() - if err != nil { - return nil, err - } - - m.Layers = make([]v1.Descriptor, len(ls)) - for i, l := range ls { - desc, err := Descriptor(l) - if err != nil { - return nil, err - } - - m.Layers[i] = *desc - } - - i.manifest = m - return i.manifest, nil -} - -// RawManifest implements v1.Image -func (i *uncompressedImageExtender) RawManifest() ([]byte, error) { - return RawManifest(i) -} - -// Size implements v1.Image -func (i *uncompressedImageExtender) Size() (int64, error) { - return Size(i) -} - -// ConfigName implements v1.Image -func (i *uncompressedImageExtender) ConfigName() (v1.Hash, error) { - return ConfigName(i) -} - -// ConfigFile implements v1.Image -func (i *uncompressedImageExtender) ConfigFile() (*v1.ConfigFile, error) { - return ConfigFile(i) -} - -// Layers implements v1.Image -func (i *uncompressedImageExtender) Layers() ([]v1.Layer, error) { - diffIDs, err := DiffIDs(i) - if err != nil { - return nil, err - } - ls := make([]v1.Layer, 0, len(diffIDs)) - for _, h := range diffIDs { - l, err := i.LayerByDiffID(h) - if err != nil { - return nil, err - } - ls = append(ls, l) - } - return ls, nil -} - -// LayerByDiffID implements v1.Image -func (i *uncompressedImageExtender) LayerByDiffID(diffID v1.Hash) (v1.Layer, error) { - ul, err := i.UncompressedImageCore.LayerByDiffID(diffID) - if err != nil { - return nil, err - } - return UncompressedToLayer(ul) -} - -// LayerByDigest implements v1.Image -func (i *uncompressedImageExtender) LayerByDigest(h v1.Hash) (v1.Layer, error) { - diffID, err := BlobToDiffID(i, h) - if err != nil { - return nil, err - } - return i.LayerByDiffID(diffID) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.go b/vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.go deleted file mode 100644 index c8b22b3f..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/partial/with.go +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 partial - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// WithRawConfigFile defines the subset of v1.Image used by these helper methods -type WithRawConfigFile interface { - // RawConfigFile returns the serialized bytes of this image's config file. - RawConfigFile() ([]byte, error) -} - -// ConfigFile is a helper for implementing v1.Image -func ConfigFile(i WithRawConfigFile) (*v1.ConfigFile, error) { - b, err := i.RawConfigFile() - if err != nil { - return nil, err - } - return v1.ParseConfigFile(bytes.NewReader(b)) -} - -// ConfigName is a helper for implementing v1.Image -func ConfigName(i WithRawConfigFile) (v1.Hash, error) { - b, err := i.RawConfigFile() - if err != nil { - return v1.Hash{}, err - } - h, _, err := v1.SHA256(bytes.NewReader(b)) - return h, err -} - -type configLayer struct { - hash v1.Hash - content []byte -} - -// Digest implements v1.Layer -func (cl *configLayer) Digest() (v1.Hash, error) { - return cl.hash, nil -} - -// DiffID implements v1.Layer -func (cl *configLayer) DiffID() (v1.Hash, error) { - return cl.hash, nil -} - -// Uncompressed implements v1.Layer -func (cl *configLayer) Uncompressed() (io.ReadCloser, error) { - return io.NopCloser(bytes.NewBuffer(cl.content)), nil -} - -// Compressed implements v1.Layer -func (cl *configLayer) Compressed() (io.ReadCloser, error) { - return io.NopCloser(bytes.NewBuffer(cl.content)), nil -} - -// Size implements v1.Layer -func (cl *configLayer) Size() (int64, error) { - return int64(len(cl.content)), nil -} - -func (cl *configLayer) MediaType() (types.MediaType, error) { - // Defaulting this to OCIConfigJSON as it should remain - // backwards compatible with DockerConfigJSON - return types.OCIConfigJSON, nil -} - -var _ v1.Layer = (*configLayer)(nil) - -// withConfigLayer allows partial image implementations to provide a layer -// for their config file. -type withConfigLayer interface { - ConfigLayer() (v1.Layer, error) -} - -// ConfigLayer implements v1.Layer from the raw config bytes. -// This is so that clients (e.g. remote) can access the config as a blob. -// -// Images that want to return a specific layer implementation can implement -// withConfigLayer. -func ConfigLayer(i WithRawConfigFile) (v1.Layer, error) { - if wcl, ok := unwrap(i).(withConfigLayer); ok { - return wcl.ConfigLayer() - } - - h, err := ConfigName(i) - if err != nil { - return nil, err - } - rcfg, err := i.RawConfigFile() - if err != nil { - return nil, err - } - return &configLayer{ - hash: h, - content: rcfg, - }, nil -} - -// WithConfigFile defines the subset of v1.Image used by these helper methods -type WithConfigFile interface { - // ConfigFile returns this image's config file. - ConfigFile() (*v1.ConfigFile, error) -} - -// DiffIDs is a helper for implementing v1.Image -func DiffIDs(i WithConfigFile) ([]v1.Hash, error) { - cfg, err := i.ConfigFile() - if err != nil { - return nil, err - } - return cfg.RootFS.DiffIDs, nil -} - -// RawConfigFile is a helper for implementing v1.Image -func RawConfigFile(i WithConfigFile) ([]byte, error) { - cfg, err := i.ConfigFile() - if err != nil { - return nil, err - } - return json.Marshal(cfg) -} - -// WithRawManifest defines the subset of v1.Image used by these helper methods -type WithRawManifest interface { - // RawManifest returns the serialized bytes of this image's config file. - RawManifest() ([]byte, error) -} - -// Digest is a helper for implementing v1.Image -func Digest(i WithRawManifest) (v1.Hash, error) { - mb, err := i.RawManifest() - if err != nil { - return v1.Hash{}, err - } - digest, _, err := v1.SHA256(bytes.NewReader(mb)) - return digest, err -} - -// Manifest is a helper for implementing v1.Image -func Manifest(i WithRawManifest) (*v1.Manifest, error) { - b, err := i.RawManifest() - if err != nil { - return nil, err - } - return v1.ParseManifest(bytes.NewReader(b)) -} - -// WithManifest defines the subset of v1.Image used by these helper methods -type WithManifest interface { - // Manifest returns this image's Manifest object. - Manifest() (*v1.Manifest, error) -} - -// RawManifest is a helper for implementing v1.Image -func RawManifest(i WithManifest) ([]byte, error) { - m, err := i.Manifest() - if err != nil { - return nil, err - } - return json.Marshal(m) -} - -// Size is a helper for implementing v1.Image -func Size(i WithRawManifest) (int64, error) { - b, err := i.RawManifest() - if err != nil { - return -1, err - } - return int64(len(b)), nil -} - -// FSLayers is a helper for implementing v1.Image -func FSLayers(i WithManifest) ([]v1.Hash, error) { - m, err := i.Manifest() - if err != nil { - return nil, err - } - fsl := make([]v1.Hash, len(m.Layers)) - for i, l := range m.Layers { - fsl[i] = l.Digest - } - return fsl, nil -} - -// BlobSize is a helper for implementing v1.Image -func BlobSize(i WithManifest, h v1.Hash) (int64, error) { - d, err := BlobDescriptor(i, h) - if err != nil { - return -1, err - } - return d.Size, nil -} - -// BlobDescriptor is a helper for implementing v1.Image -func BlobDescriptor(i WithManifest, h v1.Hash) (*v1.Descriptor, error) { - m, err := i.Manifest() - if err != nil { - return nil, err - } - - if m.Config.Digest == h { - return &m.Config, nil - } - - for _, l := range m.Layers { - if l.Digest == h { - return &l, nil - } - } - return nil, fmt.Errorf("blob %v not found", h) -} - -// WithManifestAndConfigFile defines the subset of v1.Image used by these helper methods -type WithManifestAndConfigFile interface { - WithConfigFile - - // Manifest returns this image's Manifest object. - Manifest() (*v1.Manifest, error) -} - -// BlobToDiffID is a helper for mapping between compressed -// and uncompressed blob hashes. -func BlobToDiffID(i WithManifestAndConfigFile, h v1.Hash) (v1.Hash, error) { - blobs, err := FSLayers(i) - if err != nil { - return v1.Hash{}, err - } - diffIDs, err := DiffIDs(i) - if err != nil { - return v1.Hash{}, err - } - if len(blobs) != len(diffIDs) { - return v1.Hash{}, fmt.Errorf("mismatched fs layers (%d) and diff ids (%d)", len(blobs), len(diffIDs)) - } - for i, blob := range blobs { - if blob == h { - return diffIDs[i], nil - } - } - return v1.Hash{}, fmt.Errorf("unknown blob %v", h) -} - -// DiffIDToBlob is a helper for mapping between uncompressed -// and compressed blob hashes. -func DiffIDToBlob(wm WithManifestAndConfigFile, h v1.Hash) (v1.Hash, error) { - blobs, err := FSLayers(wm) - if err != nil { - return v1.Hash{}, err - } - diffIDs, err := DiffIDs(wm) - if err != nil { - return v1.Hash{}, err - } - if len(blobs) != len(diffIDs) { - return v1.Hash{}, fmt.Errorf("mismatched fs layers (%d) and diff ids (%d)", len(blobs), len(diffIDs)) - } - for i, diffID := range diffIDs { - if diffID == h { - return blobs[i], nil - } - } - return v1.Hash{}, fmt.Errorf("unknown diffID %v", h) -} - -// WithDiffID defines the subset of v1.Layer for exposing the DiffID method. -type WithDiffID interface { - DiffID() (v1.Hash, error) -} - -// withDescriptor allows partial layer implementations to provide a layer -// descriptor to the partial image manifest builder. This allows partial -// uncompressed layers to provide foreign layer metadata like URLs to the -// uncompressed image manifest. -type withDescriptor interface { - Descriptor() (*v1.Descriptor, error) -} - -// Describable represents something for which we can produce a v1.Descriptor. -type Describable interface { - Digest() (v1.Hash, error) - MediaType() (types.MediaType, error) - Size() (int64, error) -} - -// Descriptor returns a v1.Descriptor given a Describable. It also encodes -// some logic for unwrapping things that have been wrapped by -// CompressedToLayer, UncompressedToLayer, CompressedToImage, or -// UncompressedToImage. -func Descriptor(d Describable) (*v1.Descriptor, error) { - // If Describable implements Descriptor itself, return that. - if wd, ok := unwrap(d).(withDescriptor); ok { - return wd.Descriptor() - } - - // If all else fails, compute the descriptor from the individual methods. - var ( - desc v1.Descriptor - err error - ) - - if desc.Size, err = d.Size(); err != nil { - return nil, err - } - if desc.Digest, err = d.Digest(); err != nil { - return nil, err - } - if desc.MediaType, err = d.MediaType(); err != nil { - return nil, err - } - if wat, ok := d.(withArtifactType); ok { - if desc.ArtifactType, err = wat.ArtifactType(); err != nil { - return nil, err - } - } else { - if wrm, ok := d.(WithRawManifest); ok && desc.MediaType.IsImage() { - mf, _ := Manifest(wrm) - // Failing to parse as a manifest should just be ignored. - // The manifest might not be valid, and that's okay. - if mf != nil && !mf.Config.MediaType.IsConfig() { - desc.ArtifactType = string(mf.Config.MediaType) - } - } - } - - return &desc, nil -} - -type withArtifactType interface { - ArtifactType() (string, error) -} - -type withUncompressedSize interface { - UncompressedSize() (int64, error) -} - -// UncompressedSize returns the size of the Uncompressed layer. If the -// underlying implementation doesn't implement UncompressedSize directly, -// this will compute the uncompressedSize by reading everything returned -// by Compressed(). This is potentially expensive and may consume the contents -// for streaming layers. -func UncompressedSize(l v1.Layer) (int64, error) { - // If the layer implements UncompressedSize itself, return that. - if wus, ok := unwrap(l).(withUncompressedSize); ok { - return wus.UncompressedSize() - } - - // The layer doesn't implement UncompressedSize, we need to compute it. - rc, err := l.Uncompressed() - if err != nil { - return -1, err - } - defer rc.Close() - - return io.Copy(io.Discard, rc) -} - -type withExists interface { - Exists() (bool, error) -} - -// Exists checks to see if a layer exists. This is a hack to work around the -// mistakes of the partial package. Don't use this. -func Exists(l v1.Layer) (bool, error) { - // If the layer implements Exists itself, return that. - if we, ok := unwrap(l).(withExists); ok { - return we.Exists() - } - - // The layer doesn't implement Exists, so we hope that calling Compressed() - // is enough to trigger an error if the layer does not exist. - rc, err := l.Compressed() - if err != nil { - return false, err - } - defer rc.Close() - - // We may want to try actually reading a single byte, but if we need to do - // that, we should just fix this hack. - return true, nil -} - -// Recursively unwrap our wrappers so that we can check for the original implementation. -// We might want to expose this? -func unwrap(i any) any { - if ule, ok := i.(*uncompressedLayerExtender); ok { - return unwrap(ule.UncompressedLayer) - } - if cle, ok := i.(*compressedLayerExtender); ok { - return unwrap(cle.CompressedLayer) - } - if uie, ok := i.(*uncompressedImageExtender); ok { - return unwrap(uie.UncompressedImageCore) - } - if cie, ok := i.(*compressedImageExtender); ok { - return unwrap(cie.CompressedImageCore) - } - return i -} - -// ArtifactType returns the artifact type for the given manifest. -// -// If the manifest reports its own artifact type, that's returned, otherwise -// the manifest is parsed and, if successful, its config.mediaType is returned. -func ArtifactType(w WithManifest) (string, error) { - if wat, ok := w.(withArtifactType); ok { - return wat.ArtifactType() - } - mf, _ := w.Manifest() - // Failing to parse as a manifest should just be ignored. - // The manifest might not be valid, and that's okay. - if mf != nil && !mf.Config.MediaType.IsConfig() { - return string(mf.Config.MediaType), nil - } - return "", nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/platform.go b/vendor/github.com/google/go-containerregistry/pkg/v1/platform.go deleted file mode 100644 index 59ca4026..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/platform.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 v1 - -import ( - "fmt" - "sort" - "strings" -) - -// Platform represents the target os/arch for an image. -type Platform struct { - Architecture string `json:"architecture"` - OS string `json:"os"` - OSVersion string `json:"os.version,omitempty"` - OSFeatures []string `json:"os.features,omitempty"` - Variant string `json:"variant,omitempty"` - Features []string `json:"features,omitempty"` -} - -func (p Platform) String() string { - if p.OS == "" { - return "" - } - var b strings.Builder - b.WriteString(p.OS) - if p.Architecture != "" { - b.WriteString("/") - b.WriteString(p.Architecture) - } - if p.Variant != "" { - b.WriteString("/") - b.WriteString(p.Variant) - } - if p.OSVersion != "" { - b.WriteString(":") - b.WriteString(p.OSVersion) - } - return b.String() -} - -// ParsePlatform parses a string representing a Platform, if possible. -func ParsePlatform(s string) (*Platform, error) { - var p Platform - parts := strings.Split(strings.TrimSpace(s), ":") - if len(parts) == 2 { - p.OSVersion = parts[1] - } - parts = strings.Split(parts[0], "/") - if len(parts) > 0 { - p.OS = parts[0] - } - if len(parts) > 1 { - p.Architecture = parts[1] - } - if len(parts) > 2 { - p.Variant = parts[2] - } - if len(parts) > 3 { - return nil, fmt.Errorf("too many slashes in platform spec: %s", s) - } - return &p, nil -} - -// Equals returns true if the given platform is semantically equivalent to this one. -// The order of Features and OSFeatures is not important. -func (p Platform) Equals(o Platform) bool { - return p.OS == o.OS && - p.Architecture == o.Architecture && - p.Variant == o.Variant && - p.OSVersion == o.OSVersion && - stringSliceEqualIgnoreOrder(p.OSFeatures, o.OSFeatures) && - stringSliceEqualIgnoreOrder(p.Features, o.Features) -} - -// Satisfies returns true if this Platform "satisfies" the given spec Platform. -// -// Note that this is different from Equals and that Satisfies is not reflexive. -// -// The given spec represents "requirements" such that any missing values in the -// spec are not compared. -// -// For OSFeatures and Features, Satisfies will return true if this Platform's -// fields contain a superset of the values in the spec's fields (order ignored). -func (p Platform) Satisfies(spec Platform) bool { - return satisfies(spec.OS, p.OS) && - satisfies(spec.Architecture, p.Architecture) && - satisfies(spec.Variant, p.Variant) && - satisfies(spec.OSVersion, p.OSVersion) && - satisfiesList(spec.OSFeatures, p.OSFeatures) && - satisfiesList(spec.Features, p.Features) -} - -func satisfies(want, have string) bool { - return want == "" || want == have -} - -func satisfiesList(want, have []string) bool { - if len(want) == 0 { - return true - } - - set := map[string]struct{}{} - for _, h := range have { - set[h] = struct{}{} - } - - for _, w := range want { - if _, ok := set[w]; !ok { - return false - } - } - - return true -} - -// stringSliceEqual compares 2 string slices and returns if their contents are identical. -func stringSliceEqual(a, b []string) bool { - if len(a) != len(b) { - return false - } - for i, elm := range a { - if elm != b[i] { - return false - } - } - return true -} - -// stringSliceEqualIgnoreOrder compares 2 string slices and returns if their contents are identical, ignoring order -func stringSliceEqualIgnoreOrder(a, b []string) bool { - if a != nil && b != nil { - sort.Strings(a) - sort.Strings(b) - } - return stringSliceEqual(a, b) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/progress.go b/vendor/github.com/google/go-containerregistry/pkg/v1/progress.go deleted file mode 100644 index 844f04d9..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/progress.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 v1 - -// Update representation of an update of transfer progress. Some functions -// in this module can take a channel to which updates will be sent while a -// transfer is in progress. -// +k8s:deepcopy-gen=false -type Update struct { - Total int64 - Complete int64 - Error error -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.md deleted file mode 100644 index c1e81b31..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# `remote` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/remote?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/remote) - -The `remote` package implements a client for accessing a registry, -per the [OCI distribution spec](https://github.com/opencontainers/distribution-spec/blob/master/spec.md). - -It leans heavily on the lower level [`transport`](/pkg/v1/remote/transport) package, which handles the -authentication handshake and structured errors. - -## Usage - -```go -package main - -import ( - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -func main() { - ref, err := name.ParseReference("gcr.io/google-containers/pause") - if err != nil { - panic(err) - } - - img, err := remote.Image(ref, remote.WithAuthFromKeychain(authn.DefaultKeychain)) - if err != nil { - panic(err) - } - - // do stuff with img -} -``` - -## Structure - -

- -

- - -## Background - -There are a lot of confusingly similar terms that come up when talking about images in registries. - -### Anatomy of an image - -In general... - -* A tag refers to an image manifest. -* An image manifest references a config file and an orderered list of _compressed_ layers by sha256 digest. -* A config file references an ordered list of _uncompressed_ layers by sha256 digest and contains runtime configuration. -* The sha256 digest of the config file is the [image id](https://github.com/opencontainers/image-spec/blob/master/config.md#imageid) for the image. - -For example, an image with two layers would look something like this: - -![image anatomy](/images/image-anatomy.dot.svg) - -### Anatomy of an index - -In the normal case, an [index](https://github.com/opencontainers/image-spec/blob/master/image-index.md) is used to represent a multi-platform image. -This was the original use case for a [manifest -list](https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list). - -![image index anatomy](/images/index-anatomy.dot.svg) - -It is possible for an index to reference another index, per the OCI -[image-spec](https://github.com/opencontainers/image-spec/blob/master/media-types.md#compatibility-matrix). -In theory, both an image and image index can reference arbitrary things via -[descriptors](https://github.com/opencontainers/image-spec/blob/master/descriptor.md), -e.g. see the [image layout -example](https://github.com/opencontainers/image-spec/blob/master/image-layout.md#index-example), -which references an application/xml file from an image index. - -That could look something like this: - -![strange image index anatomy](/images/index-anatomy-strange.dot.svg) - -Using a recursive index like this might not be possible with all registries, -but this flexibility allows for some interesting applications, e.g. the -[OCI Artifacts](https://github.com/opencontainers/artifacts) effort. - -### Anatomy of an image upload - -The structure of an image requires a delicate ordering when uploading an image to a registry. -Below is a (slightly simplified) figure that describes how an image is prepared for upload -to a registry and how the data flows between various artifacts: - -![upload](/images/upload.dot.svg) - -Note that: - -* A config file references the uncompressed layer contents by sha256. -* A manifest references the compressed layer contents by sha256 and the size of the layer. -* A manifest references the config file contents by sha256 and the size of the file. - -It follows that during an upload, we need to upload layers before the config file, -and we need to upload the config file before the manifest. - -Sometimes, we know all of this information ahead of time, (e.g. when copying from remote.Image), -so the ordering is less important. - -In other cases, e.g. when using a [`stream.Layer`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/stream#Layer), -we can't compute anything until we have already uploaded the layer, so we need to be careful about ordering. - -## Caveats - -### schema 1 - -This package does not support schema 1 images, see [`#377`](https://github.com/google/go-containerregistry/issues/377), -however, it's possible to do _something_ useful with them via [`remote.Get`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/remote#Get), -which doesn't try to interpret what is returned by the registry. - -[`crane.Copy`](https://godoc.org/github.com/google/go-containerregistry/pkg/crane#Copy) takes advantage of this to implement support for copying schema 1 images, -see [here](https://github.com/google/go-containerregistry/blob/main/pkg/internal/legacy/copy.go). diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.go deleted file mode 100644 index a0281b9f..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/catalog.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "net/url" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" -) - -type Catalogs struct { - Repos []string `json:"repositories"` - Next string `json:"next,omitempty"` -} - -// CatalogPage calls /_catalog, returning the list of repositories on the registry. -func CatalogPage(target name.Registry, last string, n int, options ...Option) ([]string, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - - f, err := newPuller(o).fetcher(o.context, target) - if err != nil { - return nil, err - } - - uri := url.URL{ - Scheme: target.Scheme(), - Host: target.RegistryStr(), - Path: "/v2/_catalog", - RawQuery: fmt.Sprintf("last=%s&n=%d", url.QueryEscape(last), n), - } - - req, err := http.NewRequest(http.MethodGet, uri.String(), nil) - if err != nil { - return nil, err - } - resp, err := f.client.Do(req.WithContext(o.context)) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - return nil, err - } - - var parsed Catalogs - if err := json.NewDecoder(resp.Body).Decode(&parsed); err != nil { - return nil, err - } - - return parsed.Repos, nil -} - -// Catalog calls /_catalog, returning the list of repositories on the registry. -func Catalog(ctx context.Context, target name.Registry, options ...Option) ([]string, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - - // WithContext overrides the ctx passed directly. - if o.context != context.Background() { - ctx = o.context - } - - return newPuller(o).catalog(ctx, target, o.pageSize) -} - -func (f *fetcher) catalogPage(ctx context.Context, reg name.Registry, next string, pageSize int) (*Catalogs, error) { - if next == "" { - uri := &url.URL{ - Scheme: reg.Scheme(), - Host: reg.RegistryStr(), - Path: "/v2/_catalog", - } - if pageSize > 0 { - uri.RawQuery = fmt.Sprintf("n=%d", pageSize) - } - next = uri.String() - } - - req, err := http.NewRequestWithContext(ctx, "GET", next, nil) - if err != nil { - return nil, err - } - - resp, err := f.client.Do(req) - if err != nil { - return nil, err - } - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - return nil, err - } - - parsed := Catalogs{} - if err := json.NewDecoder(resp.Body).Decode(&parsed); err != nil { - return nil, err - } - - if err := resp.Body.Close(); err != nil { - return nil, err - } - - uri, err := getNextPageURL(resp) - if err != nil { - return nil, err - } - - if uri != nil { - parsed.Next = uri.String() - } - - return &parsed, nil -} - -type Catalogger struct { - f *fetcher - reg name.Registry - pageSize int - - page *Catalogs - err error - - needMore bool -} - -func (l *Catalogger) Next(ctx context.Context) (*Catalogs, error) { - if l.needMore { - l.page, l.err = l.f.catalogPage(ctx, l.reg, l.page.Next, l.pageSize) - } else { - l.needMore = true - } - return l.page, l.err -} - -func (l *Catalogger) HasNext() bool { - return l.page != nil && (!l.needMore || l.page.Next != "") -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.go deleted file mode 100644 index b4395c23..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/check.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "context" - "fmt" - "net/http" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" -) - -// CheckPushPermission returns an error if the given keychain cannot authorize -// a push operation to the given ref. -// -// This can be useful to check whether the caller has permission to push an -// image before doing work to construct the image. -// -// TODO(#412): Remove the need for this method. -func CheckPushPermission(ref name.Reference, kc authn.Keychain, t http.RoundTripper) error { - auth, err := kc.Resolve(ref.Context().Registry) - if err != nil { - return fmt.Errorf("resolving authorization for %v failed: %w", ref.Context().Registry, err) - } - - scopes := []string{ref.Scope(transport.PushScope)} - tr, err := transport.NewWithContext(context.TODO(), ref.Context().Registry, auth, t, scopes) - if err != nil { - return fmt.Errorf("creating push check transport for %v failed: %w", ref.Context().Registry, err) - } - // TODO(jasonhall): Against GCR, just doing the token handshake is - // enough, but this doesn't extend to Dockerhub - // (https://github.com/docker/hub-feedback/issues/1771), so we actually - // need to initiate an upload to tell whether the credentials can - // authorize a push. Figure out how to return early here when we can, - // to avoid a roundtrip for spec-compliant registries. - w := writer{ - repo: ref.Context(), - client: &http.Client{Transport: tr}, - } - loc, _, err := w.initiateUpload(context.Background(), "", "", "") - if loc != "" { - // Since we're only initiating the upload to check whether we - // can, we should attempt to cancel it, in case initiating - // reserves some resources on the server. We shouldn't wait for - // cancelling to complete, and we don't care if it fails. - go w.cancelUpload(loc) - } - return err -} - -func (w *writer) cancelUpload(loc string) { - req, err := http.NewRequest(http.MethodDelete, loc, nil) - if err != nil { - return - } - _, _ = w.client.Do(req) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.go deleted file mode 100644 index 36e1d081..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/delete.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "github.com/google/go-containerregistry/pkg/name" -) - -// Delete removes the specified image reference from the remote registry. -func Delete(ref name.Reference, options ...Option) error { - o, err := makeOptions(options...) - if err != nil { - return err - } - return newPusher(o).Delete(o.context, ref) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.go deleted file mode 100644 index fafe910e..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/descriptor.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "context" - "errors" - "fmt" - - "github.com/google/go-containerregistry/pkg/logs" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -var allManifestMediaTypes = append(append([]types.MediaType{ - types.DockerManifestSchema1, - types.DockerManifestSchema1Signed, -}, acceptableImageMediaTypes...), acceptableIndexMediaTypes...) - -// ErrSchema1 indicates that we received a schema1 manifest from the registry. -// This library doesn't have plans to support this legacy image format: -// https://github.com/google/go-containerregistry/issues/377 -var ErrSchema1 = errors.New("see https://github.com/google/go-containerregistry/issues/377") - -// newErrSchema1 returns an ErrSchema1 with the unexpected MediaType. -func newErrSchema1(schema types.MediaType) error { - return fmt.Errorf("unsupported MediaType: %q, %w", schema, ErrSchema1) -} - -// Descriptor provides access to metadata about remote artifact and accessors -// for efficiently converting it into a v1.Image or v1.ImageIndex. -type Descriptor struct { - fetcher fetcher - v1.Descriptor - - ref name.Reference - Manifest []byte - ctx context.Context - - // So we can share this implementation with Image. - platform v1.Platform -} - -func (d *Descriptor) toDesc() v1.Descriptor { - return d.Descriptor -} - -// RawManifest exists to satisfy the Taggable interface. -func (d *Descriptor) RawManifest() ([]byte, error) { - return d.Manifest, nil -} - -// Get returns a remote.Descriptor for the given reference. The response from -// the registry is left un-interpreted, for the most part. This is useful for -// querying what kind of artifact a reference represents. -// -// See Head if you don't need the response body. -func Get(ref name.Reference, options ...Option) (*Descriptor, error) { - return get(ref, allManifestMediaTypes, options...) -} - -// Head returns a v1.Descriptor for the given reference by issuing a HEAD -// request. -// -// Note that the server response will not have a body, so any errors encountered -// should be retried with Get to get more details. -func Head(ref name.Reference, options ...Option) (*v1.Descriptor, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - - return newPuller(o).Head(o.context, ref) -} - -// Handle options and fetch the manifest with the acceptable MediaTypes in the -// Accept header. -func get(ref name.Reference, acceptable []types.MediaType, options ...Option) (*Descriptor, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - return newPuller(o).get(o.context, ref, acceptable, o.platform) -} - -// Image converts the Descriptor into a v1.Image. -// -// If the fetched artifact is already an image, it will just return it. -// -// If the fetched artifact is an index, it will attempt to resolve the index to -// a child image with the appropriate platform. -// -// See WithPlatform to set the desired platform. -func (d *Descriptor) Image() (v1.Image, error) { - switch d.MediaType { - case types.DockerManifestSchema1, types.DockerManifestSchema1Signed: - // We don't care to support schema 1 images: - // https://github.com/google/go-containerregistry/issues/377 - return nil, newErrSchema1(d.MediaType) - case types.OCIImageIndex, types.DockerManifestList: - // We want an image but the registry has an index, resolve it to an image. - return d.remoteIndex().imageByPlatform(d.platform) - case types.OCIManifestSchema1, types.DockerManifestSchema2: - // These are expected. Enumerated here to allow a default case. - default: - // We could just return an error here, but some registries (e.g. static - // registries) don't set the Content-Type headers correctly, so instead... - logs.Warn.Printf("Unexpected media type for Image(): %s", d.MediaType) - } - - // Wrap the v1.Layers returned by this v1.Image in a hint for downstream - // remote.Write calls to facilitate cross-repo "mounting". - imgCore, err := partial.CompressedToImage(d.remoteImage()) - if err != nil { - return nil, err - } - return &mountableImage{ - Image: imgCore, - Reference: d.ref, - }, nil -} - -// Schema1 converts the Descriptor into a v1.Image for v2 schema 1 media types. -// -// The v1.Image returned by this method does not implement the entire interface because it would be inefficient. -// This exists mostly to make it easier to copy schema 1 images around or look at their filesystems. -// This is separate from Image() to avoid a backward incompatible change for callers expecting ErrSchema1. -func (d *Descriptor) Schema1() (v1.Image, error) { - i := &schema1{ - ref: d.ref, - fetcher: d.fetcher, - ctx: d.ctx, - manifest: d.Manifest, - mediaType: d.MediaType, - descriptor: &d.Descriptor, - } - - return &mountableImage{ - Image: i, - Reference: d.ref, - }, nil -} - -// ImageIndex converts the Descriptor into a v1.ImageIndex. -func (d *Descriptor) ImageIndex() (v1.ImageIndex, error) { - switch d.MediaType { - case types.DockerManifestSchema1, types.DockerManifestSchema1Signed: - // We don't care to support schema 1 images: - // https://github.com/google/go-containerregistry/issues/377 - return nil, newErrSchema1(d.MediaType) - case types.OCIManifestSchema1, types.DockerManifestSchema2: - // We want an index but the registry has an image, nothing we can do. - return nil, fmt.Errorf("unexpected media type for ImageIndex(): %s; call Image() instead", d.MediaType) - case types.OCIImageIndex, types.DockerManifestList: - // These are expected. - default: - // We could just return an error here, but some registries (e.g. static - // registries) don't set the Content-Type headers correctly, so instead... - logs.Warn.Printf("Unexpected media type for ImageIndex(): %s", d.MediaType) - } - return d.remoteIndex(), nil -} - -func (d *Descriptor) remoteImage() *remoteImage { - return &remoteImage{ - ref: d.ref, - ctx: d.ctx, - fetcher: d.fetcher, - manifest: d.Manifest, - mediaType: d.MediaType, - descriptor: &d.Descriptor, - } -} - -func (d *Descriptor) remoteIndex() *remoteIndex { - return &remoteIndex{ - ref: d.ref, - ctx: d.ctx, - fetcher: d.fetcher, - manifest: d.Manifest, - mediaType: d.MediaType, - descriptor: &d.Descriptor, - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.go deleted file mode 100644 index 846ba07c..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote provides facilities for reading/writing v1.Images from/to -// a remote image registry. -package remote diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.go deleted file mode 100644 index 4e61002b..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/fetcher.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2023 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "bytes" - "context" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - "github.com/google/go-containerregistry/internal/redact" - "github.com/google/go-containerregistry/internal/verify" - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -const ( - kib = 1024 - mib = 1024 * kib - manifestLimit = 100 * mib -) - -// fetcher implements methods for reading from a registry. -type fetcher struct { - target resource - client *http.Client -} - -func makeFetcher(ctx context.Context, target resource, o *options) (*fetcher, error) { - auth := o.auth - if o.keychain != nil { - kauth, err := o.keychain.Resolve(target) - if err != nil { - return nil, err - } - auth = kauth - } - - reg, ok := target.(name.Registry) - if !ok { - repo, ok := target.(name.Repository) - if !ok { - return nil, fmt.Errorf("unexpected resource: %T", target) - } - reg = repo.Registry - } - - tr, err := transport.NewWithContext(ctx, reg, auth, o.transport, []string{target.Scope(transport.PullScope)}) - if err != nil { - return nil, err - } - return &fetcher{ - target: target, - client: &http.Client{Transport: tr}, - }, nil -} - -func (f *fetcher) Do(req *http.Request) (*http.Response, error) { - return f.client.Do(req) -} - -type resource interface { - Scheme() string - RegistryStr() string - Scope(string) string - - authn.Resource -} - -// url returns a url.Url for the specified path in the context of this remote image reference. -func (f *fetcher) url(resource, identifier string) url.URL { - u := url.URL{ - Scheme: f.target.Scheme(), - Host: f.target.RegistryStr(), - // Default path if this is not a repository. - Path: "/v2/_catalog", - } - if repo, ok := f.target.(name.Repository); ok { - u.Path = fmt.Sprintf("/v2/%s/%s/%s", repo.RepositoryStr(), resource, identifier) - } - return u -} - -func (f *fetcher) get(ctx context.Context, ref name.Reference, acceptable []types.MediaType, platform v1.Platform) (*Descriptor, error) { - b, desc, err := f.fetchManifest(ctx, ref, acceptable) - if err != nil { - return nil, err - } - return &Descriptor{ - ref: ref, - ctx: ctx, - fetcher: *f, - Manifest: b, - Descriptor: *desc, - platform: platform, - }, nil -} - -func (f *fetcher) fetchManifest(ctx context.Context, ref name.Reference, acceptable []types.MediaType) ([]byte, *v1.Descriptor, error) { - u := f.url("manifests", ref.Identifier()) - req, err := http.NewRequest(http.MethodGet, u.String(), nil) - if err != nil { - return nil, nil, err - } - accept := []string{} - for _, mt := range acceptable { - accept = append(accept, string(mt)) - } - req.Header.Set("Accept", strings.Join(accept, ",")) - - resp, err := f.client.Do(req.WithContext(ctx)) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - return nil, nil, err - } - - manifest, err := io.ReadAll(io.LimitReader(resp.Body, manifestLimit)) - if err != nil { - return nil, nil, err - } - - digest, size, err := v1.SHA256(bytes.NewReader(manifest)) - if err != nil { - return nil, nil, err - } - - mediaType := types.MediaType(resp.Header.Get("Content-Type")) - contentDigest, err := v1.NewHash(resp.Header.Get("Docker-Content-Digest")) - if err == nil && mediaType == types.DockerManifestSchema1Signed { - // If we can parse the digest from the header, and it's a signed schema 1 - // manifest, let's use that for the digest to appease older registries. - digest = contentDigest - } - - // Validate the digest matches what we asked for, if pulling by digest. - if dgst, ok := ref.(name.Digest); ok { - if digest.String() != dgst.DigestStr() { - return nil, nil, fmt.Errorf("manifest digest: %q does not match requested digest: %q for %q", digest, dgst.DigestStr(), ref) - } - } - - var artifactType string - mf, _ := v1.ParseManifest(bytes.NewReader(manifest)) - // Failing to parse as a manifest should just be ignored. - // The manifest might not be valid, and that's okay. - if mf != nil && !mf.Config.MediaType.IsConfig() { - artifactType = string(mf.Config.MediaType) - } - - // Do nothing for tags; I give up. - // - // We'd like to validate that the "Docker-Content-Digest" header matches what is returned by the registry, - // but so many registries implement this incorrectly that it's not worth checking. - // - // For reference: - // https://github.com/GoogleContainerTools/kaniko/issues/298 - - // Return all this info since we have to calculate it anyway. - desc := v1.Descriptor{ - Digest: digest, - Size: size, - MediaType: mediaType, - ArtifactType: artifactType, - } - - return manifest, &desc, nil -} - -func (f *fetcher) headManifest(ctx context.Context, ref name.Reference, acceptable []types.MediaType) (*v1.Descriptor, error) { - u := f.url("manifests", ref.Identifier()) - req, err := http.NewRequest(http.MethodHead, u.String(), nil) - if err != nil { - return nil, err - } - accept := []string{} - for _, mt := range acceptable { - accept = append(accept, string(mt)) - } - req.Header.Set("Accept", strings.Join(accept, ",")) - - resp, err := f.client.Do(req.WithContext(ctx)) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - return nil, err - } - - mth := resp.Header.Get("Content-Type") - if mth == "" { - return nil, fmt.Errorf("HEAD %s: response did not include Content-Type header", u.String()) - } - mediaType := types.MediaType(mth) - - size := resp.ContentLength - if size == -1 { - return nil, fmt.Errorf("GET %s: response did not include Content-Length header", u.String()) - } - - dh := resp.Header.Get("Docker-Content-Digest") - if dh == "" { - return nil, fmt.Errorf("HEAD %s: response did not include Docker-Content-Digest header", u.String()) - } - digest, err := v1.NewHash(dh) - if err != nil { - return nil, err - } - - // Validate the digest matches what we asked for, if pulling by digest. - if dgst, ok := ref.(name.Digest); ok { - if digest.String() != dgst.DigestStr() { - return nil, fmt.Errorf("manifest digest: %q does not match requested digest: %q for %q", digest, dgst.DigestStr(), ref) - } - } - - // Return all this info since we have to calculate it anyway. - return &v1.Descriptor{ - Digest: digest, - Size: size, - MediaType: mediaType, - }, nil -} - -func (f *fetcher) fetchBlob(ctx context.Context, size int64, h v1.Hash) (io.ReadCloser, error) { - u := f.url("blobs", h.String()) - req, err := http.NewRequest(http.MethodGet, u.String(), nil) - if err != nil { - return nil, err - } - - resp, err := f.client.Do(req.WithContext(ctx)) - if err != nil { - return nil, redact.Error(err) - } - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - resp.Body.Close() - return nil, err - } - - // Do whatever we can. - // If we have an expected size and Content-Length doesn't match, return an error. - // If we don't have an expected size and we do have a Content-Length, use Content-Length. - if hsize := resp.ContentLength; hsize != -1 { - if size == verify.SizeUnknown { - size = hsize - } else if hsize != size { - return nil, fmt.Errorf("GET %s: Content-Length header %d does not match expected size %d", u.String(), hsize, size) - } - } - - return verify.ReadCloser(resp.Body, size, h) -} - -func (f *fetcher) headBlob(ctx context.Context, h v1.Hash) (*http.Response, error) { - u := f.url("blobs", h.String()) - req, err := http.NewRequest(http.MethodHead, u.String(), nil) - if err != nil { - return nil, err - } - - resp, err := f.client.Do(req.WithContext(ctx)) - if err != nil { - return nil, redact.Error(err) - } - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - resp.Body.Close() - return nil, err - } - - return resp, nil -} - -func (f *fetcher) blobExists(ctx context.Context, h v1.Hash) (bool, error) { - u := f.url("blobs", h.String()) - req, err := http.NewRequest(http.MethodHead, u.String(), nil) - if err != nil { - return false, err - } - - resp, err := f.client.Do(req.WithContext(ctx)) - if err != nil { - return false, redact.Error(err) - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK, http.StatusNotFound); err != nil { - return false, err - } - - return resp.StatusCode == http.StatusOK, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.go deleted file mode 100644 index f085967e..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/image.go +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "sync" - - "github.com/google/go-containerregistry/internal/redact" - "github.com/google/go-containerregistry/internal/verify" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -var acceptableImageMediaTypes = []types.MediaType{ - types.DockerManifestSchema2, - types.OCIManifestSchema1, -} - -// remoteImage accesses an image from a remote registry -type remoteImage struct { - fetcher fetcher - ref name.Reference - ctx context.Context - manifestLock sync.Mutex // Protects manifest - manifest []byte - configLock sync.Mutex // Protects config - config []byte - mediaType types.MediaType - descriptor *v1.Descriptor -} - -func (r *remoteImage) ArtifactType() (string, error) { - // kind of a hack, but RawManifest does appropriate locking/memoization - // and makes sure r.descriptor is populated. - if _, err := r.RawManifest(); err != nil { - return "", err - } - return r.descriptor.ArtifactType, nil -} - -var _ partial.CompressedImageCore = (*remoteImage)(nil) - -// Image provides access to a remote image reference. -func Image(ref name.Reference, options ...Option) (v1.Image, error) { - desc, err := Get(ref, options...) - if err != nil { - return nil, err - } - - return desc.Image() -} - -func (r *remoteImage) MediaType() (types.MediaType, error) { - if string(r.mediaType) != "" { - return r.mediaType, nil - } - return types.DockerManifestSchema2, nil -} - -func (r *remoteImage) RawManifest() ([]byte, error) { - r.manifestLock.Lock() - defer r.manifestLock.Unlock() - if r.manifest != nil { - return r.manifest, nil - } - - // NOTE(jonjohnsonjr): We should never get here because the public entrypoints - // do type-checking via remote.Descriptor. I've left this here for tests that - // directly instantiate a remoteImage. - manifest, desc, err := r.fetcher.fetchManifest(r.ctx, r.ref, acceptableImageMediaTypes) - if err != nil { - return nil, err - } - - if r.descriptor == nil { - r.descriptor = desc - } - r.mediaType = desc.MediaType - r.manifest = manifest - return r.manifest, nil -} - -func (r *remoteImage) RawConfigFile() ([]byte, error) { - r.configLock.Lock() - defer r.configLock.Unlock() - if r.config != nil { - return r.config, nil - } - - m, err := partial.Manifest(r) - if err != nil { - return nil, err - } - - if m.Config.Data != nil { - if err := verify.Descriptor(m.Config); err != nil { - return nil, err - } - r.config = m.Config.Data - return r.config, nil - } - - body, err := r.fetcher.fetchBlob(r.ctx, m.Config.Size, m.Config.Digest) - if err != nil { - return nil, err - } - defer body.Close() - - r.config, err = io.ReadAll(body) - if err != nil { - return nil, err - } - return r.config, nil -} - -// Descriptor retains the original descriptor from an index manifest. -// See partial.Descriptor. -func (r *remoteImage) Descriptor() (*v1.Descriptor, error) { - // kind of a hack, but RawManifest does appropriate locking/memoization - // and makes sure r.descriptor is populated. - _, err := r.RawManifest() - return r.descriptor, err -} - -func (r *remoteImage) ConfigLayer() (v1.Layer, error) { - if _, err := r.RawManifest(); err != nil { - return nil, err - } - m, err := partial.Manifest(r) - if err != nil { - return nil, err - } - - return partial.CompressedToLayer(&remoteImageLayer{ - ri: r, - ctx: r.ctx, - digest: m.Config.Digest, - }) -} - -// remoteImageLayer implements partial.CompressedLayer -type remoteImageLayer struct { - ri *remoteImage - ctx context.Context - digest v1.Hash -} - -// Digest implements partial.CompressedLayer -func (rl *remoteImageLayer) Digest() (v1.Hash, error) { - return rl.digest, nil -} - -// Compressed implements partial.CompressedLayer -func (rl *remoteImageLayer) Compressed() (io.ReadCloser, error) { - urls := []url.URL{rl.ri.fetcher.url("blobs", rl.digest.String())} - - // Add alternative layer sources from URLs (usually none). - d, err := partial.BlobDescriptor(rl, rl.digest) - if err != nil { - return nil, err - } - - if d.Data != nil { - return verify.ReadCloser(io.NopCloser(bytes.NewReader(d.Data)), d.Size, d.Digest) - } - - // We don't want to log binary layers -- this can break terminals. - ctx := redact.NewContext(rl.ctx, "omitting binary blobs from logs") - - for _, s := range d.URLs { - u, err := url.Parse(s) - if err != nil { - return nil, err - } - urls = append(urls, *u) - } - - // The lastErr for most pulls will be the same (the first error), but for - // foreign layers we'll want to surface the last one, since we try to pull - // from the registry first, which would often fail. - // TODO: Maybe we don't want to try pulling from the registry first? - var lastErr error - for _, u := range urls { - req, err := http.NewRequest(http.MethodGet, u.String(), nil) - if err != nil { - return nil, err - } - - resp, err := rl.ri.fetcher.Do(req.WithContext(ctx)) - if err != nil { - lastErr = err - continue - } - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - resp.Body.Close() - lastErr = err - continue - } - - return verify.ReadCloser(resp.Body, d.Size, rl.digest) - } - - return nil, lastErr -} - -// Manifest implements partial.WithManifest so that we can use partial.BlobSize below. -func (rl *remoteImageLayer) Manifest() (*v1.Manifest, error) { - return partial.Manifest(rl.ri) -} - -// MediaType implements v1.Layer -func (rl *remoteImageLayer) MediaType() (types.MediaType, error) { - bd, err := partial.BlobDescriptor(rl, rl.digest) - if err != nil { - return "", err - } - - return bd.MediaType, nil -} - -// Size implements partial.CompressedLayer -func (rl *remoteImageLayer) Size() (int64, error) { - // Look up the size of this digest in the manifest to avoid a request. - return partial.BlobSize(rl, rl.digest) -} - -// ConfigFile implements partial.WithManifestAndConfigFile so that we can use partial.BlobToDiffID below. -func (rl *remoteImageLayer) ConfigFile() (*v1.ConfigFile, error) { - return partial.ConfigFile(rl.ri) -} - -// DiffID implements partial.WithDiffID so that we don't recompute a DiffID that we already have -// available in our ConfigFile. -func (rl *remoteImageLayer) DiffID() (v1.Hash, error) { - return partial.BlobToDiffID(rl, rl.digest) -} - -// Descriptor retains the original descriptor from an image manifest. -// See partial.Descriptor. -func (rl *remoteImageLayer) Descriptor() (*v1.Descriptor, error) { - return partial.BlobDescriptor(rl, rl.digest) -} - -// See partial.Exists. -func (rl *remoteImageLayer) Exists() (bool, error) { - return rl.ri.fetcher.blobExists(rl.ri.ctx, rl.digest) -} - -// LayerByDigest implements partial.CompressedLayer -func (r *remoteImage) LayerByDigest(h v1.Hash) (partial.CompressedLayer, error) { - return &remoteImageLayer{ - ri: r, - ctx: r.ctx, - digest: h, - }, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.go deleted file mode 100644 index b80972c8..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/index.go +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "bytes" - "context" - "fmt" - "sync" - - "github.com/google/go-containerregistry/internal/verify" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -var acceptableIndexMediaTypes = []types.MediaType{ - types.DockerManifestList, - types.OCIImageIndex, -} - -// remoteIndex accesses an index from a remote registry -type remoteIndex struct { - fetcher fetcher - ref name.Reference - ctx context.Context - manifestLock sync.Mutex // Protects manifest - manifest []byte - mediaType types.MediaType - descriptor *v1.Descriptor -} - -// Index provides access to a remote index reference. -func Index(ref name.Reference, options ...Option) (v1.ImageIndex, error) { - desc, err := get(ref, acceptableIndexMediaTypes, options...) - if err != nil { - return nil, err - } - - return desc.ImageIndex() -} - -func (r *remoteIndex) MediaType() (types.MediaType, error) { - if string(r.mediaType) != "" { - return r.mediaType, nil - } - return types.DockerManifestList, nil -} - -func (r *remoteIndex) Digest() (v1.Hash, error) { - return partial.Digest(r) -} - -func (r *remoteIndex) Size() (int64, error) { - return partial.Size(r) -} - -func (r *remoteIndex) RawManifest() ([]byte, error) { - r.manifestLock.Lock() - defer r.manifestLock.Unlock() - if r.manifest != nil { - return r.manifest, nil - } - - // NOTE(jonjohnsonjr): We should never get here because the public entrypoints - // do type-checking via remote.Descriptor. I've left this here for tests that - // directly instantiate a remoteIndex. - manifest, desc, err := r.fetcher.fetchManifest(r.ctx, r.ref, acceptableIndexMediaTypes) - if err != nil { - return nil, err - } - - if r.descriptor == nil { - r.descriptor = desc - } - r.mediaType = desc.MediaType - r.manifest = manifest - return r.manifest, nil -} - -func (r *remoteIndex) IndexManifest() (*v1.IndexManifest, error) { - b, err := r.RawManifest() - if err != nil { - return nil, err - } - return v1.ParseIndexManifest(bytes.NewReader(b)) -} - -func (r *remoteIndex) Image(h v1.Hash) (v1.Image, error) { - desc, err := r.childByHash(h) - if err != nil { - return nil, err - } - - // Descriptor.Image will handle coercing nested indexes into an Image. - return desc.Image() -} - -// Descriptor retains the original descriptor from an index manifest. -// See partial.Descriptor. -func (r *remoteIndex) Descriptor() (*v1.Descriptor, error) { - // kind of a hack, but RawManifest does appropriate locking/memoization - // and makes sure r.descriptor is populated. - _, err := r.RawManifest() - return r.descriptor, err -} - -func (r *remoteIndex) ImageIndex(h v1.Hash) (v1.ImageIndex, error) { - desc, err := r.childByHash(h) - if err != nil { - return nil, err - } - return desc.ImageIndex() -} - -// Workaround for #819. -func (r *remoteIndex) Layer(h v1.Hash) (v1.Layer, error) { - index, err := r.IndexManifest() - if err != nil { - return nil, err - } - for _, childDesc := range index.Manifests { - if h == childDesc.Digest { - l, err := partial.CompressedToLayer(&remoteLayer{ - fetcher: r.fetcher, - ctx: r.ctx, - digest: h, - }) - if err != nil { - return nil, err - } - return &MountableLayer{ - Layer: l, - Reference: r.ref.Context().Digest(h.String()), - }, nil - } - } - return nil, fmt.Errorf("layer not found: %s", h) -} - -func (r *remoteIndex) imageByPlatform(platform v1.Platform) (v1.Image, error) { - desc, err := r.childByPlatform(platform) - if err != nil { - return nil, err - } - - // Descriptor.Image will handle coercing nested indexes into an Image. - return desc.Image() -} - -// This naively matches the first manifest with matching platform attributes. -// -// We should probably use this instead: -// -// github.com/containerd/containerd/platforms -// -// But first we'd need to migrate to: -// -// github.com/opencontainers/image-spec/specs-go/v1 -func (r *remoteIndex) childByPlatform(platform v1.Platform) (*Descriptor, error) { - index, err := r.IndexManifest() - if err != nil { - return nil, err - } - for _, childDesc := range index.Manifests { - // If platform is missing from child descriptor, assume it's amd64/linux. - p := defaultPlatform - if childDesc.Platform != nil { - p = *childDesc.Platform - } - - if matchesPlatform(p, platform) { - return r.childDescriptor(childDesc, platform) - } - } - return nil, fmt.Errorf("no child with platform %+v in index %s", platform, r.ref) -} - -func (r *remoteIndex) childByHash(h v1.Hash) (*Descriptor, error) { - index, err := r.IndexManifest() - if err != nil { - return nil, err - } - for _, childDesc := range index.Manifests { - if h == childDesc.Digest { - return r.childDescriptor(childDesc, defaultPlatform) - } - } - return nil, fmt.Errorf("no child with digest %s in index %s", h, r.ref) -} - -// Convert one of this index's child's v1.Descriptor into a remote.Descriptor, with the given platform option. -func (r *remoteIndex) childDescriptor(child v1.Descriptor, platform v1.Platform) (*Descriptor, error) { - ref := r.ref.Context().Digest(child.Digest.String()) - var ( - manifest []byte - err error - ) - if child.Data != nil { - if err := verify.Descriptor(child); err != nil { - return nil, err - } - manifest = child.Data - } else { - manifest, _, err = r.fetcher.fetchManifest(r.ctx, ref, []types.MediaType{child.MediaType}) - if err != nil { - return nil, err - } - } - - if child.MediaType.IsImage() { - mf, _ := v1.ParseManifest(bytes.NewReader(manifest)) - // Failing to parse as a manifest should just be ignored. - // The manifest might not be valid, and that's okay. - if mf != nil && !mf.Config.MediaType.IsConfig() { - child.ArtifactType = string(mf.Config.MediaType) - } - } - - return &Descriptor{ - ref: ref, - ctx: r.ctx, - fetcher: r.fetcher, - Manifest: manifest, - Descriptor: child, - platform: platform, - }, nil -} - -// matchesPlatform checks if the given platform matches the required platforms. -// The given platform matches the required platform if -// - architecture and OS are identical. -// - OS version and variant are identical if provided. -// - features and OS features of the required platform are subsets of those of the given platform. -func matchesPlatform(given, required v1.Platform) bool { - // Required fields that must be identical. - if given.Architecture != required.Architecture || given.OS != required.OS { - return false - } - - // Optional fields that may be empty, but must be identical if provided. - if required.OSVersion != "" && given.OSVersion != required.OSVersion { - return false - } - if required.Variant != "" && given.Variant != required.Variant { - return false - } - - // Verify required platform's features are a subset of given platform's features. - if !isSubset(given.OSFeatures, required.OSFeatures) { - return false - } - if !isSubset(given.Features, required.Features) { - return false - } - - return true -} - -// isSubset checks if the required array of strings is a subset of the given lst. -func isSubset(lst, required []string) bool { - set := make(map[string]bool) - for _, value := range lst { - set[value] = true - } - - for _, value := range required { - if _, ok := set[value]; !ok { - return false - } - } - - return true -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.go deleted file mode 100644 index 39c20595..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/layer.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "context" - "io" - - "github.com/google/go-containerregistry/internal/redact" - "github.com/google/go-containerregistry/internal/verify" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// remoteImagelayer implements partial.CompressedLayer -type remoteLayer struct { - ctx context.Context - fetcher fetcher - digest v1.Hash -} - -// Compressed implements partial.CompressedLayer -func (rl *remoteLayer) Compressed() (io.ReadCloser, error) { - // We don't want to log binary layers -- this can break terminals. - ctx := redact.NewContext(rl.ctx, "omitting binary blobs from logs") - return rl.fetcher.fetchBlob(ctx, verify.SizeUnknown, rl.digest) -} - -// Compressed implements partial.CompressedLayer -func (rl *remoteLayer) Size() (int64, error) { - resp, err := rl.fetcher.headBlob(rl.ctx, rl.digest) - if err != nil { - return -1, err - } - defer resp.Body.Close() - return resp.ContentLength, nil -} - -// Digest implements partial.CompressedLayer -func (rl *remoteLayer) Digest() (v1.Hash, error) { - return rl.digest, nil -} - -// MediaType implements v1.Layer -func (rl *remoteLayer) MediaType() (types.MediaType, error) { - return types.DockerLayer, nil -} - -// See partial.Exists. -func (rl *remoteLayer) Exists() (bool, error) { - return rl.fetcher.blobExists(rl.ctx, rl.digest) -} - -// Layer reads the given blob reference from a registry as a Layer. A blob -// reference here is just a punned name.Digest where the digest portion is the -// digest of the blob to be read and the repository portion is the repo where -// that blob lives. -func Layer(ref name.Digest, options ...Option) (v1.Layer, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - return newPuller(o).Layer(o.context, ref) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.go deleted file mode 100644 index 910d2a94..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/list.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "net/url" - "strings" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" -) - -// ListWithContext calls List with the given context. -// -// Deprecated: Use List and WithContext. This will be removed in a future release. -func ListWithContext(ctx context.Context, repo name.Repository, options ...Option) ([]string, error) { - return List(repo, append(options, WithContext(ctx))...) -} - -// List calls /tags/list for the given repository, returning the list of tags -// in the "tags" property. -func List(repo name.Repository, options ...Option) ([]string, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - return newPuller(o).List(o.context, repo) -} - -type Tags struct { - Name string `json:"name"` - Tags []string `json:"tags"` - Next string `json:"next,omitempty"` -} - -func (f *fetcher) listPage(ctx context.Context, repo name.Repository, next string, pageSize int) (*Tags, error) { - if next == "" { - uri := &url.URL{ - Scheme: repo.Scheme(), - Host: repo.RegistryStr(), - Path: fmt.Sprintf("/v2/%s/tags/list", repo.RepositoryStr()), - } - if pageSize > 0 { - uri.RawQuery = fmt.Sprintf("n=%d", pageSize) - } - next = uri.String() - } - - req, err := http.NewRequestWithContext(ctx, "GET", next, nil) - if err != nil { - return nil, err - } - - resp, err := f.client.Do(req) - if err != nil { - return nil, err - } - - if err := transport.CheckError(resp, http.StatusOK); err != nil { - return nil, err - } - - parsed := Tags{} - if err := json.NewDecoder(resp.Body).Decode(&parsed); err != nil { - return nil, err - } - - if err := resp.Body.Close(); err != nil { - return nil, err - } - - uri, err := getNextPageURL(resp) - if err != nil { - return nil, err - } - - if uri != nil { - parsed.Next = uri.String() - } - - return &parsed, nil -} - -// getNextPageURL checks if there is a Link header in a http.Response which -// contains a link to the next page. If yes it returns the url.URL of the next -// page otherwise it returns nil. -func getNextPageURL(resp *http.Response) (*url.URL, error) { - link := resp.Header.Get("Link") - if link == "" { - return nil, nil - } - - if link[0] != '<' { - return nil, fmt.Errorf("failed to parse link header: missing '<' in: %s", link) - } - - end := strings.Index(link, ">") - if end == -1 { - return nil, fmt.Errorf("failed to parse link header: missing '>' in: %s", link) - } - link = link[1:end] - - linkURL, err := url.Parse(link) - if err != nil { - return nil, err - } - if resp.Request == nil || resp.Request.URL == nil { - return nil, nil - } - linkURL = resp.Request.URL.ResolveReference(linkURL) - return linkURL, nil -} - -type Lister struct { - f *fetcher - repo name.Repository - pageSize int - - page *Tags - err error - - needMore bool -} - -func (l *Lister) Next(ctx context.Context) (*Tags, error) { - if l.needMore { - l.page, l.err = l.f.listPage(ctx, l.repo, l.page.Next, l.pageSize) - } else { - l.needMore = true - } - return l.page, l.err -} - -func (l *Lister) HasNext() bool { - return l.page != nil && (!l.needMore || l.page.Next != "") -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.go deleted file mode 100644 index 36d08856..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/mount.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" -) - -// MountableLayer wraps a v1.Layer in a shim that enables the layer to be -// "mounted" when published to another registry. -type MountableLayer struct { - v1.Layer - - Reference name.Reference -} - -// Descriptor retains the original descriptor from an image manifest. -// See partial.Descriptor. -func (ml *MountableLayer) Descriptor() (*v1.Descriptor, error) { - return partial.Descriptor(ml.Layer) -} - -// Exists is a hack. See partial.Exists. -func (ml *MountableLayer) Exists() (bool, error) { - return partial.Exists(ml.Layer) -} - -// mountableImage wraps the v1.Layer references returned by the embedded v1.Image -// in MountableLayer's so that remote.Write might attempt to mount them from their -// source repository. -type mountableImage struct { - v1.Image - - Reference name.Reference -} - -// Layers implements v1.Image -func (mi *mountableImage) Layers() ([]v1.Layer, error) { - ls, err := mi.Image.Layers() - if err != nil { - return nil, err - } - mls := make([]v1.Layer, 0, len(ls)) - for _, l := range ls { - mls = append(mls, &MountableLayer{ - Layer: l, - Reference: mi.Reference, - }) - } - return mls, nil -} - -// LayerByDigest implements v1.Image -func (mi *mountableImage) LayerByDigest(d v1.Hash) (v1.Layer, error) { - l, err := mi.Image.LayerByDigest(d) - if err != nil { - return nil, err - } - return &MountableLayer{ - Layer: l, - Reference: mi.Reference, - }, nil -} - -// LayerByDiffID implements v1.Image -func (mi *mountableImage) LayerByDiffID(d v1.Hash) (v1.Layer, error) { - l, err := mi.Image.LayerByDiffID(d) - if err != nil { - return nil, err - } - return &MountableLayer{ - Layer: l, - Reference: mi.Reference, - }, nil -} - -// Descriptor retains the original descriptor from an index manifest. -// See partial.Descriptor. -func (mi *mountableImage) Descriptor() (*v1.Descriptor, error) { - return partial.Descriptor(mi.Image) -} - -// ConfigLayer retains the original reference so that it can be mounted. -// See partial.ConfigLayer. -func (mi *mountableImage) ConfigLayer() (v1.Layer, error) { - l, err := partial.ConfigLayer(mi.Image) - if err != nil { - return nil, err - } - return &MountableLayer{ - Layer: l, - Reference: mi.Reference, - }, nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.go deleted file mode 100644 index a6705de8..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/multi_write.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "github.com/google/go-containerregistry/pkg/name" - "golang.org/x/sync/errgroup" -) - -// MultiWrite writes the given Images or ImageIndexes to the given refs, as -// efficiently as possible, by deduping shared layer blobs while uploading them -// in parallel. -func MultiWrite(todo map[name.Reference]Taggable, options ...Option) (rerr error) { - o, err := makeOptions(options...) - if err != nil { - return err - } - if o.progress != nil { - defer func() { o.progress.Close(rerr) }() - } - p := newPusher(o) - - g, ctx := errgroup.WithContext(o.context) - g.SetLimit(o.jobs) - - for ref, t := range todo { - ref, t := ref, t - g.Go(func() error { - return p.Push(ctx, ref, t) - }) - } - - return g.Wait() -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.go deleted file mode 100644 index 99a2bb2e..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/options.go +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "context" - "errors" - "io" - "net" - "net/http" - "syscall" - "time" - - "github.com/google/go-containerregistry/internal/retry" - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/logs" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" -) - -// Option is a functional option for remote operations. -type Option func(*options) error - -type options struct { - auth authn.Authenticator - keychain authn.Keychain - transport http.RoundTripper - context context.Context - jobs int - userAgent string - allowNondistributableArtifacts bool - progress *progress - retryBackoff Backoff - retryPredicate retry.Predicate - retryStatusCodes []int - - // Only these options can overwrite Reuse()d options. - platform v1.Platform - pageSize int - filter map[string]string - - // Set by Reuse, we currently store one or the other. - puller *Puller - pusher *Pusher -} - -var defaultPlatform = v1.Platform{ - Architecture: "amd64", - OS: "linux", -} - -// Backoff is an alias of retry.Backoff to expose this configuration option to consumers of this lib -type Backoff = retry.Backoff - -var defaultRetryPredicate retry.Predicate = func(err error) bool { - // Various failure modes here, as we're often reading from and writing to - // the network. - if retry.IsTemporary(err) || errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, io.EOF) || errors.Is(err, syscall.EPIPE) || errors.Is(err, syscall.ECONNRESET) || errors.Is(err, net.ErrClosed) { - logs.Warn.Printf("retrying %v", err) - return true - } - return false -} - -// Try this three times, waiting 1s after first failure, 3s after second. -var defaultRetryBackoff = Backoff{ - Duration: 1.0 * time.Second, - Factor: 3.0, - Jitter: 0.1, - Steps: 3, -} - -// Useful for tests -var fastBackoff = Backoff{ - Duration: 1.0 * time.Millisecond, - Factor: 3.0, - Jitter: 0.1, - Steps: 3, -} - -var defaultRetryStatusCodes = []int{ - http.StatusRequestTimeout, - http.StatusInternalServerError, - http.StatusBadGateway, - http.StatusServiceUnavailable, - http.StatusGatewayTimeout, - 499, // nginx-specific, client closed request - 522, // Cloudflare-specific, connection timeout -} - -const ( - defaultJobs = 4 - - // ECR returns an error if n > 1000: - // https://github.com/google/go-containerregistry/issues/1091 - defaultPageSize = 1000 -) - -// DefaultTransport is based on http.DefaultTransport with modifications -// documented inline below. -var DefaultTransport http.RoundTripper = &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - }).DialContext, - ForceAttemptHTTP2: true, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - // We usually are dealing with 2 hosts (at most), split MaxIdleConns between them. - MaxIdleConnsPerHost: 50, -} - -func makeOptions(opts ...Option) (*options, error) { - o := &options{ - transport: DefaultTransport, - platform: defaultPlatform, - context: context.Background(), - jobs: defaultJobs, - pageSize: defaultPageSize, - retryPredicate: defaultRetryPredicate, - retryBackoff: defaultRetryBackoff, - retryStatusCodes: defaultRetryStatusCodes, - } - - for _, option := range opts { - if err := option(o); err != nil { - return nil, err - } - } - - switch { - case o.auth != nil && o.keychain != nil: - // It is a better experience to explicitly tell a caller their auth is misconfigured - // than potentially fail silently when the correct auth is overridden by option misuse. - return nil, errors.New("provide an option for either authn.Authenticator or authn.Keychain, not both") - case o.auth == nil: - o.auth = authn.Anonymous - } - - // transport.Wrapper is a signal that consumers are opt-ing into providing their own transport without any additional wrapping. - // This is to allow consumers full control over the transports logic, such as providing retry logic. - if _, ok := o.transport.(*transport.Wrapper); !ok { - // Wrap the transport in something that logs requests and responses. - // It's expensive to generate the dumps, so skip it if we're writing - // to nothing. - if logs.Enabled(logs.Debug) { - o.transport = transport.NewLogger(o.transport) - } - - // Wrap the transport in something that can retry network flakes. - o.transport = transport.NewRetry(o.transport, transport.WithRetryPredicate(defaultRetryPredicate), transport.WithRetryStatusCodes(o.retryStatusCodes...)) - - // Wrap this last to prevent transport.New from double-wrapping. - if o.userAgent != "" { - o.transport = transport.NewUserAgent(o.transport, o.userAgent) - } - } - - return o, nil -} - -// WithTransport is a functional option for overriding the default transport -// for remote operations. -// If transport.Wrapper is provided, this signals that the consumer does *not* want any further wrapping to occur. -// i.e. logging, retry and useragent -// -// The default transport is DefaultTransport. -func WithTransport(t http.RoundTripper) Option { - return func(o *options) error { - o.transport = t - return nil - } -} - -// WithAuth is a functional option for overriding the default authenticator -// for remote operations. -// It is an error to use both WithAuth and WithAuthFromKeychain in the same Option set. -// -// The default authenticator is authn.Anonymous. -func WithAuth(auth authn.Authenticator) Option { - return func(o *options) error { - o.auth = auth - return nil - } -} - -// WithAuthFromKeychain is a functional option for overriding the default -// authenticator for remote operations, using an authn.Keychain to find -// credentials. -// It is an error to use both WithAuth and WithAuthFromKeychain in the same Option set. -// -// The default authenticator is authn.Anonymous. -func WithAuthFromKeychain(keys authn.Keychain) Option { - return func(o *options) error { - o.keychain = keys - return nil - } -} - -// WithPlatform is a functional option for overriding the default platform -// that Image and Descriptor.Image use for resolving an index to an image. -// -// The default platform is amd64/linux. -func WithPlatform(p v1.Platform) Option { - return func(o *options) error { - o.platform = p - return nil - } -} - -// WithContext is a functional option for setting the context in http requests -// performed by a given function. Note that this context is used for _all_ -// http requests, not just the initial volley. E.g., for remote.Image, the -// context will be set on http requests generated by subsequent calls to -// RawConfigFile() and even methods on layers returned by Layers(). -// -// The default context is context.Background(). -func WithContext(ctx context.Context) Option { - return func(o *options) error { - o.context = ctx - return nil - } -} - -// WithJobs is a functional option for setting the parallelism of remote -// operations performed by a given function. Note that not all remote -// operations support parallelism. -// -// The default value is 4. -func WithJobs(jobs int) Option { - return func(o *options) error { - if jobs <= 0 { - return errors.New("jobs must be greater than zero") - } - o.jobs = jobs - return nil - } -} - -// WithUserAgent adds the given string to the User-Agent header for any HTTP -// requests. This header will also include "go-containerregistry/${version}". -// -// If you want to completely overwrite the User-Agent header, use WithTransport. -func WithUserAgent(ua string) Option { - return func(o *options) error { - o.userAgent = ua - return nil - } -} - -// WithNondistributable includes non-distributable (foreign) layers -// when writing images, see: -// https://github.com/opencontainers/image-spec/blob/master/layer.md#non-distributable-layers -// -// The default behaviour is to skip these layers -func WithNondistributable(o *options) error { - o.allowNondistributableArtifacts = true - return nil -} - -// WithProgress takes a channel that will receive progress updates as bytes are written. -// -// Sending updates to an unbuffered channel will block writes, so callers -// should provide a buffered channel to avoid potential deadlocks. -func WithProgress(updates chan<- v1.Update) Option { - return func(o *options) error { - o.progress = &progress{updates: updates} - o.progress.lastUpdate = &v1.Update{} - return nil - } -} - -// WithPageSize sets the given size as the value of parameter 'n' in the request. -// -// To omit the `n` parameter entirely, use WithPageSize(0). -// The default value is 1000. -func WithPageSize(size int) Option { - return func(o *options) error { - o.pageSize = size - return nil - } -} - -// WithRetryBackoff sets the httpBackoff for retry HTTP operations. -func WithRetryBackoff(backoff Backoff) Option { - return func(o *options) error { - o.retryBackoff = backoff - return nil - } -} - -// WithRetryPredicate sets the predicate for retry HTTP operations. -func WithRetryPredicate(predicate retry.Predicate) Option { - return func(o *options) error { - o.retryPredicate = predicate - return nil - } -} - -// WithRetryStatusCodes sets which http response codes will be retried. -func WithRetryStatusCodes(codes ...int) Option { - return func(o *options) error { - o.retryStatusCodes = codes - return nil - } -} - -// WithFilter sets the filter querystring for HTTP operations. -func WithFilter(key string, value string) Option { - return func(o *options) error { - if o.filter == nil { - o.filter = map[string]string{} - } - o.filter[key] = value - return nil - } -} - -// Reuse takes a Puller or Pusher and reuses it for remote interactions -// rather than starting from a clean slate. For example, it will reuse token exchanges -// when possible and avoid sending redundant HEAD requests. -// -// Reuse will take precedence over other options passed to most remote functions because -// most options deal with setting up auth and transports, which Reuse intetionally skips. -func Reuse[I *Puller | *Pusher](i I) Option { - return func(o *options) error { - if puller, ok := any(i).(*Puller); ok { - o.puller = puller - } else if pusher, ok := any(i).(*Pusher); ok { - o.pusher = pusher - } - return nil - } -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.go deleted file mode 100644 index fe60c8c3..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/progress.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2022 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "io" - "sync" - "sync/atomic" - - v1 "github.com/google/go-containerregistry/pkg/v1" -) - -type progress struct { - sync.Mutex - updates chan<- v1.Update - lastUpdate *v1.Update -} - -func (p *progress) total(delta int64) { - p.Lock() - defer p.Unlock() - atomic.AddInt64(&p.lastUpdate.Total, delta) -} - -func (p *progress) complete(delta int64) { - p.Lock() - defer p.Unlock() - p.updates <- v1.Update{ - Total: p.lastUpdate.Total, - Complete: atomic.AddInt64(&p.lastUpdate.Complete, delta), - } -} - -func (p *progress) err(err error) error { - if err != nil && p.updates != nil { - p.updates <- v1.Update{Error: err} - } - return err -} - -func (p *progress) Close(err error) { - _ = p.err(err) - close(p.updates) -} - -type progressReader struct { - rc io.ReadCloser - - count *int64 // number of bytes this reader has read, to support resetting on retry. - progress *progress -} - -func (r *progressReader) Read(b []byte) (int, error) { - n, err := r.rc.Read(b) - if err != nil { - return n, err - } - atomic.AddInt64(r.count, int64(n)) - // TODO: warn/debug log if sending takes too long, or if sending is blocked while context is canceled. - r.progress.complete(int64(n)) - return n, nil -} - -func (r *progressReader) Close() error { return r.rc.Close() } diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.go deleted file mode 100644 index 7da8017e..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/puller.go +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2023 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "context" - "sync" - - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -type Puller struct { - o *options - - // map[resource]*reader - readers sync.Map -} - -func NewPuller(options ...Option) (*Puller, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - - return newPuller(o), nil -} - -func newPuller(o *options) *Puller { - if o.puller != nil { - return o.puller - } - return &Puller{ - o: o, - } -} - -type reader struct { - // in - target resource - o *options - - // f() - once sync.Once - - // out - f *fetcher - err error -} - -// this will run once per reader instance -func (r *reader) init(ctx context.Context) error { - r.once.Do(func() { - r.f, r.err = makeFetcher(ctx, r.target, r.o) - }) - return r.err -} - -func (p *Puller) fetcher(ctx context.Context, target resource) (*fetcher, error) { - v, _ := p.readers.LoadOrStore(target, &reader{ - target: target, - o: p.o, - }) - rr := v.(*reader) - return rr.f, rr.init(ctx) -} - -// Head is like remote.Head, but avoids re-authenticating when possible. -func (p *Puller) Head(ctx context.Context, ref name.Reference) (*v1.Descriptor, error) { - f, err := p.fetcher(ctx, ref.Context()) - if err != nil { - return nil, err - } - - return f.headManifest(ctx, ref, allManifestMediaTypes) -} - -// Get is like remote.Get, but avoids re-authenticating when possible. -func (p *Puller) Get(ctx context.Context, ref name.Reference) (*Descriptor, error) { - return p.get(ctx, ref, allManifestMediaTypes, p.o.platform) -} - -func (p *Puller) get(ctx context.Context, ref name.Reference, acceptable []types.MediaType, platform v1.Platform) (*Descriptor, error) { - f, err := p.fetcher(ctx, ref.Context()) - if err != nil { - return nil, err - } - return f.get(ctx, ref, acceptable, platform) -} - -// Layer is like remote.Layer, but avoids re-authenticating when possible. -func (p *Puller) Layer(ctx context.Context, ref name.Digest) (v1.Layer, error) { - f, err := p.fetcher(ctx, ref.Context()) - if err != nil { - return nil, err - } - - h, err := v1.NewHash(ref.Identifier()) - if err != nil { - return nil, err - } - l, err := partial.CompressedToLayer(&remoteLayer{ - fetcher: *f, - ctx: ctx, - digest: h, - }) - if err != nil { - return nil, err - } - return &MountableLayer{ - Layer: l, - Reference: ref, - }, nil -} - -// List lists tags in a repo and handles pagination, returning the full list of tags. -func (p *Puller) List(ctx context.Context, repo name.Repository) ([]string, error) { - lister, err := p.Lister(ctx, repo) - if err != nil { - return nil, err - } - - tagList := []string{} - for lister.HasNext() { - tags, err := lister.Next(ctx) - if err != nil { - return nil, err - } - tagList = append(tagList, tags.Tags...) - } - - return tagList, nil -} - -// Lister lists tags in a repo and returns a Lister for paginating through the results. -func (p *Puller) Lister(ctx context.Context, repo name.Repository) (*Lister, error) { - return p.lister(ctx, repo, p.o.pageSize) -} - -func (p *Puller) lister(ctx context.Context, repo name.Repository, pageSize int) (*Lister, error) { - f, err := p.fetcher(ctx, repo) - if err != nil { - return nil, err - } - page, err := f.listPage(ctx, repo, "", pageSize) - if err != nil { - return nil, err - } - return &Lister{ - f: f, - repo: repo, - pageSize: pageSize, - page: page, - err: err, - }, nil -} - -// Catalog lists repos in a registry and handles pagination, returning the full list of repos. -func (p *Puller) Catalog(ctx context.Context, reg name.Registry) ([]string, error) { - return p.catalog(ctx, reg, p.o.pageSize) -} - -func (p *Puller) catalog(ctx context.Context, reg name.Registry, pageSize int) ([]string, error) { - catalogger, err := p.catalogger(ctx, reg, pageSize) - if err != nil { - return nil, err - } - repoList := []string{} - for catalogger.HasNext() { - repos, err := catalogger.Next(ctx) - if err != nil { - return nil, err - } - repoList = append(repoList, repos.Repos...) - } - return repoList, nil -} - -// Catalogger lists repos in a registry and returns a Catalogger for paginating through the results. -func (p *Puller) Catalogger(ctx context.Context, reg name.Registry) (*Catalogger, error) { - return p.catalogger(ctx, reg, p.o.pageSize) -} - -func (p *Puller) catalogger(ctx context.Context, reg name.Registry, pageSize int) (*Catalogger, error) { - f, err := p.fetcher(ctx, reg) - if err != nil { - return nil, err - } - page, err := f.catalogPage(ctx, reg, "", pageSize) - if err != nil { - return nil, err - } - return &Catalogger{ - f: f, - reg: reg, - pageSize: pageSize, - page: page, - err: err, - }, nil -} - -func (p *Puller) referrers(ctx context.Context, d name.Digest, filter map[string]string) (v1.ImageIndex, error) { - f, err := p.fetcher(ctx, d.Context()) - if err != nil { - return nil, err - } - return f.fetchReferrers(ctx, filter, d) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go deleted file mode 100644 index 1c07bd47..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/pusher.go +++ /dev/null @@ -1,559 +0,0 @@ -// Copyright 2023 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "bytes" - "context" - "errors" - "fmt" - "net/http" - "net/url" - "sync" - - "github.com/google/go-containerregistry/pkg/logs" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" - "github.com/google/go-containerregistry/pkg/v1/stream" - "github.com/google/go-containerregistry/pkg/v1/types" - "golang.org/x/sync/errgroup" -) - -type manifest interface { - Taggable - partial.Describable -} - -// key is either v1.Hash or v1.Layer (for stream.Layer) -type workers struct { - // map[v1.Hash|v1.Layer]*sync.Once - onces sync.Map - - // map[v1.Hash|v1.Layer]error - errors sync.Map -} - -func nop() error { - return nil -} - -func (w *workers) err(digest v1.Hash) error { - v, ok := w.errors.Load(digest) - if !ok || v == nil { - return nil - } - return v.(error) -} - -func (w *workers) Do(digest v1.Hash, f func() error) error { - // We don't care if it was loaded or not because the sync.Once will do it for us. - once, _ := w.onces.LoadOrStore(digest, &sync.Once{}) - - once.(*sync.Once).Do(func() { - w.errors.Store(digest, f()) - }) - - err := w.err(digest) - if err != nil { - // Allow this to be retried by another caller. - w.onces.Delete(digest) - } - return err -} - -func (w *workers) Stream(layer v1.Layer, f func() error) error { - // We don't care if it was loaded or not because the sync.Once will do it for us. - once, _ := w.onces.LoadOrStore(layer, &sync.Once{}) - - once.(*sync.Once).Do(func() { - w.errors.Store(layer, f()) - }) - - v, ok := w.errors.Load(layer) - if !ok || v == nil { - return nil - } - - return v.(error) -} - -type Pusher struct { - o *options - - // map[name.Repository]*repoWriter - writers sync.Map -} - -func NewPusher(options ...Option) (*Pusher, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - - return newPusher(o), nil -} - -func newPusher(o *options) *Pusher { - if o.pusher != nil { - return o.pusher - } - return &Pusher{ - o: o, - } -} - -func (p *Pusher) writer(ctx context.Context, repo name.Repository, o *options) (*repoWriter, error) { - v, _ := p.writers.LoadOrStore(repo, &repoWriter{ - repo: repo, - o: o, - }) - rw := v.(*repoWriter) - return rw, rw.init(ctx) -} - -func (p *Pusher) Push(ctx context.Context, ref name.Reference, t Taggable) error { - w, err := p.writer(ctx, ref.Context(), p.o) - if err != nil { - return err - } - return w.writeManifest(ctx, ref, t) -} - -func (p *Pusher) Upload(ctx context.Context, repo name.Repository, l v1.Layer) error { - w, err := p.writer(ctx, repo, p.o) - if err != nil { - return err - } - return w.writeLayer(ctx, l) -} - -func (p *Pusher) Delete(ctx context.Context, ref name.Reference) error { - w, err := p.writer(ctx, ref.Context(), p.o) - if err != nil { - return err - } - - u := url.URL{ - Scheme: ref.Context().Registry.Scheme(), - Host: ref.Context().RegistryStr(), - Path: fmt.Sprintf("/v2/%s/manifests/%s", ref.Context().RepositoryStr(), ref.Identifier()), - } - - req, err := http.NewRequest(http.MethodDelete, u.String(), nil) - if err != nil { - return err - } - - resp, err := w.w.client.Do(req.WithContext(ctx)) - if err != nil { - return err - } - defer resp.Body.Close() - - return transport.CheckError(resp, http.StatusOK, http.StatusAccepted) - - // TODO(jason): If the manifest had a `subject`, and if the registry - // doesn't support Referrers, update the index pointed to by the - // subject's fallback tag to remove the descriptor for this manifest. -} - -type repoWriter struct { - repo name.Repository - o *options - once sync.Once - - w *writer - err error - - work *workers -} - -// this will run once per repoWriter instance -func (rw *repoWriter) init(ctx context.Context) error { - rw.once.Do(func() { - rw.work = &workers{} - rw.w, rw.err = makeWriter(ctx, rw.repo, nil, rw.o) - }) - return rw.err -} - -func (rw *repoWriter) writeDeps(ctx context.Context, m manifest) error { - if img, ok := m.(v1.Image); ok { - return rw.writeLayers(ctx, img) - } - - if idx, ok := m.(v1.ImageIndex); ok { - return rw.writeChildren(ctx, idx) - } - - // This has no deps, not an error (e.g. something you want to just PUT). - return nil -} - -type describable struct { - desc v1.Descriptor -} - -func (d describable) Digest() (v1.Hash, error) { - return d.desc.Digest, nil -} - -func (d describable) Size() (int64, error) { - return d.desc.Size, nil -} - -func (d describable) MediaType() (types.MediaType, error) { - return d.desc.MediaType, nil -} - -type tagManifest struct { - Taggable - partial.Describable -} - -func taggableToManifest(t Taggable) (manifest, error) { - if m, ok := t.(manifest); ok { - return m, nil - } - - if d, ok := t.(*Descriptor); ok { - if d.MediaType.IsIndex() { - return d.ImageIndex() - } - - if d.MediaType.IsImage() { - return d.Image() - } - - if d.MediaType.IsSchema1() { - return d.Schema1() - } - - return tagManifest{t, describable{d.toDesc()}}, nil - } - - desc := v1.Descriptor{ - // A reasonable default if Taggable doesn't implement MediaType. - MediaType: types.DockerManifestSchema2, - } - - b, err := t.RawManifest() - if err != nil { - return nil, err - } - - if wmt, ok := t.(withMediaType); ok { - desc.MediaType, err = wmt.MediaType() - if err != nil { - return nil, err - } - } - - desc.Digest, desc.Size, err = v1.SHA256(bytes.NewReader(b)) - if err != nil { - return nil, err - } - - return tagManifest{t, describable{desc}}, nil -} - -func (rw *repoWriter) writeManifest(ctx context.Context, ref name.Reference, t Taggable) error { - m, err := taggableToManifest(t) - if err != nil { - return err - } - - needDeps := true - - digest, err := m.Digest() - if errors.Is(err, stream.ErrNotComputed) { - if err := rw.writeDeps(ctx, m); err != nil { - return err - } - - needDeps = false - - digest, err = m.Digest() - if err != nil { - return err - } - } else if err != nil { - return err - } - - // This may be a lazy child where we have no ref until digest is computed. - if ref == nil { - ref = rw.repo.Digest(digest.String()) - } - - // For tags, we want to do this check outside of our Work.Do closure because - // we don't want to dedupe based on the manifest digest. - _, byTag := ref.(name.Tag) - if byTag { - if exists, err := rw.manifestExists(ctx, ref, t); err != nil { - return err - } else if exists { - return nil - } - } - - // The following work.Do will get deduped by digest, so it won't happen unless - // this tag happens to be the first commitManifest to run for that digest. - needPut := byTag - - if err := rw.work.Do(digest, func() error { - if !byTag { - if exists, err := rw.manifestExists(ctx, ref, t); err != nil { - return err - } else if exists { - return nil - } - } - - if needDeps { - if err := rw.writeDeps(ctx, m); err != nil { - return err - } - } - - needPut = false - return rw.commitManifest(ctx, ref, m) - }); err != nil { - return err - } - - if !needPut { - return nil - } - - // Only runs for tags that got deduped by digest. - return rw.commitManifest(ctx, ref, m) -} - -func (rw *repoWriter) writeChildren(ctx context.Context, idx v1.ImageIndex) error { - children, err := partial.Manifests(idx) - if err != nil { - return err - } - - g, ctx := errgroup.WithContext(ctx) - g.SetLimit(rw.o.jobs) - - for _, child := range children { - child := child - if err := rw.writeChild(ctx, child, g); err != nil { - return err - } - } - - return g.Wait() -} - -func (rw *repoWriter) writeChild(ctx context.Context, child partial.Describable, g *errgroup.Group) error { - switch child := child.(type) { - case v1.ImageIndex: - // For recursive index, we want to do a depth-first launching of goroutines - // to avoid deadlocking. - // - // Note that this is rare, so the impact of this should be really small. - return rw.writeManifest(ctx, nil, child) - case v1.Image: - g.Go(func() error { - return rw.writeManifest(ctx, nil, child) - }) - case v1.Layer: - g.Go(func() error { - return rw.writeLayer(ctx, child) - }) - default: - // This can't happen. - return fmt.Errorf("encountered unknown child: %T", child) - } - return nil -} - -// TODO: Consider caching some representation of the tags/digests in the destination -// repository as a hint to avoid this optimistic check in cases where we will most -// likely have to do a PUT anyway, e.g. if we are overwriting a tag we just wrote. -func (rw *repoWriter) manifestExists(ctx context.Context, ref name.Reference, t Taggable) (bool, error) { - f := &fetcher{ - target: ref.Context(), - client: rw.w.client, - } - - m, err := taggableToManifest(t) - if err != nil { - return false, err - } - - digest, err := m.Digest() - if err != nil { - // Possibly due to streaming layers. - return false, nil - } - got, err := f.headManifest(ctx, ref, allManifestMediaTypes) - if err != nil { - var terr *transport.Error - if errors.As(err, &terr) { - if terr.StatusCode == http.StatusNotFound { - return false, nil - } - - // We treat a 403 here as non-fatal because this existence check is an optimization and - // some registries will return a 403 instead of a 404 in certain situations. - // E.g. https://jfrog.atlassian.net/browse/RTFACT-13797 - if terr.StatusCode == http.StatusForbidden { - logs.Debug.Printf("manifestExists unexpected 403: %v", err) - return false, nil - } - } - - return false, err - } - - if digest != got.Digest { - // Mark that we saw this digest in the registry so we don't have to check it again. - rw.work.Do(got.Digest, nop) - - return false, nil - } - - if tag, ok := ref.(name.Tag); ok { - logs.Progress.Printf("existing manifest: %s@%s", tag.Identifier(), got.Digest) - } else { - logs.Progress.Print("existing manifest: ", got.Digest) - } - - return true, nil -} - -func (rw *repoWriter) commitManifest(ctx context.Context, ref name.Reference, m manifest) error { - if rw.o.progress != nil { - size, err := m.Size() - if err != nil { - return err - } - rw.o.progress.total(size) - } - - return rw.w.commitManifest(ctx, m, ref) -} - -func (rw *repoWriter) writeLayers(pctx context.Context, img v1.Image) error { - ls, err := img.Layers() - if err != nil { - return err - } - - g, ctx := errgroup.WithContext(pctx) - g.SetLimit(rw.o.jobs) - - for _, l := range ls { - l := l - - g.Go(func() error { - return rw.writeLayer(ctx, l) - }) - } - - mt, err := img.MediaType() - if err != nil { - return err - } - - if mt.IsSchema1() { - return g.Wait() - } - - cl, err := partial.ConfigLayer(img) - if errors.Is(err, stream.ErrNotComputed) { - if err := g.Wait(); err != nil { - return err - } - - cl, err := partial.ConfigLayer(img) - if err != nil { - return err - } - - return rw.writeLayer(pctx, cl) - } else if err != nil { - return err - } - - g.Go(func() error { - return rw.writeLayer(ctx, cl) - }) - - return g.Wait() -} - -func (rw *repoWriter) writeLayer(ctx context.Context, l v1.Layer) error { - // Skip any non-distributable things. - mt, err := l.MediaType() - if err != nil { - return err - } - if !mt.IsDistributable() && !rw.o.allowNondistributableArtifacts { - return nil - } - - digest, err := l.Digest() - if err != nil { - if errors.Is(err, stream.ErrNotComputed) { - return rw.lazyWriteLayer(ctx, l) - } - return err - } - - return rw.work.Do(digest, func() error { - if rw.o.progress != nil { - size, err := l.Size() - if err != nil { - return err - } - rw.o.progress.total(size) - } - return rw.w.uploadOne(ctx, l) - }) -} - -func (rw *repoWriter) lazyWriteLayer(ctx context.Context, l v1.Layer) error { - return rw.work.Stream(l, func() error { - if err := rw.w.uploadOne(ctx, l); err != nil { - return err - } - - // Mark this upload completed. - digest, err := l.Digest() - if err != nil { - return err - } - - rw.work.Do(digest, nop) - - if rw.o.progress != nil { - size, err := l.Size() - if err != nil { - return err - } - rw.o.progress.total(size) - } - - return nil - }) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go deleted file mode 100644 index e30ca57e..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/referrers.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2023 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "bytes" - "context" - "errors" - "io" - "net/http" - "strings" - - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/empty" - "github.com/google/go-containerregistry/pkg/v1/mutate" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// Referrers returns a list of descriptors that refer to the given manifest digest. -// -// The subject manifest doesn't have to exist in the registry for there to be descriptors that refer to it. -func Referrers(d name.Digest, options ...Option) (v1.ImageIndex, error) { - o, err := makeOptions(options...) - if err != nil { - return nil, err - } - return newPuller(o).referrers(o.context, d, o.filter) -} - -// https://github.com/opencontainers/distribution-spec/blob/main/spec.md#referrers-tag-schema -func fallbackTag(d name.Digest) name.Tag { - return d.Context().Tag(strings.Replace(d.DigestStr(), ":", "-", 1)) -} - -func (f *fetcher) fetchReferrers(ctx context.Context, filter map[string]string, d name.Digest) (v1.ImageIndex, error) { - // Check the Referrers API endpoint first. - u := f.url("referrers", d.DigestStr()) - req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil) - if err != nil { - return nil, err - } - req.Header.Set("Accept", string(types.OCIImageIndex)) - - resp, err := f.client.Do(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK, http.StatusNotFound, http.StatusBadRequest); err != nil { - return nil, err - } - - var b []byte - if resp.StatusCode == http.StatusOK { - b, err = io.ReadAll(resp.Body) - if err != nil { - return nil, err - } - } else { - // The registry doesn't support the Referrers API endpoint, so we'll use the fallback tag scheme. - b, _, err = f.fetchManifest(ctx, fallbackTag(d), []types.MediaType{types.OCIImageIndex}) - var terr *transport.Error - if errors.As(err, &terr) && terr.StatusCode == http.StatusNotFound { - // Not found just means there are no attachments yet. Start with an empty manifest. - return empty.Index, nil - } else if err != nil { - return nil, err - } - } - - h, sz, err := v1.SHA256(bytes.NewReader(b)) - if err != nil { - return nil, err - } - idx := &remoteIndex{ - fetcher: *f, - ctx: ctx, - manifest: b, - mediaType: types.OCIImageIndex, - descriptor: &v1.Descriptor{ - Digest: h, - MediaType: types.OCIImageIndex, - Size: sz, - }, - } - return filterReferrersResponse(filter, idx), nil -} - -// If filter applied, filter out by artifactType. -// See https://github.com/opencontainers/distribution-spec/blob/main/spec.md#listing-referrers -func filterReferrersResponse(filter map[string]string, in v1.ImageIndex) v1.ImageIndex { - if filter == nil { - return in - } - v, ok := filter["artifactType"] - if !ok { - return in - } - return mutate.RemoveManifests(in, func(desc v1.Descriptor) bool { - return desc.ArtifactType != v - }) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.go deleted file mode 100644 index 4bc1c4c4..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/schema1.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright 2023 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "bytes" - "context" - "encoding/json" - - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -type schema1 struct { - ref name.Reference - ctx context.Context - fetcher fetcher - manifest []byte - mediaType types.MediaType - descriptor *v1.Descriptor -} - -func (s *schema1) Layers() ([]v1.Layer, error) { - m := schema1Manifest{} - if err := json.NewDecoder(bytes.NewReader(s.manifest)).Decode(&m); err != nil { - return nil, err - } - - layers := []v1.Layer{} - for i := len(m.FSLayers) - 1; i >= 0; i-- { - fsl := m.FSLayers[i] - - h, err := v1.NewHash(fsl.BlobSum) - if err != nil { - return nil, err - } - l, err := s.LayerByDigest(h) - if err != nil { - return nil, err - } - layers = append(layers, l) - } - - return layers, nil -} - -func (s *schema1) MediaType() (types.MediaType, error) { - return s.mediaType, nil -} - -func (s *schema1) Size() (int64, error) { - return s.descriptor.Size, nil -} - -func (s *schema1) ConfigName() (v1.Hash, error) { - return partial.ConfigName(s) -} - -func (s *schema1) ConfigFile() (*v1.ConfigFile, error) { - return nil, newErrSchema1(s.mediaType) -} - -func (s *schema1) RawConfigFile() ([]byte, error) { - return []byte("{}"), nil -} - -func (s *schema1) Digest() (v1.Hash, error) { - return s.descriptor.Digest, nil -} - -func (s *schema1) Manifest() (*v1.Manifest, error) { - return nil, newErrSchema1(s.mediaType) -} - -func (s *schema1) RawManifest() ([]byte, error) { - return s.manifest, nil -} - -func (s *schema1) LayerByDigest(h v1.Hash) (v1.Layer, error) { - l, err := partial.CompressedToLayer(&remoteLayer{ - fetcher: s.fetcher, - ctx: s.ctx, - digest: h, - }) - if err != nil { - return nil, err - } - return &MountableLayer{ - Layer: l, - Reference: s.ref.Context().Digest(h.String()), - }, nil -} - -func (s *schema1) LayerByDiffID(v1.Hash) (v1.Layer, error) { - return nil, newErrSchema1(s.mediaType) -} - -type fslayer struct { - BlobSum string `json:"blobSum"` -} - -type schema1Manifest struct { - FSLayers []fslayer `json:"fsLayers"` -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.md deleted file mode 100644 index bd4d957b..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# `transport` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/transport?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/transport) - -The [distribution protocol](https://github.com/opencontainers/distribution-spec) is fairly simple, but correctly [implementing authentication](../../../authn/README.md) is **hard**. - -This package [implements](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/remote/transport#New) an [`http.RoundTripper`](https://godoc.org/net/http#RoundTripper) -that transparently performs: -* [Token -Authentication](https://docs.docker.com/registry/spec/auth/token/) and -* [OAuth2 -Authentication](https://docs.docker.com/registry/spec/auth/oauth/) - -for registry clients. - -## Raison d'être - -> Why not just use the [`docker/distribution`](https://godoc.org/github.com/docker/distribution/registry/client/auth) client? - -Great question! Mostly, because I don't want to depend on [`prometheus/client_golang`](https://github.com/prometheus/client_golang). - -As a performance optimization, that client uses [a cache](https://github.com/docker/distribution/blob/a8371794149d1d95f1e846744b05c87f2f825e5a/registry/client/repository.go#L173) to keep track of a mapping between blob digests and their [descriptors](https://github.com/docker/distribution/blob/a8371794149d1d95f1e846744b05c87f2f825e5a/blobs.go#L57-L86). Unfortunately, the cache [uses prometheus](https://github.com/docker/distribution/blob/a8371794149d1d95f1e846744b05c87f2f825e5a/registry/storage/cache/cachedblobdescriptorstore.go#L44) to track hits and misses, so if you want to use that client you have to pull in all of prometheus, which is pretty large. - -![docker/distribution](../../../../images/docker.dot.svg) - -> Why does it matter if you depend on prometheus? Who cares? - -It's generally polite to your downstream to reduce the number of dependencies your package requires: - -* Downloading your package is faster, which helps our Australian friends and people on airplanes. -* There is less code to compile, which speeds up builds and saves the planet from global warming. -* You reduce the likelihood of inflicting dependency hell upon your consumers. -* [Tim Hockin](https://twitter.com/thockin/status/958606077456654336) prefers it based on his experience working on Kubernetes, and he's a pretty smart guy. - -> Okay, what about [`containerd/containerd`](https://godoc.org/github.com/containerd/containerd/remotes/docker)? - -Similar reasons! That ends up pulling in grpc, protobuf, and logrus. - -![containerd/containerd](../../../../images/containerd.dot.svg) - -> Well... what about [`containers/image`](https://godoc.org/github.com/containers/image/docker)? - -That just uses the the `docker/distribution` client... and more! - -![containers/image](../../../../images/containers.dot.svg) - -> Wow, what about this package? - -Of course, this package isn't perfect either. `transport` depends on `authn`, -which in turn depends on docker's config file parsing and handling package, -which you don't strictly need but almost certainly want if you're going to be -interacting with a registry. - -![google/go-containerregistry](../../../../images/ggcr.dot.svg) - -*These graphs were generated by -[`kisielk/godepgraph`](https://github.com/kisielk/godepgraph).* - -## Usage - -This is heavily used by the -[`remote`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/remote) -package, which implements higher level image-centric functionality, but this -package is useful if you want to interact directly with the registry to do -something that `remote` doesn't support, e.g. [to handle with schema 1 -images](https://github.com/google/go-containerregistry/pull/509). - -This package also includes some [error -handling](https://github.com/opencontainers/distribution-spec/blob/60be706c34ee7805bdd1d3d11affec53b0dfb8fb/spec.md#errors) -facilities in the form of -[`CheckError`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/remote/transport#CheckError), -which will parse the response body into a structured error for unexpected http -status codes. - -Here's a "simple" program that writes the result of -[listing tags](https://github.com/opencontainers/distribution-spec/blob/60be706c34ee7805bdd1d3d11affec53b0dfb8fb/spec.md#tags) -for [`gcr.io/google-containers/pause`](https://gcr.io/google-containers/pause) -to stdout. - -```go -package main - -import ( - "io" - "net/http" - "os" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" -) - -func main() { - repo, err := name.NewRepository("gcr.io/google-containers/pause") - if err != nil { - panic(err) - } - - // Fetch credentials based on your docker config file, which is $HOME/.docker/config.json or $DOCKER_CONFIG. - auth, err := authn.DefaultKeychain.Resolve(repo.Registry) - if err != nil { - panic(err) - } - - // Construct an http.Client that is authorized to pull from gcr.io/google-containers/pause. - scopes := []string{repo.Scope(transport.PullScope)} - t, err := transport.New(repo.Registry, auth, http.DefaultTransport, scopes) - if err != nil { - panic(err) - } - client := &http.Client{Transport: t} - - // Make the actual request. - resp, err := client.Get("https://gcr.io/v2/google-containers/pause/tags/list") - if err != nil { - panic(err) - } - - // Assert that we get a 200, otherwise attempt to parse body as a structured error. - if err := transport.CheckError(resp, http.StatusOK); err != nil { - panic(err) - } - - // Write the response to stdout. - if _, err := io.Copy(os.Stdout, resp.Body); err != nil { - panic(err) - } -} -``` diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.go deleted file mode 100644 index fdb362b7..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/basic.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "encoding/base64" - "fmt" - "net/http" - - "github.com/google/go-containerregistry/pkg/authn" -) - -type basicTransport struct { - inner http.RoundTripper - auth authn.Authenticator - target string -} - -var _ http.RoundTripper = (*basicTransport)(nil) - -// RoundTrip implements http.RoundTripper -func (bt *basicTransport) RoundTrip(in *http.Request) (*http.Response, error) { - if bt.auth != authn.Anonymous { - auth, err := bt.auth.Authorization() - if err != nil { - return nil, err - } - - // http.Client handles redirects at a layer above the http.RoundTripper - // abstraction, so to avoid forwarding Authorization headers to places - // we are redirected, only set it when the authorization header matches - // the host with which we are interacting. - // In case of redirect http.Client can use an empty Host, check URL too. - if in.Host == bt.target || in.URL.Host == bt.target { - if bearer := auth.RegistryToken; bearer != "" { - hdr := fmt.Sprintf("Bearer %s", bearer) - in.Header.Set("Authorization", hdr) - } else if user, pass := auth.Username, auth.Password; user != "" && pass != "" { - delimited := fmt.Sprintf("%s:%s", user, pass) - encoded := base64.StdEncoding.EncodeToString([]byte(delimited)) - hdr := fmt.Sprintf("Basic %s", encoded) - in.Header.Set("Authorization", hdr) - } else if token := auth.Auth; token != "" { - hdr := fmt.Sprintf("Basic %s", token) - in.Header.Set("Authorization", hdr) - } - } - } - return bt.inner.RoundTrip(in) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go deleted file mode 100644 index cb156749..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/bearer.go +++ /dev/null @@ -1,391 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net" - "net/http" - "net/url" - "strings" - - authchallenge "github.com/docker/distribution/registry/client/auth/challenge" - "github.com/google/go-containerregistry/internal/redact" - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/logs" - "github.com/google/go-containerregistry/pkg/name" -) - -type Token struct { - Token string `json:"token"` - AccessToken string `json:"access_token,omitempty"` - RefreshToken string `json:"refresh_token"` - ExpiresIn int `json:"expires_in"` -} - -// Exchange requests a registry Token with the given scopes. -func Exchange(ctx context.Context, reg name.Registry, auth authn.Authenticator, t http.RoundTripper, scopes []string, pr *Challenge) (*Token, error) { - if strings.ToLower(pr.Scheme) != "bearer" { - // TODO: Pretend token for basic? - return nil, fmt.Errorf("challenge scheme %q is not bearer", pr.Scheme) - } - bt, err := fromChallenge(reg, auth, t, pr, scopes...) - if err != nil { - return nil, err - } - authcfg, err := auth.Authorization() - if err != nil { - return nil, err - } - tok, err := bt.Refresh(ctx, authcfg) - if err != nil { - return nil, err - } - return tok, nil -} - -// FromToken returns a transport given a Challenge + Token. -func FromToken(reg name.Registry, auth authn.Authenticator, t http.RoundTripper, pr *Challenge, tok *Token) (http.RoundTripper, error) { - if strings.ToLower(pr.Scheme) != "bearer" { - return &Wrapper{&basicTransport{inner: t, auth: auth, target: reg.RegistryStr()}}, nil - } - bt, err := fromChallenge(reg, auth, t, pr) - if err != nil { - return nil, err - } - if tok.Token != "" { - bt.bearer.RegistryToken = tok.Token - } - return &Wrapper{bt}, nil -} - -func fromChallenge(reg name.Registry, auth authn.Authenticator, t http.RoundTripper, pr *Challenge, scopes ...string) (*bearerTransport, error) { - // We require the realm, which tells us where to send our Basic auth to turn it into Bearer auth. - realm, ok := pr.Parameters["realm"] - if !ok { - return nil, fmt.Errorf("malformed www-authenticate, missing realm: %v", pr.Parameters) - } - service := pr.Parameters["service"] - scheme := "https" - if pr.Insecure { - scheme = "http" - } - return &bearerTransport{ - inner: t, - basic: auth, - realm: realm, - registry: reg, - service: service, - scopes: scopes, - scheme: scheme, - }, nil -} - -type bearerTransport struct { - // Wrapped by bearerTransport. - inner http.RoundTripper - // Basic credentials that we exchange for bearer tokens. - basic authn.Authenticator - // Holds the bearer response from the token service. - bearer authn.AuthConfig - // Registry to which we send bearer tokens. - registry name.Registry - // See https://tools.ietf.org/html/rfc6750#section-3 - realm string - // See https://docs.docker.com/registry/spec/auth/token/ - service string - scopes []string - // Scheme we should use, determined by ping response. - scheme string -} - -var _ http.RoundTripper = (*bearerTransport)(nil) - -var portMap = map[string]string{ - "http": "80", - "https": "443", -} - -func stringSet(ss []string) map[string]struct{} { - set := make(map[string]struct{}) - for _, s := range ss { - set[s] = struct{}{} - } - return set -} - -// RoundTrip implements http.RoundTripper -func (bt *bearerTransport) RoundTrip(in *http.Request) (*http.Response, error) { - sendRequest := func() (*http.Response, error) { - // http.Client handles redirects at a layer above the http.RoundTripper - // abstraction, so to avoid forwarding Authorization headers to places - // we are redirected, only set it when the authorization header matches - // the registry with which we are interacting. - // In case of redirect http.Client can use an empty Host, check URL too. - if matchesHost(bt.registry.RegistryStr(), in, bt.scheme) { - hdr := fmt.Sprintf("Bearer %s", bt.bearer.RegistryToken) - in.Header.Set("Authorization", hdr) - } - return bt.inner.RoundTrip(in) - } - - res, err := sendRequest() - if err != nil { - return nil, err - } - - // If we hit a WWW-Authenticate challenge, it might be due to expired tokens or insufficient scope. - if challenges := authchallenge.ResponseChallenges(res); len(challenges) != 0 { - // close out old response, since we will not return it. - res.Body.Close() - - newScopes := []string{} - for _, wac := range challenges { - // TODO(jonjohnsonjr): Should we also update "realm" or "service"? - if want, ok := wac.Parameters["scope"]; ok { - // Add any scopes that we don't already request. - got := stringSet(bt.scopes) - if _, ok := got[want]; !ok { - newScopes = append(newScopes, want) - } - } - } - - // Some registries seem to only look at the first scope parameter during a token exchange. - // If a request fails because it's missing a scope, we should put those at the beginning, - // otherwise the registry might just ignore it :/ - newScopes = append(newScopes, bt.scopes...) - bt.scopes = newScopes - - // TODO(jonjohnsonjr): Teach transport.Error about "error" and "error_description" from challenge. - - // Retry the request to attempt to get a valid token. - if err = bt.refresh(in.Context()); err != nil { - return nil, err - } - return sendRequest() - } - - return res, err -} - -// It's unclear which authentication flow to use based purely on the protocol, -// so we rely on heuristics and fallbacks to support as many registries as possible. -// The basic token exchange is attempted first, falling back to the oauth flow. -// If the IdentityToken is set, this indicates that we should start with the oauth flow. -func (bt *bearerTransport) refresh(ctx context.Context) error { - auth, err := bt.basic.Authorization() - if err != nil { - return err - } - - if auth.RegistryToken != "" { - bt.bearer.RegistryToken = auth.RegistryToken - return nil - } - - response, err := bt.Refresh(ctx, auth) - if err != nil { - return err - } - - // Some registries set access_token instead of token. See #54. - if response.AccessToken != "" { - response.Token = response.AccessToken - } - - // Find a token to turn into a Bearer authenticator - if response.Token != "" { - bt.bearer.RegistryToken = response.Token - } - - // If we obtained a refresh token from the oauth flow, use that for refresh() now. - if response.RefreshToken != "" { - bt.basic = authn.FromConfig(authn.AuthConfig{ - IdentityToken: response.RefreshToken, - }) - } - - return nil -} - -func (bt *bearerTransport) Refresh(ctx context.Context, auth *authn.AuthConfig) (*Token, error) { - var ( - content []byte - err error - ) - if auth.IdentityToken != "" { - // If the secret being stored is an identity token, - // the Username should be set to , which indicates - // we are using an oauth flow. - content, err = bt.refreshOauth(ctx) - var terr *Error - if errors.As(err, &terr) && terr.StatusCode == http.StatusNotFound { - // Note: Not all token servers implement oauth2. - // If the request to the endpoint returns 404 using the HTTP POST method, - // refer to Token Documentation for using the HTTP GET method supported by all token servers. - content, err = bt.refreshBasic(ctx) - } - } else { - content, err = bt.refreshBasic(ctx) - } - if err != nil { - return nil, err - } - - var response Token - if err := json.Unmarshal(content, &response); err != nil { - return nil, err - } - - if response.Token == "" && response.AccessToken == "" { - return &response, fmt.Errorf("no token in bearer response:\n%s", content) - } - - return &response, nil -} - -func matchesHost(host string, in *http.Request, scheme string) bool { - canonicalHeaderHost := canonicalAddress(in.Host, scheme) - canonicalURLHost := canonicalAddress(in.URL.Host, scheme) - canonicalRegistryHost := canonicalAddress(host, scheme) - return canonicalHeaderHost == canonicalRegistryHost || canonicalURLHost == canonicalRegistryHost -} - -func canonicalAddress(host, scheme string) (address string) { - // The host may be any one of: - // - hostname - // - hostname:port - // - ipv4 - // - ipv4:port - // - ipv6 - // - [ipv6]:port - // As net.SplitHostPort returns an error if the host does not contain a port, we should only attempt - // to call it when we know that the address contains a port - if strings.Count(host, ":") == 1 || (strings.Count(host, ":") >= 2 && strings.Contains(host, "]:")) { - hostname, port, err := net.SplitHostPort(host) - if err != nil { - return host - } - if port == "" { - port = portMap[scheme] - } - - return net.JoinHostPort(hostname, port) - } - - return net.JoinHostPort(host, portMap[scheme]) -} - -// https://docs.docker.com/registry/spec/auth/oauth/ -func (bt *bearerTransport) refreshOauth(ctx context.Context) ([]byte, error) { - auth, err := bt.basic.Authorization() - if err != nil { - return nil, err - } - - u, err := url.Parse(bt.realm) - if err != nil { - return nil, err - } - - v := url.Values{} - v.Set("scope", strings.Join(bt.scopes, " ")) - if bt.service != "" { - v.Set("service", bt.service) - } - v.Set("client_id", defaultUserAgent) - if auth.IdentityToken != "" { - v.Set("grant_type", "refresh_token") - v.Set("refresh_token", auth.IdentityToken) - } else if auth.Username != "" && auth.Password != "" { - // TODO(#629): This is unreachable. - v.Set("grant_type", "password") - v.Set("username", auth.Username) - v.Set("password", auth.Password) - v.Set("access_type", "offline") - } - - client := http.Client{Transport: bt.inner} - req, err := http.NewRequest(http.MethodPost, u.String(), strings.NewReader(v.Encode())) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - - // We don't want to log credentials. - ctx = redact.NewContext(ctx, "oauth token response contains credentials") - - resp, err := client.Do(req.WithContext(ctx)) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if err := CheckError(resp, http.StatusOK); err != nil { - if bt.basic == authn.Anonymous { - logs.Warn.Printf("No matching credentials were found for %q", bt.registry) - } - return nil, err - } - - return io.ReadAll(resp.Body) -} - -// https://docs.docker.com/registry/spec/auth/token/ -func (bt *bearerTransport) refreshBasic(ctx context.Context) ([]byte, error) { - u, err := url.Parse(bt.realm) - if err != nil { - return nil, err - } - b := &basicTransport{ - inner: bt.inner, - auth: bt.basic, - target: u.Host, - } - client := http.Client{Transport: b} - - v := u.Query() - v["scope"] = bt.scopes - v.Set("service", bt.service) - u.RawQuery = v.Encode() - - req, err := http.NewRequest(http.MethodGet, u.String(), nil) - if err != nil { - return nil, err - } - - // We don't want to log credentials. - ctx = redact.NewContext(ctx, "basic token response contains credentials") - - resp, err := client.Do(req.WithContext(ctx)) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if err := CheckError(resp, http.StatusOK); err != nil { - if bt.basic == authn.Anonymous { - logs.Warn.Printf("No matching credentials were found for %q", bt.registry) - } - return nil, err - } - - return io.ReadAll(resp.Body) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.go deleted file mode 100644 index ff7025b5..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport provides facilities for setting up an authenticated -// http.RoundTripper given an Authenticator and base RoundTripper. See -// transport.New for more information. -package transport diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.go deleted file mode 100644 index 482a4ade..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/error.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "encoding/json" - "fmt" - "io" - "net/http" - "strings" - - "github.com/google/go-containerregistry/internal/redact" -) - -// Error implements error to support the following error specification: -// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors -type Error struct { - Errors []Diagnostic `json:"errors,omitempty"` - // The http status code returned. - StatusCode int - // The request that failed. - Request *http.Request - // The raw body if we couldn't understand it. - rawBody string - - // Bit of a hack to make it easier to force a retry. - temporary bool -} - -// Check that Error implements error -var _ error = (*Error)(nil) - -// Error implements error -func (e *Error) Error() string { - prefix := "" - if e.Request != nil { - prefix = fmt.Sprintf("%s %s: ", e.Request.Method, redact.URL(e.Request.URL)) - } - return prefix + e.responseErr() -} - -func (e *Error) responseErr() string { - switch len(e.Errors) { - case 0: - if len(e.rawBody) == 0 { - if e.Request != nil && e.Request.Method == http.MethodHead { - return fmt.Sprintf("unexpected status code %d %s (HEAD responses have no body, use GET for details)", e.StatusCode, http.StatusText(e.StatusCode)) - } - return fmt.Sprintf("unexpected status code %d %s", e.StatusCode, http.StatusText(e.StatusCode)) - } - return fmt.Sprintf("unexpected status code %d %s: %s", e.StatusCode, http.StatusText(e.StatusCode), e.rawBody) - case 1: - return e.Errors[0].String() - default: - var errors []string - for _, d := range e.Errors { - errors = append(errors, d.String()) - } - return fmt.Sprintf("multiple errors returned: %s", - strings.Join(errors, "; ")) - } -} - -// Temporary returns whether the request that preceded the error is temporary. -func (e *Error) Temporary() bool { - if e.temporary { - return true - } - - if len(e.Errors) == 0 { - _, ok := temporaryStatusCodes[e.StatusCode] - return ok - } - for _, d := range e.Errors { - if _, ok := temporaryErrorCodes[d.Code]; !ok { - return false - } - } - return true -} - -// Diagnostic represents a single error returned by a Docker registry interaction. -type Diagnostic struct { - Code ErrorCode `json:"code"` - Message string `json:"message,omitempty"` - Detail any `json:"detail,omitempty"` -} - -// String stringifies the Diagnostic in the form: $Code: $Message[; $Detail] -func (d Diagnostic) String() string { - msg := fmt.Sprintf("%s: %s", d.Code, d.Message) - if d.Detail != nil { - msg = fmt.Sprintf("%s; %v", msg, d.Detail) - } - return msg -} - -// ErrorCode is an enumeration of supported error codes. -type ErrorCode string - -// The set of error conditions a registry may return: -// https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors-2 -const ( - BlobUnknownErrorCode ErrorCode = "BLOB_UNKNOWN" - BlobUploadInvalidErrorCode ErrorCode = "BLOB_UPLOAD_INVALID" - BlobUploadUnknownErrorCode ErrorCode = "BLOB_UPLOAD_UNKNOWN" - DigestInvalidErrorCode ErrorCode = "DIGEST_INVALID" - ManifestBlobUnknownErrorCode ErrorCode = "MANIFEST_BLOB_UNKNOWN" - ManifestInvalidErrorCode ErrorCode = "MANIFEST_INVALID" - ManifestUnknownErrorCode ErrorCode = "MANIFEST_UNKNOWN" - ManifestUnverifiedErrorCode ErrorCode = "MANIFEST_UNVERIFIED" - NameInvalidErrorCode ErrorCode = "NAME_INVALID" - NameUnknownErrorCode ErrorCode = "NAME_UNKNOWN" - SizeInvalidErrorCode ErrorCode = "SIZE_INVALID" - TagInvalidErrorCode ErrorCode = "TAG_INVALID" - UnauthorizedErrorCode ErrorCode = "UNAUTHORIZED" - DeniedErrorCode ErrorCode = "DENIED" - UnsupportedErrorCode ErrorCode = "UNSUPPORTED" - TooManyRequestsErrorCode ErrorCode = "TOOMANYREQUESTS" - UnknownErrorCode ErrorCode = "UNKNOWN" - - // This isn't defined by either docker or OCI spec, but is defined by docker/distribution: - // https://github.com/distribution/distribution/blob/6a977a5a754baa213041443f841705888107362a/registry/api/errcode/register.go#L60 - UnavailableErrorCode ErrorCode = "UNAVAILABLE" -) - -// TODO: Include other error types. -var temporaryErrorCodes = map[ErrorCode]struct{}{ - BlobUploadInvalidErrorCode: {}, - TooManyRequestsErrorCode: {}, - UnknownErrorCode: {}, - UnavailableErrorCode: {}, -} - -var temporaryStatusCodes = map[int]struct{}{ - http.StatusRequestTimeout: {}, - http.StatusInternalServerError: {}, - http.StatusBadGateway: {}, - http.StatusServiceUnavailable: {}, - http.StatusGatewayTimeout: {}, -} - -// CheckError returns a structured error if the response status is not in codes. -func CheckError(resp *http.Response, codes ...int) error { - for _, code := range codes { - if resp.StatusCode == code { - // This is one of the supported status codes. - return nil - } - } - - b, err := io.ReadAll(resp.Body) - if err != nil { - return err - } - - return makeError(resp, b) -} - -func makeError(resp *http.Response, body []byte) *Error { - // https://github.com/docker/distribution/blob/master/docs/spec/api.md#errors - structuredError := &Error{} - - // This can fail if e.g. the response body is not valid JSON. That's fine, - // we'll construct an appropriate error string from the body and status code. - _ = json.Unmarshal(body, structuredError) - - structuredError.rawBody = string(body) - structuredError.StatusCode = resp.StatusCode - structuredError.Request = resp.Request - - return structuredError -} - -func retryError(resp *http.Response) error { - b, err := io.ReadAll(resp.Body) - if err != nil { - return err - } - - rerr := makeError(resp, b) - rerr.temporary = true - return rerr -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.go deleted file mode 100644 index c341f844..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/logger.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2020 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "fmt" - "net/http" - "net/http/httputil" - "time" - - "github.com/google/go-containerregistry/internal/redact" - "github.com/google/go-containerregistry/pkg/logs" -) - -type logTransport struct { - inner http.RoundTripper -} - -// NewLogger returns a transport that logs requests and responses to -// github.com/google/go-containerregistry/pkg/logs.Debug. -func NewLogger(inner http.RoundTripper) http.RoundTripper { - return &logTransport{inner} -} - -func (t *logTransport) RoundTrip(in *http.Request) (out *http.Response, err error) { - // Inspired by: github.com/motemen/go-loghttp - - // We redact token responses and binary blobs in response/request. - omitBody, reason := redact.FromContext(in.Context()) - if omitBody { - logs.Debug.Printf("--> %s %s [body redacted: %s]", in.Method, in.URL, reason) - } else { - logs.Debug.Printf("--> %s %s", in.Method, in.URL) - } - - // Save these headers so we can redact Authorization. - savedHeaders := in.Header.Clone() - if in.Header != nil && in.Header.Get("authorization") != "" { - in.Header.Set("authorization", "") - } - - b, err := httputil.DumpRequestOut(in, !omitBody) - if err == nil { - logs.Debug.Println(string(b)) - } else { - logs.Debug.Printf("Failed to dump request %s %s: %v", in.Method, in.URL, err) - } - - // Restore the non-redacted headers. - in.Header = savedHeaders - - start := time.Now() - out, err = t.inner.RoundTrip(in) - duration := time.Since(start) - if err != nil { - logs.Debug.Printf("<-- %v %s %s (%s)", err, in.Method, in.URL, duration) - } - if out != nil { - msg := fmt.Sprintf("<-- %d", out.StatusCode) - if out.Request != nil { - msg = fmt.Sprintf("%s %s", msg, out.Request.URL) - } - msg = fmt.Sprintf("%s (%s)", msg, duration) - - if omitBody { - msg = fmt.Sprintf("%s [body redacted: %s]", msg, reason) - } - - logs.Debug.Print(msg) - - b, err := httputil.DumpResponse(out, !omitBody) - if err == nil { - logs.Debug.Println(string(b)) - } else { - logs.Debug.Printf("Failed to dump response %s %s: %v", in.Method, in.URL, err) - } - } - return -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.go deleted file mode 100644 index 799c7ea0..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/ping.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "strings" - "time" - - authchallenge "github.com/docker/distribution/registry/client/auth/challenge" - "github.com/google/go-containerregistry/pkg/logs" - "github.com/google/go-containerregistry/pkg/name" -) - -// 300ms is the default fallback period for go's DNS dialer but we could make this configurable. -var fallbackDelay = 300 * time.Millisecond - -type Challenge struct { - Scheme string - - // Following the challenge there are often key/value pairs - // e.g. Bearer service="gcr.io",realm="https://auth.gcr.io/v36/tokenz" - Parameters map[string]string - - // Whether we had to use http to complete the Ping. - Insecure bool -} - -// Ping does a GET /v2/ against the registry and returns the response. -func Ping(ctx context.Context, reg name.Registry, t http.RoundTripper) (*Challenge, error) { - // This first attempts to use "https" for every request, falling back to http - // if the registry matches our localhost heuristic or if it is intentionally - // set to insecure via name.NewInsecureRegistry. - schemes := []string{"https"} - if reg.Scheme() == "http" { - schemes = append(schemes, "http") - } - if len(schemes) == 1 { - return pingSingle(ctx, reg, t, schemes[0]) - } - return pingParallel(ctx, reg, t, schemes) -} - -func pingSingle(ctx context.Context, reg name.Registry, t http.RoundTripper, scheme string) (*Challenge, error) { - client := http.Client{Transport: t} - url := fmt.Sprintf("%s://%s/v2/", scheme, reg.RegistryStr()) - req, err := http.NewRequest(http.MethodGet, url, nil) - if err != nil { - return nil, err - } - resp, err := client.Do(req.WithContext(ctx)) - if err != nil { - return nil, err - } - defer func() { - // By draining the body, make sure to reuse the connection made by - // the ping for the following access to the registry - io.Copy(io.Discard, resp.Body) - resp.Body.Close() - }() - - insecure := scheme == "http" - - switch resp.StatusCode { - case http.StatusOK: - // If we get a 200, then no authentication is needed. - return &Challenge{ - Insecure: insecure, - }, nil - case http.StatusUnauthorized: - if challenges := authchallenge.ResponseChallenges(resp); len(challenges) != 0 { - // If we hit more than one, let's try to find one that we know how to handle. - wac := pickFromMultipleChallenges(challenges) - return &Challenge{ - Scheme: wac.Scheme, - Parameters: wac.Parameters, - Insecure: insecure, - }, nil - } - // Otherwise, just return the challenge without parameters. - return &Challenge{ - Scheme: resp.Header.Get("WWW-Authenticate"), - Insecure: insecure, - }, nil - default: - return nil, CheckError(resp, http.StatusOK, http.StatusUnauthorized) - } -} - -// Based on the golang happy eyeballs dialParallel impl in net/dial.go. -func pingParallel(ctx context.Context, reg name.Registry, t http.RoundTripper, schemes []string) (*Challenge, error) { - returned := make(chan struct{}) - defer close(returned) - - type pingResult struct { - *Challenge - error - primary bool - done bool - } - - results := make(chan pingResult) - - startRacer := func(ctx context.Context, scheme string) { - pr, err := pingSingle(ctx, reg, t, scheme) - select { - case results <- pingResult{Challenge: pr, error: err, primary: scheme == "https", done: true}: - case <-returned: - if pr != nil { - logs.Debug.Printf("%s lost race", scheme) - } - } - } - - var primary, fallback pingResult - - primaryCtx, primaryCancel := context.WithCancel(ctx) - defer primaryCancel() - go startRacer(primaryCtx, schemes[0]) - - fallbackTimer := time.NewTimer(fallbackDelay) - defer fallbackTimer.Stop() - - for { - select { - case <-fallbackTimer.C: - fallbackCtx, fallbackCancel := context.WithCancel(ctx) - defer fallbackCancel() - go startRacer(fallbackCtx, schemes[1]) - - case res := <-results: - if res.error == nil { - return res.Challenge, nil - } - if res.primary { - primary = res - } else { - fallback = res - } - if primary.done && fallback.done { - return nil, multierrs{primary.error, fallback.error} - } - if res.primary && fallbackTimer.Stop() { - // Primary failed and we haven't started the fallback, - // reset time to start fallback immediately. - fallbackTimer.Reset(0) - } - } - } -} - -func pickFromMultipleChallenges(challenges []authchallenge.Challenge) authchallenge.Challenge { - // It might happen there are multiple www-authenticate headers, e.g. `Negotiate` and `Basic`. - // Picking simply the first one could result eventually in `unrecognized challenge` error, - // that's why we're looping through the challenges in search for one that can be handled. - allowedSchemes := []string{"basic", "bearer"} - - for _, wac := range challenges { - currentScheme := strings.ToLower(wac.Scheme) - for _, allowed := range allowedSchemes { - if allowed == currentScheme { - return wac - } - } - } - - return challenges[0] -} - -type multierrs []error - -func (m multierrs) Error() string { - var b strings.Builder - hasWritten := false - for _, err := range m { - if hasWritten { - b.WriteString("; ") - } - hasWritten = true - b.WriteString(err.Error()) - } - return b.String() -} - -func (m multierrs) As(target any) bool { - for _, err := range m { - if errors.As(err, target) { - return true - } - } - return false -} - -func (m multierrs) Is(target error) bool { - for _, err := range m { - if errors.Is(err, target) { - return true - } - } - return false -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.go deleted file mode 100644 index 093f55d0..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/retry.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "net/http" - "time" - - "github.com/google/go-containerregistry/internal/retry" -) - -// Sleep for 0.1 then 0.3 seconds. This should cover networking blips. -var defaultBackoff = retry.Backoff{ - Duration: 100 * time.Millisecond, - Factor: 3.0, - Jitter: 0.1, - Steps: 3, -} - -var _ http.RoundTripper = (*retryTransport)(nil) - -// retryTransport wraps a RoundTripper and retries temporary network errors. -type retryTransport struct { - inner http.RoundTripper - backoff retry.Backoff - predicate retry.Predicate - codes []int -} - -// Option is a functional option for retryTransport. -type Option func(*options) - -type options struct { - backoff retry.Backoff - predicate retry.Predicate - codes []int -} - -// Backoff is an alias of retry.Backoff to expose this configuration option to consumers of this lib -type Backoff = retry.Backoff - -// WithRetryBackoff sets the backoff for retry operations. -func WithRetryBackoff(backoff Backoff) Option { - return func(o *options) { - o.backoff = backoff - } -} - -// WithRetryPredicate sets the predicate for retry operations. -func WithRetryPredicate(predicate func(error) bool) Option { - return func(o *options) { - o.predicate = predicate - } -} - -// WithRetryStatusCodes sets which http response codes will be retried. -func WithRetryStatusCodes(codes ...int) Option { - return func(o *options) { - o.codes = codes - } -} - -// NewRetry returns a transport that retries errors. -func NewRetry(inner http.RoundTripper, opts ...Option) http.RoundTripper { - o := &options{ - backoff: defaultBackoff, - predicate: retry.IsTemporary, - } - - for _, opt := range opts { - opt(o) - } - - return &retryTransport{ - inner: inner, - backoff: o.backoff, - predicate: o.predicate, - codes: o.codes, - } -} - -func (t *retryTransport) RoundTrip(in *http.Request) (out *http.Response, err error) { - roundtrip := func() error { - out, err = t.inner.RoundTrip(in) - if !retry.Ever(in.Context()) { - return nil - } - if out != nil { - for _, code := range t.codes { - if out.StatusCode == code { - return retryError(out) - } - } - } - return err - } - retry.Retry(roundtrip, t.predicate, t.backoff) - return -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.go deleted file mode 100644 index 05844db1..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/schemer.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "net/http" - - "github.com/google/go-containerregistry/pkg/name" -) - -type schemeTransport struct { - // Scheme we should use, determined by ping response. - scheme string - - // Registry we're talking to. - registry name.Registry - - // Wrapped by schemeTransport. - inner http.RoundTripper -} - -// RoundTrip implements http.RoundTripper -func (st *schemeTransport) RoundTrip(in *http.Request) (*http.Response, error) { - // When we ping() the registry, we determine whether to use http or https - // based on which scheme was successful. That is only valid for the - // registry server and not e.g. a separate token server or blob storage, - // so we should only override the scheme if the host is the registry. - if matchesHost(st.registry.String(), in, st.scheme) { - in.URL.Scheme = st.scheme - } - return st.inner.RoundTrip(in) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.go deleted file mode 100644 index c3b56f7a..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/scope.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport - -// Scopes suitable to qualify each Repository -const ( - PullScope string = "pull" - PushScope string = "push,pull" - // For now DELETE is PUSH, which is the read/write ACL. - DeleteScope string = PushScope - CatalogScope string = "catalog" -) diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.go deleted file mode 100644 index bd539b44..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/transport.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "context" - "net/http" - "strings" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" -) - -// New returns a new RoundTripper based on the provided RoundTripper that has been -// setup to authenticate with the remote registry "reg", in the capacity -// laid out by the specified scopes. -// -// Deprecated: Use NewWithContext. -func New(reg name.Registry, auth authn.Authenticator, t http.RoundTripper, scopes []string) (http.RoundTripper, error) { - return NewWithContext(context.Background(), reg, auth, t, scopes) -} - -// NewWithContext returns a new RoundTripper based on the provided RoundTripper that has been -// set up to authenticate with the remote registry "reg", in the capacity -// laid out by the specified scopes. -// In case the RoundTripper is already of the type Wrapper it assumes -// authentication was already done prior to this call, so it just returns -// the provided RoundTripper without further action -func NewWithContext(ctx context.Context, reg name.Registry, auth authn.Authenticator, t http.RoundTripper, scopes []string) (http.RoundTripper, error) { - // When the transport provided is of the type Wrapper this function assumes that the caller already - // executed the necessary login and check. - switch t.(type) { - case *Wrapper: - return t, nil - } - // The handshake: - // 1. Use "t" to ping() the registry for the authentication challenge. - // - // 2a. If we get back a 200, then simply use "t". - // - // 2b. If we get back a 401 with a Basic challenge, then use a transport - // that just attachs auth each roundtrip. - // - // 2c. If we get back a 401 with a Bearer challenge, then use a transport - // that attaches a bearer token to each request, and refreshes is on 401s. - // Perform an initial refresh to seed the bearer token. - - // First we ping the registry to determine the parameters of the authentication handshake - // (if one is even necessary). - pr, err := Ping(ctx, reg, t) - if err != nil { - return nil, err - } - - // Wrap t with a useragent transport unless we already have one. - if _, ok := t.(*userAgentTransport); !ok { - t = NewUserAgent(t, "") - } - - scheme := "https" - if pr.Insecure { - scheme = "http" - } - - // Wrap t in a transport that selects the appropriate scheme based on the ping response. - t = &schemeTransport{ - scheme: scheme, - registry: reg, - inner: t, - } - - if strings.ToLower(pr.Scheme) != "bearer" { - return &Wrapper{&basicTransport{inner: t, auth: auth, target: reg.RegistryStr()}}, nil - } - - bt, err := fromChallenge(reg, auth, t, pr) - if err != nil { - return nil, err - } - bt.scopes = scopes - - if err := bt.refresh(ctx); err != nil { - return nil, err - } - return &Wrapper{bt}, nil -} - -// Wrapper results in *not* wrapping supplied transport with additional logic such as retries, useragent and debug logging -// Consumers are opt-ing into providing their own transport without any additional wrapping. -type Wrapper struct { - inner http.RoundTripper -} - -// RoundTrip delegates to the inner RoundTripper -func (w *Wrapper) RoundTrip(in *http.Request) (*http.Response, error) { - return w.inner.RoundTrip(in) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.go deleted file mode 100644 index 74a9e71b..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/transport/useragent.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2019 Google LLC All Rights Reserved. -// -// 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 transport - -import ( - "fmt" - "net/http" - "runtime/debug" -) - -var ( - // Version can be set via: - // -ldflags="-X 'github.com/google/go-containerregistry/pkg/v1/remote/transport.Version=$TAG'" - Version string - - ggcrVersion = defaultUserAgent -) - -const ( - defaultUserAgent = "go-containerregistry" - moduleName = "github.com/google/go-containerregistry" -) - -type userAgentTransport struct { - inner http.RoundTripper - ua string -} - -func init() { - if v := version(); v != "" { - ggcrVersion = fmt.Sprintf("%s/%s", defaultUserAgent, v) - } -} - -func version() string { - if Version != "" { - // Version was set via ldflags, just return it. - return Version - } - - info, ok := debug.ReadBuildInfo() - if !ok { - return "" - } - - // Happens for crane and gcrane. - if info.Main.Path == moduleName { - return info.Main.Version - } - - // Anything else. - for _, dep := range info.Deps { - if dep.Path == moduleName { - return dep.Version - } - } - - return "" -} - -// NewUserAgent returns an http.Roundtripper that sets the user agent to -// The provided string plus additional go-containerregistry information, -// e.g. if provided "crane/v0.1.4" and this modules was built at v0.1.4: -// -// User-Agent: crane/v0.1.4 go-containerregistry/v0.1.4 -func NewUserAgent(inner http.RoundTripper, ua string) http.RoundTripper { - if ua == "" { - ua = ggcrVersion - } else { - ua = fmt.Sprintf("%s %s", ua, ggcrVersion) - } - return &userAgentTransport{ - inner: inner, - ua: ua, - } -} - -// RoundTrip implements http.RoundTripper -func (ut *userAgentTransport) RoundTrip(in *http.Request) (*http.Response, error) { - in.Header.Set("User-Agent", ut.ua) - return ut.inner.RoundTrip(in) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go b/vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go deleted file mode 100644 index 04a3989a..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/remote/write.go +++ /dev/null @@ -1,713 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 remote - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "sort" - "strings" - "sync" - - "github.com/google/go-containerregistry/internal/redact" - "github.com/google/go-containerregistry/internal/retry" - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/logs" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/remote/transport" - "github.com/google/go-containerregistry/pkg/v1/stream" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -// Taggable is an interface that enables a manifest PUT (e.g. for tagging). -type Taggable interface { - RawManifest() ([]byte, error) -} - -// Write pushes the provided img to the specified image reference. -func Write(ref name.Reference, img v1.Image, options ...Option) (rerr error) { - o, err := makeOptions(options...) - if err != nil { - return err - } - if o.progress != nil { - defer func() { o.progress.Close(rerr) }() - } - return newPusher(o).Push(o.context, ref, img) -} - -// writer writes the elements of an image to a remote image reference. -type writer struct { - repo name.Repository - auth authn.Authenticator - transport http.RoundTripper - - client *http.Client - - progress *progress - backoff Backoff - predicate retry.Predicate - - scopeLock sync.Mutex - // Keep track of scopes that we have already requested. - scopeSet map[string]struct{} - scopes []string -} - -func makeWriter(ctx context.Context, repo name.Repository, ls []v1.Layer, o *options) (*writer, error) { - auth := o.auth - if o.keychain != nil { - kauth, err := o.keychain.Resolve(repo) - if err != nil { - return nil, err - } - auth = kauth - } - scopes := scopesForUploadingImage(repo, ls) - tr, err := transport.NewWithContext(ctx, repo.Registry, auth, o.transport, scopes) - if err != nil { - return nil, err - } - - scopeSet := map[string]struct{}{} - for _, scope := range scopes { - scopeSet[scope] = struct{}{} - } - return &writer{ - repo: repo, - client: &http.Client{Transport: tr}, - auth: auth, - transport: o.transport, - progress: o.progress, - backoff: o.retryBackoff, - predicate: o.retryPredicate, - scopes: scopes, - scopeSet: scopeSet, - }, nil -} - -// url returns a url.Url for the specified path in the context of this remote image reference. -func (w *writer) url(path string) url.URL { - return url.URL{ - Scheme: w.repo.Registry.Scheme(), - Host: w.repo.RegistryStr(), - Path: path, - } -} - -func (w *writer) maybeUpdateScopes(ctx context.Context, ml *MountableLayer) error { - if ml.Reference.Context().String() == w.repo.String() { - return nil - } - if ml.Reference.Context().Registry.String() != w.repo.Registry.String() { - return nil - } - - scope := ml.Reference.Scope(transport.PullScope) - - w.scopeLock.Lock() - defer w.scopeLock.Unlock() - - if _, ok := w.scopeSet[scope]; !ok { - w.scopeSet[scope] = struct{}{} - w.scopes = append(w.scopes, scope) - - logs.Debug.Printf("Refreshing token to add scope %q", scope) - wt, err := transport.NewWithContext(ctx, w.repo.Registry, w.auth, w.transport, w.scopes) - if err != nil { - return err - } - w.client = &http.Client{Transport: wt} - } - - return nil -} - -// nextLocation extracts the fully-qualified URL to which we should send the next request in an upload sequence. -func (w *writer) nextLocation(resp *http.Response) (string, error) { - loc := resp.Header.Get("Location") - if len(loc) == 0 { - return "", errors.New("missing Location header") - } - u, err := url.Parse(loc) - if err != nil { - return "", err - } - - // If the location header returned is just a url path, then fully qualify it. - // We cannot simply call w.url, since there might be an embedded query string. - return resp.Request.URL.ResolveReference(u).String(), nil -} - -// checkExistingBlob checks if a blob exists already in the repository by making a -// HEAD request to the blob store API. GCR performs an existence check on the -// initiation if "mount" is specified, even if no "from" sources are specified. -// However, this is not broadly applicable to all registries, e.g. ECR. -func (w *writer) checkExistingBlob(ctx context.Context, h v1.Hash) (bool, error) { - u := w.url(fmt.Sprintf("/v2/%s/blobs/%s", w.repo.RepositoryStr(), h.String())) - - req, err := http.NewRequest(http.MethodHead, u.String(), nil) - if err != nil { - return false, err - } - - resp, err := w.client.Do(req.WithContext(ctx)) - if err != nil { - return false, err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK, http.StatusNotFound); err != nil { - return false, err - } - - return resp.StatusCode == http.StatusOK, nil -} - -// initiateUpload initiates the blob upload, which starts with a POST that can -// optionally include the hash of the layer and a list of repositories from -// which that layer might be read. On failure, an error is returned. -// On success, the layer was either mounted (nothing more to do) or a blob -// upload was initiated and the body of that blob should be sent to the returned -// location. -func (w *writer) initiateUpload(ctx context.Context, from, mount, origin string) (location string, mounted bool, err error) { - u := w.url(fmt.Sprintf("/v2/%s/blobs/uploads/", w.repo.RepositoryStr())) - uv := url.Values{} - if mount != "" && from != "" { - // Quay will fail if we specify a "mount" without a "from". - uv.Set("mount", mount) - uv.Set("from", from) - if origin != "" { - uv.Set("origin", origin) - } - } - u.RawQuery = uv.Encode() - - // Make the request to initiate the blob upload. - req, err := http.NewRequest(http.MethodPost, u.String(), nil) - if err != nil { - return "", false, err - } - req.Header.Set("Content-Type", "application/json") - resp, err := w.client.Do(req.WithContext(ctx)) - if err != nil { - if from != "" { - // https://github.com/google/go-containerregistry/issues/1679 - logs.Warn.Printf("retrying without mount: %v", err) - return w.initiateUpload(ctx, "", "", "") - } - return "", false, err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusCreated, http.StatusAccepted); err != nil { - if from != "" { - // https://github.com/google/go-containerregistry/issues/1404 - logs.Warn.Printf("retrying without mount: %v", err) - return w.initiateUpload(ctx, "", "", "") - } - return "", false, err - } - - // Check the response code to determine the result. - switch resp.StatusCode { - case http.StatusCreated: - // We're done, we were able to fast-path. - return "", true, nil - case http.StatusAccepted: - // Proceed to PATCH, upload has begun. - loc, err := w.nextLocation(resp) - return loc, false, err - default: - panic("Unreachable: initiateUpload") - } -} - -// streamBlob streams the contents of the blob to the specified location. -// On failure, this will return an error. On success, this will return the location -// header indicating how to commit the streamed blob. -func (w *writer) streamBlob(ctx context.Context, layer v1.Layer, streamLocation string) (commitLocation string, rerr error) { - reset := func() {} - defer func() { - if rerr != nil { - reset() - } - }() - blob, err := layer.Compressed() - if err != nil { - return "", err - } - - getBody := layer.Compressed - if w.progress != nil { - var count int64 - blob = &progressReader{rc: blob, progress: w.progress, count: &count} - getBody = func() (io.ReadCloser, error) { - blob, err := layer.Compressed() - if err != nil { - return nil, err - } - return &progressReader{rc: blob, progress: w.progress, count: &count}, nil - } - reset = func() { - w.progress.complete(-count) - } - } - - req, err := http.NewRequest(http.MethodPatch, streamLocation, blob) - if err != nil { - return "", err - } - if _, ok := layer.(*stream.Layer); !ok { - // We can't retry streaming layers. - req.GetBody = getBody - - // If we know the size, set it. - if size, err := layer.Size(); err == nil { - req.ContentLength = size - } - } - req.Header.Set("Content-Type", "application/octet-stream") - - resp, err := w.client.Do(req.WithContext(ctx)) - if err != nil { - return "", err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusNoContent, http.StatusAccepted, http.StatusCreated); err != nil { - return "", err - } - - // The blob has been uploaded, return the location header indicating - // how to commit this layer. - return w.nextLocation(resp) -} - -// commitBlob commits this blob by sending a PUT to the location returned from -// streaming the blob. -func (w *writer) commitBlob(ctx context.Context, location, digest string) error { - u, err := url.Parse(location) - if err != nil { - return err - } - v := u.Query() - v.Set("digest", digest) - u.RawQuery = v.Encode() - - req, err := http.NewRequest(http.MethodPut, u.String(), nil) - if err != nil { - return err - } - req.Header.Set("Content-Type", "application/octet-stream") - - resp, err := w.client.Do(req.WithContext(ctx)) - if err != nil { - return err - } - defer resp.Body.Close() - - return transport.CheckError(resp, http.StatusCreated) -} - -// incrProgress increments and sends a progress update, if WithProgress is used. -func (w *writer) incrProgress(written int64) { - if w.progress == nil { - return - } - w.progress.complete(written) -} - -// uploadOne performs a complete upload of a single layer. -func (w *writer) uploadOne(ctx context.Context, l v1.Layer) error { - tryUpload := func() error { - ctx := retry.Never(ctx) - var from, mount, origin string - if h, err := l.Digest(); err == nil { - // If we know the digest, this isn't a streaming layer. Do an existence - // check so we can skip uploading the layer if possible. - existing, err := w.checkExistingBlob(ctx, h) - if err != nil { - return err - } - if existing { - size, err := l.Size() - if err != nil { - return err - } - w.incrProgress(size) - logs.Progress.Printf("existing blob: %v", h) - return nil - } - - mount = h.String() - } - if ml, ok := l.(*MountableLayer); ok { - if err := w.maybeUpdateScopes(ctx, ml); err != nil { - return err - } - - from = ml.Reference.Context().RepositoryStr() - origin = ml.Reference.Context().RegistryStr() - - // This keeps breaking with DockerHub. - // https://github.com/google/go-containerregistry/issues/1741 - if w.repo.RegistryStr() == name.DefaultRegistry && origin != w.repo.RegistryStr() { - from = "" - origin = "" - } - } - - location, mounted, err := w.initiateUpload(ctx, from, mount, origin) - if err != nil { - return err - } else if mounted { - size, err := l.Size() - if err != nil { - return err - } - w.incrProgress(size) - h, err := l.Digest() - if err != nil { - return err - } - logs.Progress.Printf("mounted blob: %s", h.String()) - return nil - } - - // Only log layers with +json or +yaml. We can let through other stuff if it becomes popular. - // TODO(opencontainers/image-spec#791): Would be great to have an actual parser. - mt, err := l.MediaType() - if err != nil { - return err - } - smt := string(mt) - if !(strings.HasSuffix(smt, "+json") || strings.HasSuffix(smt, "+yaml")) { - ctx = redact.NewContext(ctx, "omitting binary blobs from logs") - } - - location, err = w.streamBlob(ctx, l, location) - if err != nil { - return err - } - - h, err := l.Digest() - if err != nil { - return err - } - digest := h.String() - - if err := w.commitBlob(ctx, location, digest); err != nil { - return err - } - logs.Progress.Printf("pushed blob: %s", digest) - return nil - } - - return retry.Retry(tryUpload, w.predicate, w.backoff) -} - -type withMediaType interface { - MediaType() (types.MediaType, error) -} - -// This is really silly, but go interfaces don't let me satisfy remote.Taggable -// with remote.Descriptor because of name collisions between method names and -// struct fields. -// -// Use reflection to either pull the v1.Descriptor out of remote.Descriptor or -// create a descriptor based on the RawManifest and (optionally) MediaType. -func unpackTaggable(t Taggable) ([]byte, *v1.Descriptor, error) { - if d, ok := t.(*Descriptor); ok { - return d.Manifest, &d.Descriptor, nil - } - b, err := t.RawManifest() - if err != nil { - return nil, nil, err - } - - // A reasonable default if Taggable doesn't implement MediaType. - mt := types.DockerManifestSchema2 - - if wmt, ok := t.(withMediaType); ok { - m, err := wmt.MediaType() - if err != nil { - return nil, nil, err - } - mt = m - } - - h, sz, err := v1.SHA256(bytes.NewReader(b)) - if err != nil { - return nil, nil, err - } - - return b, &v1.Descriptor{ - MediaType: mt, - Size: sz, - Digest: h, - }, nil -} - -// commitSubjectReferrers is responsible for updating the fallback tag manifest to track descriptors referring to a subject for registries that don't yet support the Referrers API. -// TODO: use conditional requests to avoid race conditions -func (w *writer) commitSubjectReferrers(ctx context.Context, sub name.Digest, add v1.Descriptor) error { - // Check if the registry supports Referrers API. - // TODO: This should be done once per registry, not once per subject. - u := w.url(fmt.Sprintf("/v2/%s/referrers/%s", w.repo.RepositoryStr(), sub.DigestStr())) - req, err := http.NewRequest(http.MethodGet, u.String(), nil) - if err != nil { - return err - } - req.Header.Set("Accept", string(types.OCIImageIndex)) - resp, err := w.client.Do(req.WithContext(ctx)) - if err != nil { - return err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK, http.StatusNotFound, http.StatusBadRequest); err != nil { - return err - } - if resp.StatusCode == http.StatusOK { - // The registry supports Referrers API. The registry is responsible for updating the referrers list. - return nil - } - - // The registry doesn't support Referrers API, we need to update the manifest tagged with the fallback tag. - // Make the request to GET the current manifest. - t := fallbackTag(sub) - u = w.url(fmt.Sprintf("/v2/%s/manifests/%s", w.repo.RepositoryStr(), t.Identifier())) - req, err = http.NewRequest(http.MethodGet, u.String(), nil) - if err != nil { - return err - } - req.Header.Set("Accept", string(types.OCIImageIndex)) - resp, err = w.client.Do(req.WithContext(ctx)) - if err != nil { - return err - } - defer resp.Body.Close() - - var im v1.IndexManifest - if err := transport.CheckError(resp, http.StatusOK, http.StatusNotFound); err != nil { - return err - } else if resp.StatusCode == http.StatusNotFound { - // Not found just means there are no attachments. Start with an empty index. - im = v1.IndexManifest{ - SchemaVersion: 2, - MediaType: types.OCIImageIndex, - Manifests: []v1.Descriptor{add}, - } - } else { - if err := json.NewDecoder(resp.Body).Decode(&im); err != nil { - return err - } - if im.SchemaVersion != 2 { - return fmt.Errorf("fallback tag manifest is not a schema version 2: %d", im.SchemaVersion) - } - if im.MediaType != types.OCIImageIndex { - return fmt.Errorf("fallback tag manifest is not an OCI image index: %s", im.MediaType) - } - for _, desc := range im.Manifests { - if desc.Digest == add.Digest { - // The digest is already attached, nothing to do. - logs.Progress.Printf("fallback tag %s already had referrer", t.Identifier()) - return nil - } - } - // Append the new descriptor to the index. - im.Manifests = append(im.Manifests, add) - } - - // Sort the manifests for reproducibility. - sort.Slice(im.Manifests, func(i, j int) bool { - return im.Manifests[i].Digest.String() < im.Manifests[j].Digest.String() - }) - logs.Progress.Printf("updating fallback tag %s with new referrer", t.Identifier()) - return w.commitManifest(ctx, fallbackTaggable{im}, t) -} - -type fallbackTaggable struct { - im v1.IndexManifest -} - -func (f fallbackTaggable) RawManifest() ([]byte, error) { return json.Marshal(f.im) } -func (f fallbackTaggable) MediaType() (types.MediaType, error) { return types.OCIImageIndex, nil } - -// commitManifest does a PUT of the image's manifest. -func (w *writer) commitManifest(ctx context.Context, t Taggable, ref name.Reference) error { - // If the manifest refers to a subject, we need to check whether we need to update the fallback tag manifest. - raw, err := t.RawManifest() - if err != nil { - return err - } - var mf struct { - MediaType types.MediaType `json:"mediaType"` - Subject *v1.Descriptor `json:"subject,omitempty"` - Config struct { - MediaType types.MediaType `json:"mediaType"` - } `json:"config"` - } - if err := json.Unmarshal(raw, &mf); err != nil { - return err - } - - tryUpload := func() error { - ctx := retry.Never(ctx) - raw, desc, err := unpackTaggable(t) - if err != nil { - return err - } - - u := w.url(fmt.Sprintf("/v2/%s/manifests/%s", w.repo.RepositoryStr(), ref.Identifier())) - - // Make the request to PUT the serialized manifest - req, err := http.NewRequest(http.MethodPut, u.String(), bytes.NewBuffer(raw)) - if err != nil { - return err - } - req.Header.Set("Content-Type", string(desc.MediaType)) - - resp, err := w.client.Do(req.WithContext(ctx)) - if err != nil { - return err - } - defer resp.Body.Close() - - if err := transport.CheckError(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted); err != nil { - return err - } - - // If the manifest referred to a subject, we may need to update the fallback tag manifest. - // TODO: If this fails, we'll retry the whole upload. We should retry just this part. - if mf.Subject != nil { - h, size, err := v1.SHA256(bytes.NewReader(raw)) - if err != nil { - return err - } - desc := v1.Descriptor{ - ArtifactType: string(mf.Config.MediaType), - MediaType: mf.MediaType, - Digest: h, - Size: size, - } - if err := w.commitSubjectReferrers(ctx, - ref.Context().Digest(mf.Subject.Digest.String()), - desc); err != nil { - return err - } - } - - // The image was successfully pushed! - logs.Progress.Printf("%v: digest: %v size: %d", ref, desc.Digest, desc.Size) - w.incrProgress(int64(len(raw))) - return nil - } - - return retry.Retry(tryUpload, w.predicate, w.backoff) -} - -func scopesForUploadingImage(repo name.Repository, layers []v1.Layer) []string { - // use a map as set to remove duplicates scope strings - scopeSet := map[string]struct{}{} - - for _, l := range layers { - if ml, ok := l.(*MountableLayer); ok { - // we will add push scope for ref.Context() after the loop. - // for now we ask pull scope for references of the same registry - if ml.Reference.Context().String() != repo.String() && ml.Reference.Context().Registry.String() == repo.Registry.String() { - scopeSet[ml.Reference.Scope(transport.PullScope)] = struct{}{} - } - } - } - - scopes := make([]string, 0) - // Push scope should be the first element because a few registries just look at the first scope to determine access. - scopes = append(scopes, repo.Scope(transport.PushScope)) - - for scope := range scopeSet { - scopes = append(scopes, scope) - } - - return scopes -} - -// WriteIndex pushes the provided ImageIndex to the specified image reference. -// WriteIndex will attempt to push all of the referenced manifests before -// attempting to push the ImageIndex, to retain referential integrity. -func WriteIndex(ref name.Reference, ii v1.ImageIndex, options ...Option) (rerr error) { - o, err := makeOptions(options...) - if err != nil { - return err - } - if o.progress != nil { - defer func() { o.progress.Close(rerr) }() - } - return newPusher(o).Push(o.context, ref, ii) -} - -// WriteLayer uploads the provided Layer to the specified repo. -func WriteLayer(repo name.Repository, layer v1.Layer, options ...Option) (rerr error) { - o, err := makeOptions(options...) - if err != nil { - return err - } - if o.progress != nil { - defer func() { o.progress.Close(rerr) }() - } - return newPusher(o).Upload(o.context, repo, layer) -} - -// Tag adds a tag to the given Taggable via PUT /v2/.../manifests/ -// -// Notable implementations of Taggable are v1.Image, v1.ImageIndex, and -// remote.Descriptor. -// -// If t implements MediaType, we will use that for the Content-Type, otherwise -// we will default to types.DockerManifestSchema2. -// -// Tag does not attempt to write anything other than the manifest, so callers -// should ensure that all blobs or manifests that are referenced by t exist -// in the target registry. -func Tag(tag name.Tag, t Taggable, options ...Option) error { - return Put(tag, t, options...) -} - -// Put adds a manifest from the given Taggable via PUT /v1/.../manifest/ -// -// Notable implementations of Taggable are v1.Image, v1.ImageIndex, and -// remote.Descriptor. -// -// If t implements MediaType, we will use that for the Content-Type, otherwise -// we will default to types.DockerManifestSchema2. -// -// Put does not attempt to write anything other than the manifest, so callers -// should ensure that all blobs or manifests that are referenced by t exist -// in the target registry. -func Put(ref name.Reference, t Taggable, options ...Option) error { - o, err := makeOptions(options...) - if err != nil { - return err - } - return newPusher(o).Push(o.context, ref, t) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/stream/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/stream/README.md deleted file mode 100644 index da0dda48..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/stream/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# `stream` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/stream?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/stream) - -The `stream` package contains an implementation of -[`v1.Layer`](https://godoc.org/github.com/google/go-containerregistry/pkg/v1#Layer) -that supports _streaming_ access, i.e. the layer contents are read once and not -buffered. - -## Usage - -```go -package main - -import ( - "os" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/google/go-containerregistry/pkg/v1/stream" -) - -// upload the contents of stdin as a layer to a local registry -func main() { - repo, err := name.NewRepository("localhost:5000/stream") - if err != nil { - panic(err) - } - - layer := stream.NewLayer(os.Stdin) - - if err := remote.WriteLayer(repo, layer); err != nil { - panic(err) - } -} -``` - -## Structure - -This implements the layer portion of an [image -upload](/pkg/v1/remote#anatomy-of-an-image-upload). We launch a goroutine that -is responsible for hashing the uncompressed contents to compute the `DiffID`, -gzipping them to produce the `Compressed` contents, and hashing/counting the -bytes to produce the `Digest`/`Size`. This goroutine writes to an -`io.PipeWriter`, which blocks until `Compressed` reads the gzipped contents from -the corresponding `io.PipeReader`. - -

- -

- -## Caveats - -This assumes that you have an uncompressed layer (i.e. a tarball) and would like -to compress it. Calling `Uncompressed` is always an error. Likewise, other -methods are invalid until the contents of `Compressed` have been completely -consumed and `Close`d. - -Using a `stream.Layer` will likely not work without careful consideration. For -example, in the `mutate` package, we defer computing the manifest and config -file until they are actually called. This allows you to `mutate.Append` a -streaming layer to an image without accidentally consuming it. Similarly, in -`remote.Write`, if calling `Digest` on a layer fails, we attempt to upload the -layer anyway, understanding that we may be dealing with a `stream.Layer` whose -contents need to be uploaded before we can upload the config file. - -Given the [structure](#structure) of how this is implemented, forgetting to -`Close` a `stream.Layer` will leak a goroutine. diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.go b/vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.go deleted file mode 100644 index 2b035447..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/stream/layer.go +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 stream implements a single-pass streaming v1.Layer. -package stream - -import ( - "bufio" - "compress/gzip" - "crypto" - "encoding/hex" - "errors" - "hash" - "io" - "os" - "sync" - - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -var ( - // ErrNotComputed is returned when the requested value is not yet - // computed because the stream has not been consumed yet. - ErrNotComputed = errors.New("value not computed until stream is consumed") - - // ErrConsumed is returned by Compressed when the underlying stream has - // already been consumed and closed. - ErrConsumed = errors.New("stream was already consumed") -) - -// Layer is a streaming implementation of v1.Layer. -type Layer struct { - blob io.ReadCloser - consumed bool - compression int - - mu sync.Mutex - digest, diffID *v1.Hash - size int64 - mediaType types.MediaType -} - -var _ v1.Layer = (*Layer)(nil) - -// LayerOption applies options to layer -type LayerOption func(*Layer) - -// WithCompressionLevel sets the gzip compression. See `gzip.NewWriterLevel` for possible values. -func WithCompressionLevel(level int) LayerOption { - return func(l *Layer) { - l.compression = level - } -} - -// WithMediaType is a functional option for overriding the layer's media type. -func WithMediaType(mt types.MediaType) LayerOption { - return func(l *Layer) { - l.mediaType = mt - } -} - -// NewLayer creates a Layer from an io.ReadCloser. -func NewLayer(rc io.ReadCloser, opts ...LayerOption) *Layer { - layer := &Layer{ - blob: rc, - compression: gzip.BestSpeed, - // We use DockerLayer for now as uncompressed layers - // are unimplemented - mediaType: types.DockerLayer, - } - - for _, opt := range opts { - opt(layer) - } - - return layer -} - -// Digest implements v1.Layer. -func (l *Layer) Digest() (v1.Hash, error) { - l.mu.Lock() - defer l.mu.Unlock() - if l.digest == nil { - return v1.Hash{}, ErrNotComputed - } - return *l.digest, nil -} - -// DiffID implements v1.Layer. -func (l *Layer) DiffID() (v1.Hash, error) { - l.mu.Lock() - defer l.mu.Unlock() - if l.diffID == nil { - return v1.Hash{}, ErrNotComputed - } - return *l.diffID, nil -} - -// Size implements v1.Layer. -func (l *Layer) Size() (int64, error) { - l.mu.Lock() - defer l.mu.Unlock() - if l.size == 0 { - return 0, ErrNotComputed - } - return l.size, nil -} - -// MediaType implements v1.Layer -func (l *Layer) MediaType() (types.MediaType, error) { - return l.mediaType, nil -} - -// Uncompressed implements v1.Layer. -func (l *Layer) Uncompressed() (io.ReadCloser, error) { - return nil, errors.New("NYI: stream.Layer.Uncompressed is not implemented") -} - -// Compressed implements v1.Layer. -func (l *Layer) Compressed() (io.ReadCloser, error) { - l.mu.Lock() - defer l.mu.Unlock() - if l.consumed { - return nil, ErrConsumed - } - return newCompressedReader(l) -} - -// finalize sets the layer to consumed and computes all hash and size values. -func (l *Layer) finalize(uncompressed, compressed hash.Hash, size int64) error { - l.mu.Lock() - defer l.mu.Unlock() - - diffID, err := v1.NewHash("sha256:" + hex.EncodeToString(uncompressed.Sum(nil))) - if err != nil { - return err - } - l.diffID = &diffID - - digest, err := v1.NewHash("sha256:" + hex.EncodeToString(compressed.Sum(nil))) - if err != nil { - return err - } - l.digest = &digest - - l.size = size - l.consumed = true - return nil -} - -type compressedReader struct { - pr io.Reader - closer func() error -} - -func newCompressedReader(l *Layer) (*compressedReader, error) { - // Collect digests of compressed and uncompressed stream and size of - // compressed stream. - h := crypto.SHA256.New() - zh := crypto.SHA256.New() - count := &countWriter{} - - // gzip.Writer writes to the output stream via pipe, a hasher to - // capture compressed digest, and a countWriter to capture compressed - // size. - pr, pw := io.Pipe() - - // Write compressed bytes to be read by the pipe.Reader, hashed by zh, and counted by count. - mw := io.MultiWriter(pw, zh, count) - - // Buffer the output of the gzip writer so we don't have to wait on pr to keep writing. - // 64K ought to be small enough for anybody. - bw := bufio.NewWriterSize(mw, 2<<16) - zw, err := gzip.NewWriterLevel(bw, l.compression) - if err != nil { - return nil, err - } - - doneDigesting := make(chan struct{}) - - cr := &compressedReader{ - pr: pr, - closer: func() error { - // Immediately close pw without error. There are three ways to get - // here. - // - // 1. There was a copy error due from the underlying reader, in which - // case the error will not be overwritten. - // 2. Copying from the underlying reader completed successfully. - // 3. Close has been called before the underlying reader has been - // fully consumed. In this case pw must be closed in order to - // keep the flush of bw from blocking indefinitely. - // - // NOTE: pw.Close never returns an error. The signature is only to - // implement io.Closer. - _ = pw.Close() - - // Close the inner ReadCloser. - // - // NOTE: net/http will call close on success, so if we've already - // closed the inner rc, it's not an error. - if err := l.blob.Close(); err != nil && !errors.Is(err, os.ErrClosed) { - return err - } - - // Finalize layer with its digest and size values. - <-doneDigesting - return l.finalize(h, zh, count.n) - }, - } - go func() { - // Copy blob into the gzip writer, which also hashes and counts the - // size of the compressed output, and hasher of the raw contents. - _, copyErr := io.Copy(io.MultiWriter(h, zw), l.blob) - - // Close the gzip writer once copying is done. If this is done in the - // Close method of compressedReader instead, then it can cause a panic - // when the compressedReader is closed before the blob is fully - // consumed and io.Copy in this goroutine is still blocking. - closeErr := zw.Close() - - // Check errors from writing and closing streams. - if copyErr != nil { - close(doneDigesting) - pw.CloseWithError(copyErr) - return - } - if closeErr != nil { - close(doneDigesting) - pw.CloseWithError(closeErr) - return - } - - // Flush the buffer once all writes are complete to the gzip writer. - if err := bw.Flush(); err != nil { - close(doneDigesting) - pw.CloseWithError(err) - return - } - - // Notify closer that digests are done being written. - close(doneDigesting) - - // Close the compressed reader to calculate digest/diffID/size. This - // will cause pr to return EOF which will cause readers of the - // Compressed stream to finish reading. - pw.CloseWithError(cr.Close()) - }() - - return cr, nil -} - -func (cr *compressedReader) Read(b []byte) (int, error) { return cr.pr.Read(b) } - -func (cr *compressedReader) Close() error { return cr.closer() } - -// countWriter counts bytes written to it. -type countWriter struct{ n int64 } - -func (c *countWriter) Write(p []byte) (int, error) { - c.n += int64(len(p)) - return len(p), nil -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/README.md b/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/README.md deleted file mode 100644 index 03f339b0..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/README.md +++ /dev/null @@ -1,280 +0,0 @@ -# `tarball` - -[![GoDoc](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/tarball?status.svg)](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/tarball) - -This package produces tarballs that can consumed via `docker load`. Note -that this is a _different_ format from the [`legacy`](/pkg/legacy/tarball) -tarballs that are produced by `docker save`, but this package is still able to -read the legacy tarballs produced by `docker save`. - -## Usage - -```go -package main - -import ( - "os" - - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/tarball" -) - -func main() { - // Read a tarball from os.Args[1] that contains ubuntu. - tag, err := name.NewTag("ubuntu") - if err != nil { - panic(err) - } - img, err := tarball.ImageFromPath(os.Args[1], &tag) - if err != nil { - panic(err) - } - - // Write that tarball to os.Args[2] with a different tag. - newTag, err := name.NewTag("ubuntu:newest") - if err != nil { - panic(err) - } - f, err := os.Create(os.Args[2]) - if err != nil { - panic(err) - } - defer f.Close() - - if err := tarball.Write(newTag, img, f); err != nil { - panic(err) - } -} -``` - -## Structure - -

- -

- -Let's look at what happens when we write out a tarball: - - -### `ubuntu:latest` - -``` -$ crane pull ubuntu ubuntu.tar && mkdir ubuntu && tar xf ubuntu.tar -C ubuntu && rm ubuntu.tar -$ tree ubuntu/ -ubuntu/ -├── 423ae2b273f4c17ceee9e8482fa8d071d90c7d052ae208e1fe4963fceb3d6954.tar.gz -├── b6b53be908de2c0c78070fff0a9f04835211b3156c4e73785747af365e71a0d7.tar.gz -├── de83a2304fa1f7c4a13708a0d15b9704f5945c2be5cbb2b3ed9b2ccb718d0b3d.tar.gz -├── f9a83bce3af0648efaa60b9bb28225b09136d2d35d0bed25ac764297076dec1b.tar.gz -├── manifest.json -└── sha256:72300a873c2ca11c70d0c8642177ce76ff69ae04d61a5813ef58d40ff66e3e7c - -0 directories, 6 files -``` - -There are a couple interesting files here. - -`manifest.json` is the entrypoint: a list of [`tarball.Descriptor`s](https://godoc.org/github.com/google/go-containerregistry/pkg/v1/tarball#Descriptor) -that describe the images contained in this tarball. - -For each image, this has the `RepoTags` (how it was pulled), a `Config` file -that points to the image's config file, a list of `Layers`, and (optionally) -`LayerSources`. - -``` -$ jq < ubuntu/manifest.json -[ - { - "Config": "sha256:72300a873c2ca11c70d0c8642177ce76ff69ae04d61a5813ef58d40ff66e3e7c", - "RepoTags": [ - "ubuntu" - ], - "Layers": [ - "423ae2b273f4c17ceee9e8482fa8d071d90c7d052ae208e1fe4963fceb3d6954.tar.gz", - "de83a2304fa1f7c4a13708a0d15b9704f5945c2be5cbb2b3ed9b2ccb718d0b3d.tar.gz", - "f9a83bce3af0648efaa60b9bb28225b09136d2d35d0bed25ac764297076dec1b.tar.gz", - "b6b53be908de2c0c78070fff0a9f04835211b3156c4e73785747af365e71a0d7.tar.gz" - ] - } -] -``` - -The config file and layers are exactly what you would expect, and match the -registry representations of the same artifacts. You'll notice that the -`manifest.json` contains similar information as the registry manifest, but isn't -quite the same: - -``` -$ crane manifest ubuntu@sha256:0925d086715714114c1988f7c947db94064fd385e171a63c07730f1fa014e6f9 -{ - "schemaVersion": 2, - "mediaType": "application/vnd.docker.distribution.manifest.v2+json", - "config": { - "mediaType": "application/vnd.docker.container.image.v1+json", - "size": 3408, - "digest": "sha256:72300a873c2ca11c70d0c8642177ce76ff69ae04d61a5813ef58d40ff66e3e7c" - }, - "layers": [ - { - "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", - "size": 26692096, - "digest": "sha256:423ae2b273f4c17ceee9e8482fa8d071d90c7d052ae208e1fe4963fceb3d6954" - }, - { - "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", - "size": 35365, - "digest": "sha256:de83a2304fa1f7c4a13708a0d15b9704f5945c2be5cbb2b3ed9b2ccb718d0b3d" - }, - { - "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", - "size": 852, - "digest": "sha256:f9a83bce3af0648efaa60b9bb28225b09136d2d35d0bed25ac764297076dec1b" - }, - { - "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", - "size": 163, - "digest": "sha256:b6b53be908de2c0c78070fff0a9f04835211b3156c4e73785747af365e71a0d7" - } - ] -} -``` - -This makes it difficult to maintain image digests when roundtripping images -through the tarball format, so it's not a great format if you care about -provenance. - -The ubuntu example didn't have any `LayerSources` -- let's look at another image -that does. - -### `hello-world:nanoserver` - -``` -$ crane pull hello-world:nanoserver@sha256:63c287625c2b0b72900e562de73c0e381472a83b1b39217aef3856cd398eca0b nanoserver.tar -$ mkdir nanoserver && tar xf nanoserver.tar -C nanoserver && rm nanoserver.tar -$ tree nanoserver/ -nanoserver/ -├── 10d1439be4eb8819987ec2e9c140d44d74d6b42a823d57fe1953bd99948e1bc0.tar.gz -├── a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053.tar.gz -├── be21f08f670160cbae227e3053205b91d6bfa3de750b90c7e00bd2c511ccb63a.tar.gz -├── manifest.json -└── sha256:bc5d255ea81f83c8c38a982a6d29a6f2198427d258aea5f166e49856896b2da6 - -0 directories, 5 files - -$ jq < nanoserver/manifest.json -[ - { - "Config": "sha256:bc5d255ea81f83c8c38a982a6d29a6f2198427d258aea5f166e49856896b2da6", - "RepoTags": [ - "index.docker.io/library/hello-world:i-was-a-digest" - ], - "Layers": [ - "a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053.tar.gz", - "be21f08f670160cbae227e3053205b91d6bfa3de750b90c7e00bd2c511ccb63a.tar.gz", - "10d1439be4eb8819987ec2e9c140d44d74d6b42a823d57fe1953bd99948e1bc0.tar.gz" - ], - "LayerSources": { - "sha256:26fd2d9d4c64a4f965bbc77939a454a31b607470f430b5d69fc21ded301fa55e": { - "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip", - "size": 101145811, - "digest": "sha256:a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053", - "urls": [ - "https://mcr.microsoft.com/v2/windows/nanoserver/blobs/sha256:a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053" - ] - } - } - } -] -``` - -A couple things to note about this `manifest.json` versus the other: -* The `RepoTags` field is a bit weird here. `hello-world` is a multi-platform - image, so We had to pull this image by digest, since we're (I'm) on - amd64/linux and wanted to grab a windows image. Since the tarball format - expects a tag under `RepoTags`, and we didn't pull by tag, we replace the - digest with a sentinel `i-was-a-digest` "tag" to appease docker. -* The `LayerSources` has enough information to reconstruct the foreign layers - pointer when pushing/pulling from the registry. For legal reasons, microsoft - doesn't want anyone but them to serve windows base images, so the mediaType - here indicates a "foreign" or "non-distributable" layer with an URL for where - you can download it from microsoft (see the [OCI - image-spec](https://github.com/opencontainers/image-spec/blob/master/layer.md#non-distributable-layers)). - -We can look at what's in the registry to explain both of these things: -``` -$ crane manifest hello-world:nanoserver | jq . -{ - "manifests": [ - { - "digest": "sha256:63c287625c2b0b72900e562de73c0e381472a83b1b39217aef3856cd398eca0b", - "mediaType": "application/vnd.docker.distribution.manifest.v2+json", - "platform": { - "architecture": "amd64", - "os": "windows", - "os.version": "10.0.17763.1040" - }, - "size": 1124 - } - ], - "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", - "schemaVersion": 2 -} - - -# Note the media type and "urls" field. -$ crane manifest hello-world:nanoserver@sha256:63c287625c2b0b72900e562de73c0e381472a83b1b39217aef3856cd398eca0b | jq . -{ - "schemaVersion": 2, - "mediaType": "application/vnd.docker.distribution.manifest.v2+json", - "config": { - "mediaType": "application/vnd.docker.container.image.v1+json", - "size": 1721, - "digest": "sha256:bc5d255ea81f83c8c38a982a6d29a6f2198427d258aea5f166e49856896b2da6" - }, - "layers": [ - { - "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip", - "size": 101145811, - "digest": "sha256:a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053", - "urls": [ - "https://mcr.microsoft.com/v2/windows/nanoserver/blobs/sha256:a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053" - ] - }, - { - "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", - "size": 1669, - "digest": "sha256:be21f08f670160cbae227e3053205b91d6bfa3de750b90c7e00bd2c511ccb63a" - }, - { - "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", - "size": 949, - "digest": "sha256:10d1439be4eb8819987ec2e9c140d44d74d6b42a823d57fe1953bd99948e1bc0" - } - ] -} -``` - -The `LayerSources` map is keyed by the diffid. Note that `sha256:26fd2d9d4c64a4f965bbc77939a454a31b607470f430b5d69fc21ded301fa55e` matches the first layer in the config file: -``` -$ jq '.[0].LayerSources' < nanoserver/manifest.json -{ - "sha256:26fd2d9d4c64a4f965bbc77939a454a31b607470f430b5d69fc21ded301fa55e": { - "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip", - "size": 101145811, - "digest": "sha256:a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053", - "urls": [ - "https://mcr.microsoft.com/v2/windows/nanoserver/blobs/sha256:a35da61c356213336e646756218539950461ff2bf096badf307a23add6e70053" - ] - } -} - -$ jq < nanoserver/sha256\:bc5d255ea81f83c8c38a982a6d29a6f2198427d258aea5f166e49856896b2da6 | jq .rootfs -{ - "type": "layers", - "diff_ids": [ - "sha256:26fd2d9d4c64a4f965bbc77939a454a31b607470f430b5d69fc21ded301fa55e", - "sha256:601cf7d78c62e4b4d32a7bbf96a17606a9cea5bd9d22ffa6f34aa431d056b0e8", - "sha256:a1e1a3bf6529adcce4d91dce2cad86c2604a66b507ccbc4d2239f3da0ec5aab9" - ] -} -``` diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.go b/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.go deleted file mode 100644 index 4eb79bb4..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 tarball provides facilities for reading/writing v1.Images from/to -// a tarball on-disk. -package tarball diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.go b/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.go deleted file mode 100644 index c984f3c8..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/image.go +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 tarball - -import ( - "archive/tar" - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "os" - "path" - "path/filepath" - "sync" - - comp "github.com/google/go-containerregistry/internal/compression" - "github.com/google/go-containerregistry/pkg/compression" - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -type image struct { - opener Opener - manifest *Manifest - config []byte - imgDescriptor *Descriptor - - tag *name.Tag -} - -type uncompressedImage struct { - *image -} - -type compressedImage struct { - *image - manifestLock sync.Mutex // Protects manifest - manifest *v1.Manifest -} - -var _ partial.UncompressedImageCore = (*uncompressedImage)(nil) -var _ partial.CompressedImageCore = (*compressedImage)(nil) - -// Opener is a thunk for opening a tar file. -type Opener func() (io.ReadCloser, error) - -func pathOpener(path string) Opener { - return func() (io.ReadCloser, error) { - return os.Open(path) - } -} - -// ImageFromPath returns a v1.Image from a tarball located on path. -func ImageFromPath(path string, tag *name.Tag) (v1.Image, error) { - return Image(pathOpener(path), tag) -} - -// LoadManifest load manifest -func LoadManifest(opener Opener) (Manifest, error) { - m, err := extractFileFromTar(opener, "manifest.json") - if err != nil { - return nil, err - } - defer m.Close() - - var manifest Manifest - - if err := json.NewDecoder(m).Decode(&manifest); err != nil { - return nil, err - } - return manifest, nil -} - -// Image exposes an image from the tarball at the provided path. -func Image(opener Opener, tag *name.Tag) (v1.Image, error) { - img := &image{ - opener: opener, - tag: tag, - } - if err := img.loadTarDescriptorAndConfig(); err != nil { - return nil, err - } - - // Peek at the first layer and see if it's compressed. - if len(img.imgDescriptor.Layers) > 0 { - compressed, err := img.areLayersCompressed() - if err != nil { - return nil, err - } - if compressed { - c := compressedImage{ - image: img, - } - return partial.CompressedToImage(&c) - } - } - - uc := uncompressedImage{ - image: img, - } - return partial.UncompressedToImage(&uc) -} - -func (i *image) MediaType() (types.MediaType, error) { - return types.DockerManifestSchema2, nil -} - -// Descriptor stores the manifest data for a single image inside a `docker save` tarball. -type Descriptor struct { - Config string - RepoTags []string - Layers []string - - // Tracks foreign layer info. Key is DiffID. - LayerSources map[v1.Hash]v1.Descriptor `json:",omitempty"` -} - -// Manifest represents the manifests of all images as the `manifest.json` file in a `docker save` tarball. -type Manifest []Descriptor - -func (m Manifest) findDescriptor(tag *name.Tag) (*Descriptor, error) { - if tag == nil { - if len(m) != 1 { - return nil, errors.New("tarball must contain only a single image to be used with tarball.Image") - } - return &(m)[0], nil - } - for _, img := range m { - for _, tagStr := range img.RepoTags { - repoTag, err := name.NewTag(tagStr) - if err != nil { - return nil, err - } - - // Compare the resolved names, since there are several ways to specify the same tag. - if repoTag.Name() == tag.Name() { - return &img, nil - } - } - } - return nil, fmt.Errorf("tag %s not found in tarball", tag) -} - -func (i *image) areLayersCompressed() (bool, error) { - if len(i.imgDescriptor.Layers) == 0 { - return false, errors.New("0 layers found in image") - } - layer := i.imgDescriptor.Layers[0] - blob, err := extractFileFromTar(i.opener, layer) - if err != nil { - return false, err - } - defer blob.Close() - - cp, _, err := comp.PeekCompression(blob) - if err != nil { - return false, err - } - - return cp != compression.None, nil -} - -func (i *image) loadTarDescriptorAndConfig() error { - m, err := extractFileFromTar(i.opener, "manifest.json") - if err != nil { - return err - } - defer m.Close() - - if err := json.NewDecoder(m).Decode(&i.manifest); err != nil { - return err - } - - if i.manifest == nil { - return errors.New("no valid manifest.json in tarball") - } - - i.imgDescriptor, err = i.manifest.findDescriptor(i.tag) - if err != nil { - return err - } - - cfg, err := extractFileFromTar(i.opener, i.imgDescriptor.Config) - if err != nil { - return err - } - defer cfg.Close() - - i.config, err = io.ReadAll(cfg) - if err != nil { - return err - } - return nil -} - -func (i *image) RawConfigFile() ([]byte, error) { - return i.config, nil -} - -// tarFile represents a single file inside a tar. Closing it closes the tar itself. -type tarFile struct { - io.Reader - io.Closer -} - -func extractFileFromTar(opener Opener, filePath string) (io.ReadCloser, error) { - f, err := opener() - if err != nil { - return nil, err - } - needClose := true - defer func() { - if needClose { - f.Close() - } - }() - - tf := tar.NewReader(f) - for { - hdr, err := tf.Next() - if errors.Is(err, io.EOF) { - break - } - if err != nil { - return nil, err - } - if hdr.Name == filePath { - if hdr.Typeflag == tar.TypeSymlink || hdr.Typeflag == tar.TypeLink { - currentDir := filepath.Dir(filePath) - return extractFileFromTar(opener, path.Join(currentDir, path.Clean(hdr.Linkname))) - } - needClose = false - return tarFile{ - Reader: tf, - Closer: f, - }, nil - } - } - return nil, fmt.Errorf("file %s not found in tar", filePath) -} - -// uncompressedLayerFromTarball implements partial.UncompressedLayer -type uncompressedLayerFromTarball struct { - diffID v1.Hash - mediaType types.MediaType - opener Opener - filePath string -} - -// foreignUncompressedLayer implements partial.UncompressedLayer but returns -// a custom descriptor. This allows the foreign layer URLs to be included in -// the generated image manifest for uncompressed layers. -type foreignUncompressedLayer struct { - uncompressedLayerFromTarball - desc v1.Descriptor -} - -func (fl *foreignUncompressedLayer) Descriptor() (*v1.Descriptor, error) { - return &fl.desc, nil -} - -// DiffID implements partial.UncompressedLayer -func (ulft *uncompressedLayerFromTarball) DiffID() (v1.Hash, error) { - return ulft.diffID, nil -} - -// Uncompressed implements partial.UncompressedLayer -func (ulft *uncompressedLayerFromTarball) Uncompressed() (io.ReadCloser, error) { - return extractFileFromTar(ulft.opener, ulft.filePath) -} - -func (ulft *uncompressedLayerFromTarball) MediaType() (types.MediaType, error) { - return ulft.mediaType, nil -} - -func (i *uncompressedImage) LayerByDiffID(h v1.Hash) (partial.UncompressedLayer, error) { - cfg, err := partial.ConfigFile(i) - if err != nil { - return nil, err - } - for idx, diffID := range cfg.RootFS.DiffIDs { - if diffID == h { - // Technically the media type should be 'application/tar' but given that our - // v1.Layer doesn't force consumers to care about whether the layer is compressed - // we should be fine returning the DockerLayer media type - mt := types.DockerLayer - if bd, ok := i.imgDescriptor.LayerSources[h]; ok { - // Overwrite the mediaType for foreign layers. - return &foreignUncompressedLayer{ - uncompressedLayerFromTarball: uncompressedLayerFromTarball{ - diffID: diffID, - mediaType: bd.MediaType, - opener: i.opener, - filePath: i.imgDescriptor.Layers[idx], - }, - desc: bd, - }, nil - } - return &uncompressedLayerFromTarball{ - diffID: diffID, - mediaType: mt, - opener: i.opener, - filePath: i.imgDescriptor.Layers[idx], - }, nil - } - } - return nil, fmt.Errorf("diff id %q not found", h) -} - -func (c *compressedImage) Manifest() (*v1.Manifest, error) { - c.manifestLock.Lock() - defer c.manifestLock.Unlock() - if c.manifest != nil { - return c.manifest, nil - } - - b, err := c.RawConfigFile() - if err != nil { - return nil, err - } - - cfgHash, cfgSize, err := v1.SHA256(bytes.NewReader(b)) - if err != nil { - return nil, err - } - - c.manifest = &v1.Manifest{ - SchemaVersion: 2, - MediaType: types.DockerManifestSchema2, - Config: v1.Descriptor{ - MediaType: types.DockerConfigJSON, - Size: cfgSize, - Digest: cfgHash, - }, - } - - for i, p := range c.imgDescriptor.Layers { - cfg, err := partial.ConfigFile(c) - if err != nil { - return nil, err - } - diffid := cfg.RootFS.DiffIDs[i] - if d, ok := c.imgDescriptor.LayerSources[diffid]; ok { - // If it's a foreign layer, just append the descriptor so we can avoid - // reading the entire file. - c.manifest.Layers = append(c.manifest.Layers, d) - } else { - l, err := extractFileFromTar(c.opener, p) - if err != nil { - return nil, err - } - defer l.Close() - sha, size, err := v1.SHA256(l) - if err != nil { - return nil, err - } - c.manifest.Layers = append(c.manifest.Layers, v1.Descriptor{ - MediaType: types.DockerLayer, - Size: size, - Digest: sha, - }) - } - } - return c.manifest, nil -} - -func (c *compressedImage) RawManifest() ([]byte, error) { - return partial.RawManifest(c) -} - -// compressedLayerFromTarball implements partial.CompressedLayer -type compressedLayerFromTarball struct { - desc v1.Descriptor - opener Opener - filePath string -} - -// Digest implements partial.CompressedLayer -func (clft *compressedLayerFromTarball) Digest() (v1.Hash, error) { - return clft.desc.Digest, nil -} - -// Compressed implements partial.CompressedLayer -func (clft *compressedLayerFromTarball) Compressed() (io.ReadCloser, error) { - return extractFileFromTar(clft.opener, clft.filePath) -} - -// MediaType implements partial.CompressedLayer -func (clft *compressedLayerFromTarball) MediaType() (types.MediaType, error) { - return clft.desc.MediaType, nil -} - -// Size implements partial.CompressedLayer -func (clft *compressedLayerFromTarball) Size() (int64, error) { - return clft.desc.Size, nil -} - -func (c *compressedImage) LayerByDigest(h v1.Hash) (partial.CompressedLayer, error) { - m, err := c.Manifest() - if err != nil { - return nil, err - } - for i, l := range m.Layers { - if l.Digest == h { - fp := c.imgDescriptor.Layers[i] - return &compressedLayerFromTarball{ - desc: l, - opener: c.opener, - filePath: fp, - }, nil - } - } - return nil, fmt.Errorf("blob %v not found", h) -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.go b/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.go deleted file mode 100644 index 8a263096..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/layer.go +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 tarball - -import ( - "bytes" - "compress/gzip" - "fmt" - "io" - "os" - "sync" - - "github.com/containerd/stargz-snapshotter/estargz" - "github.com/google/go-containerregistry/internal/and" - comp "github.com/google/go-containerregistry/internal/compression" - gestargz "github.com/google/go-containerregistry/internal/estargz" - ggzip "github.com/google/go-containerregistry/internal/gzip" - "github.com/google/go-containerregistry/internal/zstd" - "github.com/google/go-containerregistry/pkg/compression" - "github.com/google/go-containerregistry/pkg/logs" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/types" -) - -type layer struct { - digest v1.Hash - diffID v1.Hash - size int64 - compressedopener Opener - uncompressedopener Opener - compression compression.Compression - compressionLevel int - annotations map[string]string - estgzopts []estargz.Option - mediaType types.MediaType -} - -// Descriptor implements partial.withDescriptor. -func (l *layer) Descriptor() (*v1.Descriptor, error) { - digest, err := l.Digest() - if err != nil { - return nil, err - } - return &v1.Descriptor{ - Size: l.size, - Digest: digest, - Annotations: l.annotations, - MediaType: l.mediaType, - }, nil -} - -// Digest implements v1.Layer -func (l *layer) Digest() (v1.Hash, error) { - return l.digest, nil -} - -// DiffID implements v1.Layer -func (l *layer) DiffID() (v1.Hash, error) { - return l.diffID, nil -} - -// Compressed implements v1.Layer -func (l *layer) Compressed() (io.ReadCloser, error) { - return l.compressedopener() -} - -// Uncompressed implements v1.Layer -func (l *layer) Uncompressed() (io.ReadCloser, error) { - return l.uncompressedopener() -} - -// Size implements v1.Layer -func (l *layer) Size() (int64, error) { - return l.size, nil -} - -// MediaType implements v1.Layer -func (l *layer) MediaType() (types.MediaType, error) { - return l.mediaType, nil -} - -// LayerOption applies options to layer -type LayerOption func(*layer) - -// WithCompression is a functional option for overriding the default -// compression algorithm used for compressing uncompressed tarballs. -// Please note that WithCompression(compression.ZStd) should be used -// in conjunction with WithMediaType(types.OCILayerZStd) -func WithCompression(comp compression.Compression) LayerOption { - return func(l *layer) { - switch comp { - case compression.ZStd: - l.compression = compression.ZStd - case compression.GZip: - l.compression = compression.GZip - case compression.None: - logs.Warn.Printf("Compression type 'none' is not supported for tarball layers; using gzip compression.") - l.compression = compression.GZip - default: - logs.Warn.Printf("Unexpected compression type for WithCompression(): %s; using gzip compression instead.", comp) - l.compression = compression.GZip - } - } -} - -// WithCompressionLevel is a functional option for overriding the default -// compression level used for compressing uncompressed tarballs. -func WithCompressionLevel(level int) LayerOption { - return func(l *layer) { - l.compressionLevel = level - } -} - -// WithMediaType is a functional option for overriding the layer's media type. -func WithMediaType(mt types.MediaType) LayerOption { - return func(l *layer) { - l.mediaType = mt - } -} - -// WithCompressedCaching is a functional option that overrides the -// logic for accessing the compressed bytes to memoize the result -// and avoid expensive repeated gzips. -func WithCompressedCaching(l *layer) { - var once sync.Once - var err error - - buf := bytes.NewBuffer(nil) - og := l.compressedopener - - l.compressedopener = func() (io.ReadCloser, error) { - once.Do(func() { - var rc io.ReadCloser - rc, err = og() - if err == nil { - defer rc.Close() - _, err = io.Copy(buf, rc) - } - }) - if err != nil { - return nil, err - } - - return io.NopCloser(bytes.NewBuffer(buf.Bytes())), nil - } -} - -// WithEstargzOptions is a functional option that allow the caller to pass -// through estargz.Options to the underlying compression layer. This is -// only meaningful when estargz is enabled. -// -// Deprecated: WithEstargz is deprecated, and will be removed in a future release. -func WithEstargzOptions(opts ...estargz.Option) LayerOption { - return func(l *layer) { - l.estgzopts = opts - } -} - -// WithEstargz is a functional option that explicitly enables estargz support. -// -// Deprecated: WithEstargz is deprecated, and will be removed in a future release. -func WithEstargz(l *layer) { - oguncompressed := l.uncompressedopener - estargz := func() (io.ReadCloser, error) { - crc, err := oguncompressed() - if err != nil { - return nil, err - } - eopts := append(l.estgzopts, estargz.WithCompressionLevel(l.compressionLevel)) - rc, h, err := gestargz.ReadCloser(crc, eopts...) - if err != nil { - return nil, err - } - l.annotations[estargz.TOCJSONDigestAnnotation] = h.String() - return &and.ReadCloser{ - Reader: rc, - CloseFunc: func() error { - err := rc.Close() - if err != nil { - return err - } - // As an optimization, leverage the DiffID exposed by the estargz ReadCloser - l.diffID, err = v1.NewHash(rc.DiffID().String()) - return err - }, - }, nil - } - uncompressed := func() (io.ReadCloser, error) { - urc, err := estargz() - if err != nil { - return nil, err - } - return ggzip.UnzipReadCloser(urc) - } - - l.compressedopener = estargz - l.uncompressedopener = uncompressed -} - -// LayerFromFile returns a v1.Layer given a tarball -func LayerFromFile(path string, opts ...LayerOption) (v1.Layer, error) { - opener := func() (io.ReadCloser, error) { - return os.Open(path) - } - return LayerFromOpener(opener, opts...) -} - -// LayerFromOpener returns a v1.Layer given an Opener function. -// The Opener may return either an uncompressed tarball (common), -// or a compressed tarball (uncommon). -// -// When using this in conjunction with something like remote.Write -// the uncompressed path may end up gzipping things multiple times: -// 1. Compute the layer SHA256 -// 2. Upload the compressed layer. -// -// Since gzip can be expensive, we support an option to memoize the -// compression that can be passed here: tarball.WithCompressedCaching -func LayerFromOpener(opener Opener, opts ...LayerOption) (v1.Layer, error) { - comp, err := comp.GetCompression(opener) - if err != nil { - return nil, err - } - - layer := &layer{ - compression: compression.GZip, - compressionLevel: gzip.BestSpeed, - annotations: make(map[string]string, 1), - mediaType: types.DockerLayer, - } - - if estgz := os.Getenv("GGCR_EXPERIMENT_ESTARGZ"); estgz == "1" { - logs.Warn.Println("GGCR_EXPERIMENT_ESTARGZ is deprecated, and will be removed in a future release.") - opts = append([]LayerOption{WithEstargz}, opts...) - } - - switch comp { - case compression.GZip: - layer.compressedopener = opener - layer.uncompressedopener = func() (io.ReadCloser, error) { - urc, err := opener() - if err != nil { - return nil, err - } - return ggzip.UnzipReadCloser(urc) - } - case compression.ZStd: - layer.compressedopener = opener - layer.uncompressedopener = func() (io.ReadCloser, error) { - urc, err := opener() - if err != nil { - return nil, err - } - return zstd.UnzipReadCloser(urc) - } - default: - layer.uncompressedopener = opener - layer.compressedopener = func() (io.ReadCloser, error) { - crc, err := opener() - if err != nil { - return nil, err - } - - if layer.compression == compression.ZStd { - return zstd.ReadCloserLevel(crc, layer.compressionLevel), nil - } - - return ggzip.ReadCloserLevel(crc, layer.compressionLevel), nil - } - } - - for _, opt := range opts { - opt(layer) - } - - // Warn if media type does not match compression - var mediaTypeMismatch = false - switch layer.compression { - case compression.GZip: - mediaTypeMismatch = - layer.mediaType != types.OCILayer && - layer.mediaType != types.OCIRestrictedLayer && - layer.mediaType != types.DockerLayer - - case compression.ZStd: - mediaTypeMismatch = layer.mediaType != types.OCILayerZStd - } - - if mediaTypeMismatch { - logs.Warn.Printf("Unexpected mediaType (%s) for selected compression in %s in LayerFromOpener().", layer.mediaType, layer.compression) - } - - if layer.digest, layer.size, err = computeDigest(layer.compressedopener); err != nil { - return nil, err - } - - empty := v1.Hash{} - if layer.diffID == empty { - if layer.diffID, err = computeDiffID(layer.uncompressedopener); err != nil { - return nil, err - } - } - - return layer, nil -} - -// LayerFromReader returns a v1.Layer given a io.Reader. -// -// The reader's contents are read and buffered to a temp file in the process. -// -// Deprecated: Use LayerFromOpener or stream.NewLayer instead, if possible. -func LayerFromReader(reader io.Reader, opts ...LayerOption) (v1.Layer, error) { - tmp, err := os.CreateTemp("", "") - if err != nil { - return nil, fmt.Errorf("creating temp file to buffer reader: %w", err) - } - if _, err := io.Copy(tmp, reader); err != nil { - return nil, fmt.Errorf("writing temp file to buffer reader: %w", err) - } - return LayerFromFile(tmp.Name(), opts...) -} - -func computeDigest(opener Opener) (v1.Hash, int64, error) { - rc, err := opener() - if err != nil { - return v1.Hash{}, 0, err - } - defer rc.Close() - - return v1.SHA256(rc) -} - -func computeDiffID(opener Opener) (v1.Hash, error) { - rc, err := opener() - if err != nil { - return v1.Hash{}, err - } - defer rc.Close() - - digest, _, err := v1.SHA256(rc) - return digest, err -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.go b/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.go deleted file mode 100644 index e607df16..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/tarball/write.go +++ /dev/null @@ -1,457 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 tarball - -import ( - "archive/tar" - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "os" - "sort" - "strings" - - "github.com/google/go-containerregistry/pkg/name" - v1 "github.com/google/go-containerregistry/pkg/v1" - "github.com/google/go-containerregistry/pkg/v1/partial" -) - -// WriteToFile writes in the compressed format to a tarball, on disk. -// This is just syntactic sugar wrapping tarball.Write with a new file. -func WriteToFile(p string, ref name.Reference, img v1.Image, opts ...WriteOption) error { - w, err := os.Create(p) - if err != nil { - return err - } - defer w.Close() - - return Write(ref, img, w, opts...) -} - -// MultiWriteToFile writes in the compressed format to a tarball, on disk. -// This is just syntactic sugar wrapping tarball.MultiWrite with a new file. -func MultiWriteToFile(p string, tagToImage map[name.Tag]v1.Image, opts ...WriteOption) error { - refToImage := make(map[name.Reference]v1.Image, len(tagToImage)) - for i, d := range tagToImage { - refToImage[i] = d - } - return MultiRefWriteToFile(p, refToImage, opts...) -} - -// MultiRefWriteToFile writes in the compressed format to a tarball, on disk. -// This is just syntactic sugar wrapping tarball.MultiRefWrite with a new file. -func MultiRefWriteToFile(p string, refToImage map[name.Reference]v1.Image, opts ...WriteOption) error { - w, err := os.Create(p) - if err != nil { - return err - } - defer w.Close() - - return MultiRefWrite(refToImage, w, opts...) -} - -// Write is a wrapper to write a single image and tag to a tarball. -func Write(ref name.Reference, img v1.Image, w io.Writer, opts ...WriteOption) error { - return MultiRefWrite(map[name.Reference]v1.Image{ref: img}, w, opts...) -} - -// MultiWrite writes the contents of each image to the provided writer, in the compressed format. -// The contents are written in the following format: -// One manifest.json file at the top level containing information about several images. -// One file for each layer, named after the layer's SHA. -// One file for the config blob, named after its SHA. -func MultiWrite(tagToImage map[name.Tag]v1.Image, w io.Writer, opts ...WriteOption) error { - refToImage := make(map[name.Reference]v1.Image, len(tagToImage)) - for i, d := range tagToImage { - refToImage[i] = d - } - return MultiRefWrite(refToImage, w, opts...) -} - -// MultiRefWrite writes the contents of each image to the provided writer, in the compressed format. -// The contents are written in the following format: -// One manifest.json file at the top level containing information about several images. -// One file for each layer, named after the layer's SHA. -// One file for the config blob, named after its SHA. -func MultiRefWrite(refToImage map[name.Reference]v1.Image, w io.Writer, opts ...WriteOption) error { - // process options - o := &writeOptions{ - updates: nil, - } - for _, option := range opts { - if err := option(o); err != nil { - return err - } - } - - imageToTags := dedupRefToImage(refToImage) - size, mBytes, err := getSizeAndManifest(imageToTags) - if err != nil { - return sendUpdateReturn(o, err) - } - - return writeImagesToTar(imageToTags, mBytes, size, w, o) -} - -// sendUpdateReturn return the passed in error message, also sending on update channel, if it exists -func sendUpdateReturn(o *writeOptions, err error) error { - if o != nil && o.updates != nil { - o.updates <- v1.Update{ - Error: err, - } - } - return err -} - -// sendProgressWriterReturn return the passed in error message, also sending on update channel, if it exists, along with downloaded information -func sendProgressWriterReturn(pw *progressWriter, err error) error { - if pw != nil { - return pw.Error(err) - } - return err -} - -// writeImagesToTar writes the images to the tarball -func writeImagesToTar(imageToTags map[v1.Image][]string, m []byte, size int64, w io.Writer, o *writeOptions) (err error) { - if w == nil { - return sendUpdateReturn(o, errors.New("must pass valid writer")) - } - - tw := w - var pw *progressWriter - - // we only calculate the sizes and use a progressWriter if we were provided - // an option with a progress channel - if o != nil && o.updates != nil { - pw = &progressWriter{ - w: w, - updates: o.updates, - size: size, - } - tw = pw - } - - tf := tar.NewWriter(tw) - defer tf.Close() - - seenLayerDigests := make(map[string]struct{}) - - for img := range imageToTags { - // Write the config. - cfgName, err := img.ConfigName() - if err != nil { - return sendProgressWriterReturn(pw, err) - } - cfgBlob, err := img.RawConfigFile() - if err != nil { - return sendProgressWriterReturn(pw, err) - } - if err := writeTarEntry(tf, cfgName.String(), bytes.NewReader(cfgBlob), int64(len(cfgBlob))); err != nil { - return sendProgressWriterReturn(pw, err) - } - - // Write the layers. - layers, err := img.Layers() - if err != nil { - return sendProgressWriterReturn(pw, err) - } - layerFiles := make([]string, len(layers)) - for i, l := range layers { - d, err := l.Digest() - if err != nil { - return sendProgressWriterReturn(pw, err) - } - // Munge the file name to appease ancient technology. - // - // tar assumes anything with a colon is a remote tape drive: - // https://www.gnu.org/software/tar/manual/html_section/tar_45.html - // Drop the algorithm prefix, e.g. "sha256:" - hex := d.Hex - - // gunzip expects certain file extensions: - // https://www.gnu.org/software/gzip/manual/html_node/Overview.html - layerFiles[i] = fmt.Sprintf("%s.tar.gz", hex) - - if _, ok := seenLayerDigests[hex]; ok { - continue - } - seenLayerDigests[hex] = struct{}{} - - r, err := l.Compressed() - if err != nil { - return sendProgressWriterReturn(pw, err) - } - blobSize, err := l.Size() - if err != nil { - return sendProgressWriterReturn(pw, err) - } - - if err := writeTarEntry(tf, layerFiles[i], r, blobSize); err != nil { - return sendProgressWriterReturn(pw, err) - } - } - } - if err := writeTarEntry(tf, "manifest.json", bytes.NewReader(m), int64(len(m))); err != nil { - return sendProgressWriterReturn(pw, err) - } - - // be sure to close the tar writer so everything is flushed out before we send our EOF - if err := tf.Close(); err != nil { - return sendProgressWriterReturn(pw, err) - } - // send an EOF to indicate finished on the channel, but nil as our return error - _ = sendProgressWriterReturn(pw, io.EOF) - return nil -} - -// calculateManifest calculates the manifest and optionally the size of the tar file -func calculateManifest(imageToTags map[v1.Image][]string) (m Manifest, err error) { - if len(imageToTags) == 0 { - return nil, errors.New("set of images is empty") - } - - for img, tags := range imageToTags { - cfgName, err := img.ConfigName() - if err != nil { - return nil, err - } - - // Store foreign layer info. - layerSources := make(map[v1.Hash]v1.Descriptor) - - // Write the layers. - layers, err := img.Layers() - if err != nil { - return nil, err - } - layerFiles := make([]string, len(layers)) - for i, l := range layers { - d, err := l.Digest() - if err != nil { - return nil, err - } - // Munge the file name to appease ancient technology. - // - // tar assumes anything with a colon is a remote tape drive: - // https://www.gnu.org/software/tar/manual/html_section/tar_45.html - // Drop the algorithm prefix, e.g. "sha256:" - hex := d.Hex - - // gunzip expects certain file extensions: - // https://www.gnu.org/software/gzip/manual/html_node/Overview.html - layerFiles[i] = fmt.Sprintf("%s.tar.gz", hex) - - // Add to LayerSources if it's a foreign layer. - desc, err := partial.BlobDescriptor(img, d) - if err != nil { - return nil, err - } - if !desc.MediaType.IsDistributable() { - diffid, err := partial.BlobToDiffID(img, d) - if err != nil { - return nil, err - } - layerSources[diffid] = *desc - } - } - - // Generate the tar descriptor and write it. - m = append(m, Descriptor{ - Config: cfgName.String(), - RepoTags: tags, - Layers: layerFiles, - LayerSources: layerSources, - }) - } - // sort by name of the repotags so it is consistent. Alternatively, we could sort by hash of the - // descriptor, but that would make it hard for humans to process - sort.Slice(m, func(i, j int) bool { - return strings.Join(m[i].RepoTags, ",") < strings.Join(m[j].RepoTags, ",") - }) - - return m, nil -} - -// CalculateSize calculates the expected complete size of the output tar file -func CalculateSize(refToImage map[name.Reference]v1.Image) (size int64, err error) { - imageToTags := dedupRefToImage(refToImage) - size, _, err = getSizeAndManifest(imageToTags) - return size, err -} - -func getSizeAndManifest(imageToTags map[v1.Image][]string) (int64, []byte, error) { - m, err := calculateManifest(imageToTags) - if err != nil { - return 0, nil, fmt.Errorf("unable to calculate manifest: %w", err) - } - mBytes, err := json.Marshal(m) - if err != nil { - return 0, nil, fmt.Errorf("could not marshall manifest to bytes: %w", err) - } - - size, err := calculateTarballSize(imageToTags, mBytes) - if err != nil { - return 0, nil, fmt.Errorf("error calculating tarball size: %w", err) - } - return size, mBytes, nil -} - -// calculateTarballSize calculates the size of the tar file -func calculateTarballSize(imageToTags map[v1.Image][]string, mBytes []byte) (size int64, err error) { - seenLayerDigests := make(map[string]struct{}) - for img, name := range imageToTags { - manifest, err := img.Manifest() - if err != nil { - return size, fmt.Errorf("unable to get manifest for img %s: %w", name, err) - } - size += calculateSingleFileInTarSize(manifest.Config.Size) - for _, l := range manifest.Layers { - hex := l.Digest.Hex - if _, ok := seenLayerDigests[hex]; ok { - continue - } - seenLayerDigests[hex] = struct{}{} - size += calculateSingleFileInTarSize(l.Size) - } - } - // add the manifest - size += calculateSingleFileInTarSize(int64(len(mBytes))) - - // add the two padding blocks that indicate end of a tar file - size += 1024 - return size, nil -} - -func dedupRefToImage(refToImage map[name.Reference]v1.Image) map[v1.Image][]string { - imageToTags := make(map[v1.Image][]string) - - for ref, img := range refToImage { - if tag, ok := ref.(name.Tag); ok { - if tags, ok := imageToTags[img]; !ok || tags == nil { - imageToTags[img] = []string{} - } - // Docker cannot load tarballs without an explicit tag: - // https://github.com/google/go-containerregistry/issues/890 - // - // We can't use the fully qualified tag.Name() because of rules_docker: - // https://github.com/google/go-containerregistry/issues/527 - // - // If the tag is "latest", but tag.String() doesn't end in ":latest", - // just append it. Kind of gross, but should work for now. - ts := tag.String() - if tag.Identifier() == name.DefaultTag && !strings.HasSuffix(ts, ":"+name.DefaultTag) { - ts = fmt.Sprintf("%s:%s", ts, name.DefaultTag) - } - imageToTags[img] = append(imageToTags[img], ts) - } else if _, ok := imageToTags[img]; !ok { - imageToTags[img] = nil - } - } - - return imageToTags -} - -// writeTarEntry writes a file to the provided writer with a corresponding tar header -func writeTarEntry(tf *tar.Writer, path string, r io.Reader, size int64) error { - hdr := &tar.Header{ - Mode: 0644, - Typeflag: tar.TypeReg, - Size: size, - Name: path, - } - if err := tf.WriteHeader(hdr); err != nil { - return err - } - _, err := io.Copy(tf, r) - return err -} - -// ComputeManifest get the manifest.json that will be written to the tarball -// for multiple references -func ComputeManifest(refToImage map[name.Reference]v1.Image) (Manifest, error) { - imageToTags := dedupRefToImage(refToImage) - return calculateManifest(imageToTags) -} - -// WriteOption a function option to pass to Write() -type WriteOption func(*writeOptions) error -type writeOptions struct { - updates chan<- v1.Update -} - -// WithProgress create a WriteOption for passing to Write() that enables -// a channel to receive updates as they are downloaded and written to disk. -func WithProgress(updates chan<- v1.Update) WriteOption { - return func(o *writeOptions) error { - o.updates = updates - return nil - } -} - -// progressWriter is a writer which will send the download progress -type progressWriter struct { - w io.Writer - updates chan<- v1.Update - size, complete int64 -} - -func (pw *progressWriter) Write(p []byte) (int, error) { - n, err := pw.w.Write(p) - if err != nil { - return n, err - } - - pw.complete += int64(n) - - pw.updates <- v1.Update{ - Total: pw.size, - Complete: pw.complete, - } - - return n, err -} - -func (pw *progressWriter) Error(err error) error { - pw.updates <- v1.Update{ - Total: pw.size, - Complete: pw.complete, - Error: err, - } - return err -} - -func (pw *progressWriter) Close() error { - pw.updates <- v1.Update{ - Total: pw.size, - Complete: pw.complete, - Error: io.EOF, - } - return io.EOF -} - -// calculateSingleFileInTarSize calculate the size a file will take up in a tar archive, -// given the input data. Provided by rounding up to nearest whole block (512) -// and adding header 512 -func calculateSingleFileInTarSize(in int64) (out int64) { - // doing this manually, because math.Round() works with float64 - out += in - if remainder := out % 512; remainder != 0 { - out += (512 - remainder) - } - out += 512 - return out -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/types/types.go b/vendor/github.com/google/go-containerregistry/pkg/v1/types/types.go deleted file mode 100644 index c86657d7..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/types/types.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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 types holds common OCI media types. -package types - -// MediaType is an enumeration of the supported mime types that an element of an image might have. -type MediaType string - -// The collection of known MediaType values. -const ( - OCIContentDescriptor MediaType = "application/vnd.oci.descriptor.v1+json" - OCIImageIndex MediaType = "application/vnd.oci.image.index.v1+json" - OCIManifestSchema1 MediaType = "application/vnd.oci.image.manifest.v1+json" - OCIConfigJSON MediaType = "application/vnd.oci.image.config.v1+json" - OCILayer MediaType = "application/vnd.oci.image.layer.v1.tar+gzip" - OCILayerZStd MediaType = "application/vnd.oci.image.layer.v1.tar+zstd" - OCIRestrictedLayer MediaType = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" - OCIUncompressedLayer MediaType = "application/vnd.oci.image.layer.v1.tar" - OCIUncompressedRestrictedLayer MediaType = "application/vnd.oci.image.layer.nondistributable.v1.tar" - - DockerManifestSchema1 MediaType = "application/vnd.docker.distribution.manifest.v1+json" - DockerManifestSchema1Signed MediaType = "application/vnd.docker.distribution.manifest.v1+prettyjws" - DockerManifestSchema2 MediaType = "application/vnd.docker.distribution.manifest.v2+json" - DockerManifestList MediaType = "application/vnd.docker.distribution.manifest.list.v2+json" - DockerLayer MediaType = "application/vnd.docker.image.rootfs.diff.tar.gzip" - DockerConfigJSON MediaType = "application/vnd.docker.container.image.v1+json" - DockerPluginConfig MediaType = "application/vnd.docker.plugin.v1+json" - DockerForeignLayer MediaType = "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip" - DockerUncompressedLayer MediaType = "application/vnd.docker.image.rootfs.diff.tar" - - OCIVendorPrefix = "vnd.oci" - DockerVendorPrefix = "vnd.docker" -) - -// IsDistributable returns true if a layer is distributable, see: -// https://github.com/opencontainers/image-spec/blob/master/layer.md#non-distributable-layers -func (m MediaType) IsDistributable() bool { - switch m { - case DockerForeignLayer, OCIRestrictedLayer, OCIUncompressedRestrictedLayer: - return false - } - return true -} - -// IsImage returns true if the mediaType represents an image manifest, as opposed to something else, like an index. -func (m MediaType) IsImage() bool { - switch m { - case OCIManifestSchema1, DockerManifestSchema2: - return true - } - return false -} - -// IsIndex returns true if the mediaType represents an index, as opposed to something else, like an image. -func (m MediaType) IsIndex() bool { - switch m { - case OCIImageIndex, DockerManifestList: - return true - } - return false -} - -// IsConfig returns true if the mediaType represents a config, as opposed to something else, like an image. -func (m MediaType) IsConfig() bool { - switch m { - case OCIConfigJSON, DockerConfigJSON: - return true - } - return false -} - -func (m MediaType) IsSchema1() bool { - switch m { - case DockerManifestSchema1, DockerManifestSchema1Signed: - return true - } - return false -} - -func (m MediaType) IsLayer() bool { - switch m { - case DockerLayer, DockerUncompressedLayer, OCILayer, OCILayerZStd, OCIUncompressedLayer, DockerForeignLayer, OCIRestrictedLayer, OCIUncompressedRestrictedLayer: - return true - } - return false -} diff --git a/vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.go b/vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.go deleted file mode 100644 index a47b7475..00000000 --- a/vendor/github.com/google/go-containerregistry/pkg/v1/zz_deepcopy_generated.go +++ /dev/null @@ -1,339 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright 2018 Google LLC All Rights Reserved. -// -// 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. - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Config) DeepCopyInto(out *Config) { - *out = *in - if in.Cmd != nil { - in, out := &in.Cmd, &out.Cmd - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Healthcheck != nil { - in, out := &in.Healthcheck, &out.Healthcheck - *out = new(HealthConfig) - (*in).DeepCopyInto(*out) - } - if in.Entrypoint != nil { - in, out := &in.Entrypoint, &out.Entrypoint - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.OnBuild != nil { - in, out := &in.OnBuild, &out.OnBuild - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make(map[string]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ExposedPorts != nil { - in, out := &in.ExposedPorts, &out.ExposedPorts - *out = make(map[string]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Shell != nil { - in, out := &in.Shell, &out.Shell - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. -func (in *Config) DeepCopy() *Config { - if in == nil { - return nil - } - out := new(Config) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigFile) DeepCopyInto(out *ConfigFile) { - *out = *in - in.Created.DeepCopyInto(&out.Created) - if in.History != nil { - in, out := &in.History, &out.History - *out = make([]History, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.RootFS.DeepCopyInto(&out.RootFS) - in.Config.DeepCopyInto(&out.Config) - if in.OSFeatures != nil { - in, out := &in.OSFeatures, &out.OSFeatures - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigFile. -func (in *ConfigFile) DeepCopy() *ConfigFile { - if in == nil { - return nil - } - out := new(ConfigFile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Descriptor) DeepCopyInto(out *Descriptor) { - *out = *in - out.Digest = in.Digest - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.URLs != nil { - in, out := &in.URLs, &out.URLs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Platform != nil { - in, out := &in.Platform, &out.Platform - *out = new(Platform) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Descriptor. -func (in *Descriptor) DeepCopy() *Descriptor { - if in == nil { - return nil - } - out := new(Descriptor) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Hash) DeepCopyInto(out *Hash) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hash. -func (in *Hash) DeepCopy() *Hash { - if in == nil { - return nil - } - out := new(Hash) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HealthConfig) DeepCopyInto(out *HealthConfig) { - *out = *in - if in.Test != nil { - in, out := &in.Test, &out.Test - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthConfig. -func (in *HealthConfig) DeepCopy() *HealthConfig { - if in == nil { - return nil - } - out := new(HealthConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *History) DeepCopyInto(out *History) { - *out = *in - in.Created.DeepCopyInto(&out.Created) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new History. -func (in *History) DeepCopy() *History { - if in == nil { - return nil - } - out := new(History) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IndexManifest) DeepCopyInto(out *IndexManifest) { - *out = *in - if in.Manifests != nil { - in, out := &in.Manifests, &out.Manifests - *out = make([]Descriptor, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(Descriptor) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IndexManifest. -func (in *IndexManifest) DeepCopy() *IndexManifest { - if in == nil { - return nil - } - out := new(IndexManifest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Manifest) DeepCopyInto(out *Manifest) { - *out = *in - in.Config.DeepCopyInto(&out.Config) - if in.Layers != nil { - in, out := &in.Layers, &out.Layers - *out = make([]Descriptor, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Subject != nil { - in, out := &in.Subject, &out.Subject - *out = new(Descriptor) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest. -func (in *Manifest) DeepCopy() *Manifest { - if in == nil { - return nil - } - out := new(Manifest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Platform) DeepCopyInto(out *Platform) { - *out = *in - if in.OSFeatures != nil { - in, out := &in.OSFeatures, &out.OSFeatures - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Platform. -func (in *Platform) DeepCopy() *Platform { - if in == nil { - return nil - } - out := new(Platform) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RootFS) DeepCopyInto(out *RootFS) { - *out = *in - if in.DiffIDs != nil { - in, out := &in.DiffIDs, &out.DiffIDs - *out = make([]Hash, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootFS. -func (in *RootFS) DeepCopy() *RootFS { - if in == nil { - return nil - } - out := new(RootFS) - in.DeepCopyInto(out) - return out -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Time. -func (in *Time) DeepCopy() *Time { - if in == nil { - return nil - } - out := new(Time) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/klauspost/compress/.gitattributes b/vendor/github.com/klauspost/compress/.gitattributes deleted file mode 100644 index 40243359..00000000 --- a/vendor/github.com/klauspost/compress/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -* -text -*.bin -text -diff diff --git a/vendor/github.com/klauspost/compress/.gitignore b/vendor/github.com/klauspost/compress/.gitignore deleted file mode 100644 index d31b3781..00000000 --- a/vendor/github.com/klauspost/compress/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof -/s2/cmd/_s2sx/sfx-exe - -# Linux perf files -perf.data -perf.data.old - -# gdb history -.gdb_history diff --git a/vendor/github.com/klauspost/compress/.goreleaser.yml b/vendor/github.com/klauspost/compress/.goreleaser.yml deleted file mode 100644 index 4c28dff4..00000000 --- a/vendor/github.com/klauspost/compress/.goreleaser.yml +++ /dev/null @@ -1,127 +0,0 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com -before: - hooks: - - ./gen.sh - - go install mvdan.cc/garble@v0.10.1 - -builds: - - - id: "s2c" - binary: s2c - main: ./s2/cmd/s2c/main.go - flags: - - -trimpath - env: - - CGO_ENABLED=0 - goos: - - aix - - linux - - freebsd - - netbsd - - windows - - darwin - goarch: - - 386 - - amd64 - - arm - - arm64 - - ppc64 - - ppc64le - - mips64 - - mips64le - goarm: - - 7 - gobinary: garble - - - id: "s2d" - binary: s2d - main: ./s2/cmd/s2d/main.go - flags: - - -trimpath - env: - - CGO_ENABLED=0 - goos: - - aix - - linux - - freebsd - - netbsd - - windows - - darwin - goarch: - - 386 - - amd64 - - arm - - arm64 - - ppc64 - - ppc64le - - mips64 - - mips64le - goarm: - - 7 - gobinary: garble - - - id: "s2sx" - binary: s2sx - main: ./s2/cmd/_s2sx/main.go - flags: - - -modfile=s2sx.mod - - -trimpath - env: - - CGO_ENABLED=0 - goos: - - aix - - linux - - freebsd - - netbsd - - windows - - darwin - goarch: - - 386 - - amd64 - - arm - - arm64 - - ppc64 - - ppc64le - - mips64 - - mips64le - goarm: - - 7 - gobinary: garble - -archives: - - - id: s2-binaries - name_template: "s2-{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" - format_overrides: - - goos: windows - format: zip - files: - - unpack/* - - s2/LICENSE - - s2/README.md -checksum: - name_template: 'checksums.txt' -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc - filters: - exclude: - - '^doc:' - - '^docs:' - - '^test:' - - '^tests:' - - '^Update\sREADME.md' - -nfpms: - - - file_name_template: "s2_package__{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" - vendor: Klaus Post - homepage: https://github.com/klauspost/compress - maintainer: Klaus Post - description: S2 Compression Tool - license: BSD 3-Clause - formats: - - deb - - rpm diff --git a/vendor/github.com/klauspost/compress/LICENSE b/vendor/github.com/klauspost/compress/LICENSE deleted file mode 100644 index 87d55747..00000000 --- a/vendor/github.com/klauspost/compress/LICENSE +++ /dev/null @@ -1,304 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. -Copyright (c) 2019 Klaus Post. 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. - ------------------- - -Files: gzhttp/* - - 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 2016-2017 The New York Times Company - - 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. - ------------------- - -Files: s2/cmd/internal/readahead/* - -The MIT License (MIT) - -Copyright (c) 2015 Klaus Post - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - ---------------------- -Files: snappy/* -Files: internal/snapref/* - -Copyright (c) 2011 The Snappy-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. - ------------------ - -Files: s2/cmd/internal/filepathx/* - -Copyright 2016 The filepathx Authors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/klauspost/compress/README.md b/vendor/github.com/klauspost/compress/README.md deleted file mode 100644 index dde75389..00000000 --- a/vendor/github.com/klauspost/compress/README.md +++ /dev/null @@ -1,652 +0,0 @@ -# compress - -This package provides various compression algorithms. - -* [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression in pure Go. -* [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) is a high performance replacement for Snappy. -* Optimized [deflate](https://godoc.org/github.com/klauspost/compress/flate) packages which can be used as a dropin replacement for [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip) and [zlib](https://godoc.org/github.com/klauspost/compress/zlib). -* [snappy](https://github.com/klauspost/compress/tree/master/snappy) is a drop-in replacement for `github.com/golang/snappy` offering better compression and concurrent streams. -* [huff0](https://github.com/klauspost/compress/tree/master/huff0) and [FSE](https://github.com/klauspost/compress/tree/master/fse) implementations for raw entropy encoding. -* [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp) Provides client and server wrappers for handling gzipped requests efficiently. -* [pgzip](https://github.com/klauspost/pgzip) is a separate package that provides a very fast parallel gzip implementation. - -[![Go Reference](https://pkg.go.dev/badge/klauspost/compress.svg)](https://pkg.go.dev/github.com/klauspost/compress?tab=subdirectories) -[![Go](https://github.com/klauspost/compress/actions/workflows/go.yml/badge.svg)](https://github.com/klauspost/compress/actions/workflows/go.yml) -[![Sourcegraph Badge](https://sourcegraph.com/github.com/klauspost/compress/-/badge.svg)](https://sourcegraph.com/github.com/klauspost/compress?badge) - -# changelog - -* July 1st, 2023 - [v1.16.7](https://github.com/klauspost/compress/releases/tag/v1.16.7) - * zstd: Fix default level first dictionary encode https://github.com/klauspost/compress/pull/829 - * s2: add GetBufferCapacity() method by @GiedriusS in https://github.com/klauspost/compress/pull/832 - -* June 13, 2023 - [v1.16.6](https://github.com/klauspost/compress/releases/tag/v1.16.6) - * zstd: correctly ignore WithEncoderPadding(1) by @ianlancetaylor in https://github.com/klauspost/compress/pull/806 - * zstd: Add amd64 match length assembly https://github.com/klauspost/compress/pull/824 - * gzhttp: Handle informational headers by @rtribotte in https://github.com/klauspost/compress/pull/815 - * s2: Improve Better compression slightly https://github.com/klauspost/compress/pull/663 - -* Apr 16, 2023 - [v1.16.5](https://github.com/klauspost/compress/releases/tag/v1.16.5) - * zstd: readByte needs to use io.ReadFull by @jnoxon in https://github.com/klauspost/compress/pull/802 - * gzip: Fix WriterTo after initial read https://github.com/klauspost/compress/pull/804 - -* Apr 5, 2023 - [v1.16.4](https://github.com/klauspost/compress/releases/tag/v1.16.4) - * zstd: Improve zstd best efficiency by @greatroar and @klauspost in https://github.com/klauspost/compress/pull/784 - * zstd: Respect WithAllLitEntropyCompression https://github.com/klauspost/compress/pull/792 - * zstd: Fix amd64 not always detecting corrupt data https://github.com/klauspost/compress/pull/785 - * zstd: Various minor improvements by @greatroar in https://github.com/klauspost/compress/pull/788 https://github.com/klauspost/compress/pull/794 https://github.com/klauspost/compress/pull/795 - * s2: Fix huge block overflow https://github.com/klauspost/compress/pull/779 - * s2: Allow CustomEncoder fallback https://github.com/klauspost/compress/pull/780 - * gzhttp: Suppport ResponseWriter Unwrap() in gzhttp handler by @jgimenez in https://github.com/klauspost/compress/pull/799 - -* Mar 13, 2023 - [v1.16.1](https://github.com/klauspost/compress/releases/tag/v1.16.1) - * zstd: Speed up + improve best encoder by @greatroar in https://github.com/klauspost/compress/pull/776 - * gzhttp: Add optional [BREACH mitigation](https://github.com/klauspost/compress/tree/master/gzhttp#breach-mitigation). https://github.com/klauspost/compress/pull/762 https://github.com/klauspost/compress/pull/768 https://github.com/klauspost/compress/pull/769 https://github.com/klauspost/compress/pull/770 https://github.com/klauspost/compress/pull/767 - * s2: Add Intel LZ4s converter https://github.com/klauspost/compress/pull/766 - * zstd: Minor bug fixes https://github.com/klauspost/compress/pull/771 https://github.com/klauspost/compress/pull/772 https://github.com/klauspost/compress/pull/773 - * huff0: Speed up compress1xDo by @greatroar in https://github.com/klauspost/compress/pull/774 - -* Feb 26, 2023 - [v1.16.0](https://github.com/klauspost/compress/releases/tag/v1.16.0) - * s2: Add [Dictionary](https://github.com/klauspost/compress/tree/master/s2#dictionaries) support. https://github.com/klauspost/compress/pull/685 - * s2: Add Compression Size Estimate. https://github.com/klauspost/compress/pull/752 - * s2: Add support for custom stream encoder. https://github.com/klauspost/compress/pull/755 - * s2: Add LZ4 block converter. https://github.com/klauspost/compress/pull/748 - * s2: Support io.ReaderAt in ReadSeeker. https://github.com/klauspost/compress/pull/747 - * s2c/s2sx: Use concurrent decoding. https://github.com/klauspost/compress/pull/746 - -
- See changes to v1.15.x - -* Jan 21st, 2023 (v1.15.15) - * deflate: Improve level 7-9 by @klauspost in https://github.com/klauspost/compress/pull/739 - * zstd: Add delta encoding support by @greatroar in https://github.com/klauspost/compress/pull/728 - * zstd: Various speed improvements by @greatroar https://github.com/klauspost/compress/pull/741 https://github.com/klauspost/compress/pull/734 https://github.com/klauspost/compress/pull/736 https://github.com/klauspost/compress/pull/744 https://github.com/klauspost/compress/pull/743 https://github.com/klauspost/compress/pull/745 - * gzhttp: Add SuffixETag() and DropETag() options to prevent ETag collisions on compressed responses by @willbicks in https://github.com/klauspost/compress/pull/740 - -* Jan 3rd, 2023 (v1.15.14) - - * flate: Improve speed in big stateless blocks https://github.com/klauspost/compress/pull/718 - * zstd: Minor speed tweaks by @greatroar in https://github.com/klauspost/compress/pull/716 https://github.com/klauspost/compress/pull/720 - * export NoGzipResponseWriter for custom ResponseWriter wrappers by @harshavardhana in https://github.com/klauspost/compress/pull/722 - * s2: Add example for indexing and existing stream https://github.com/klauspost/compress/pull/723 - -* Dec 11, 2022 (v1.15.13) - * zstd: Add [MaxEncodedSize](https://pkg.go.dev/github.com/klauspost/compress@v1.15.13/zstd#Encoder.MaxEncodedSize) to encoder https://github.com/klauspost/compress/pull/691 - * zstd: Various tweaks and improvements https://github.com/klauspost/compress/pull/693 https://github.com/klauspost/compress/pull/695 https://github.com/klauspost/compress/pull/696 https://github.com/klauspost/compress/pull/701 https://github.com/klauspost/compress/pull/702 https://github.com/klauspost/compress/pull/703 https://github.com/klauspost/compress/pull/704 https://github.com/klauspost/compress/pull/705 https://github.com/klauspost/compress/pull/706 https://github.com/klauspost/compress/pull/707 https://github.com/klauspost/compress/pull/708 - -* Oct 26, 2022 (v1.15.12) - - * zstd: Tweak decoder allocs. https://github.com/klauspost/compress/pull/680 - * gzhttp: Always delete `HeaderNoCompression` https://github.com/klauspost/compress/pull/683 - -* Sept 26, 2022 (v1.15.11) - - * flate: Improve level 1-3 compression https://github.com/klauspost/compress/pull/678 - * zstd: Improve "best" compression by @nightwolfz in https://github.com/klauspost/compress/pull/677 - * zstd: Fix+reduce decompression allocations https://github.com/klauspost/compress/pull/668 - * zstd: Fix non-effective noescape tag https://github.com/klauspost/compress/pull/667 - -* Sept 16, 2022 (v1.15.10) - - * zstd: Add [WithDecodeAllCapLimit](https://pkg.go.dev/github.com/klauspost/compress@v1.15.10/zstd#WithDecodeAllCapLimit) https://github.com/klauspost/compress/pull/649 - * Add Go 1.19 - deprecate Go 1.16 https://github.com/klauspost/compress/pull/651 - * flate: Improve level 5+6 compression https://github.com/klauspost/compress/pull/656 - * zstd: Improve "better" compresssion https://github.com/klauspost/compress/pull/657 - * s2: Improve "best" compression https://github.com/klauspost/compress/pull/658 - * s2: Improve "better" compression. https://github.com/klauspost/compress/pull/635 - * s2: Slightly faster non-assembly decompression https://github.com/klauspost/compress/pull/646 - * Use arrays for constant size copies https://github.com/klauspost/compress/pull/659 - -* July 21, 2022 (v1.15.9) - - * zstd: Fix decoder crash on amd64 (no BMI) on invalid input https://github.com/klauspost/compress/pull/645 - * zstd: Disable decoder extended memory copies (amd64) due to possible crashes https://github.com/klauspost/compress/pull/644 - * zstd: Allow single segments up to "max decoded size" by @klauspost in https://github.com/klauspost/compress/pull/643 - -* July 13, 2022 (v1.15.8) - - * gzip: fix stack exhaustion bug in Reader.Read https://github.com/klauspost/compress/pull/641 - * s2: Add Index header trim/restore https://github.com/klauspost/compress/pull/638 - * zstd: Optimize seqdeq amd64 asm by @greatroar in https://github.com/klauspost/compress/pull/636 - * zstd: Improve decoder memcopy https://github.com/klauspost/compress/pull/637 - * huff0: Pass a single bitReader pointer to asm by @greatroar in https://github.com/klauspost/compress/pull/634 - * zstd: Branchless getBits for amd64 w/o BMI2 by @greatroar in https://github.com/klauspost/compress/pull/640 - * gzhttp: Remove header before writing https://github.com/klauspost/compress/pull/639 - -* June 29, 2022 (v1.15.7) - - * s2: Fix absolute forward seeks https://github.com/klauspost/compress/pull/633 - * zip: Merge upstream https://github.com/klauspost/compress/pull/631 - * zip: Re-add zip64 fix https://github.com/klauspost/compress/pull/624 - * zstd: translate fseDecoder.buildDtable into asm by @WojciechMula in https://github.com/klauspost/compress/pull/598 - * flate: Faster histograms https://github.com/klauspost/compress/pull/620 - * deflate: Use compound hcode https://github.com/klauspost/compress/pull/622 - -* June 3, 2022 (v1.15.6) - * s2: Improve coding for long, close matches https://github.com/klauspost/compress/pull/613 - * s2c: Add Snappy/S2 stream recompression https://github.com/klauspost/compress/pull/611 - * zstd: Always use configured block size https://github.com/klauspost/compress/pull/605 - * zstd: Fix incorrect hash table placement for dict encoding in default https://github.com/klauspost/compress/pull/606 - * zstd: Apply default config to ZipDecompressor without options https://github.com/klauspost/compress/pull/608 - * gzhttp: Exclude more common archive formats https://github.com/klauspost/compress/pull/612 - * s2: Add ReaderIgnoreCRC https://github.com/klauspost/compress/pull/609 - * s2: Remove sanity load on index creation https://github.com/klauspost/compress/pull/607 - * snappy: Use dedicated function for scoring https://github.com/klauspost/compress/pull/614 - * s2c+s2d: Use official snappy framed extension https://github.com/klauspost/compress/pull/610 - -* May 25, 2022 (v1.15.5) - * s2: Add concurrent stream decompression https://github.com/klauspost/compress/pull/602 - * s2: Fix final emit oob read crash on amd64 https://github.com/klauspost/compress/pull/601 - * huff0: asm implementation of Decompress1X by @WojciechMula https://github.com/klauspost/compress/pull/596 - * zstd: Use 1 less goroutine for stream decoding https://github.com/klauspost/compress/pull/588 - * zstd: Copy literal in 16 byte blocks when possible https://github.com/klauspost/compress/pull/592 - * zstd: Speed up when WithDecoderLowmem(false) https://github.com/klauspost/compress/pull/599 - * zstd: faster next state update in BMI2 version of decode by @WojciechMula in https://github.com/klauspost/compress/pull/593 - * huff0: Do not check max size when reading table. https://github.com/klauspost/compress/pull/586 - * flate: Inplace hashing for level 7-9 by @klauspost in https://github.com/klauspost/compress/pull/590 - - -* May 11, 2022 (v1.15.4) - * huff0: decompress directly into output by @WojciechMula in [#577](https://github.com/klauspost/compress/pull/577) - * inflate: Keep dict on stack [#581](https://github.com/klauspost/compress/pull/581) - * zstd: Faster decoding memcopy in asm [#583](https://github.com/klauspost/compress/pull/583) - * zstd: Fix ignored crc [#580](https://github.com/klauspost/compress/pull/580) - -* May 5, 2022 (v1.15.3) - * zstd: Allow to ignore checksum checking by @WojciechMula [#572](https://github.com/klauspost/compress/pull/572) - * s2: Fix incorrect seek for io.SeekEnd in [#575](https://github.com/klauspost/compress/pull/575) - -* Apr 26, 2022 (v1.15.2) - * zstd: Add x86-64 assembly for decompression on streams and blocks. Contributed by [@WojciechMula](https://github.com/WojciechMula). Typically 2x faster. [#528](https://github.com/klauspost/compress/pull/528) [#531](https://github.com/klauspost/compress/pull/531) [#545](https://github.com/klauspost/compress/pull/545) [#537](https://github.com/klauspost/compress/pull/537) - * zstd: Add options to ZipDecompressor and fixes [#539](https://github.com/klauspost/compress/pull/539) - * s2: Use sorted search for index [#555](https://github.com/klauspost/compress/pull/555) - * Minimum version is Go 1.16, added CI test on 1.18. - -* Mar 11, 2022 (v1.15.1) - * huff0: Add x86 assembly of Decode4X by @WojciechMula in [#512](https://github.com/klauspost/compress/pull/512) - * zstd: Reuse zip decoders in [#514](https://github.com/klauspost/compress/pull/514) - * zstd: Detect extra block data and report as corrupted in [#520](https://github.com/klauspost/compress/pull/520) - * zstd: Handle zero sized frame content size stricter in [#521](https://github.com/klauspost/compress/pull/521) - * zstd: Add stricter block size checks in [#523](https://github.com/klauspost/compress/pull/523) - -* Mar 3, 2022 (v1.15.0) - * zstd: Refactor decoder by @klauspost in [#498](https://github.com/klauspost/compress/pull/498) - * zstd: Add stream encoding without goroutines by @klauspost in [#505](https://github.com/klauspost/compress/pull/505) - * huff0: Prevent single blocks exceeding 16 bits by @klauspost in[#507](https://github.com/klauspost/compress/pull/507) - * flate: Inline literal emission by @klauspost in [#509](https://github.com/klauspost/compress/pull/509) - * gzhttp: Add zstd to transport by @klauspost in [#400](https://github.com/klauspost/compress/pull/400) - * gzhttp: Make content-type optional by @klauspost in [#510](https://github.com/klauspost/compress/pull/510) - -Both compression and decompression now supports "synchronous" stream operations. This means that whenever "concurrency" is set to 1, they will operate without spawning goroutines. - -Stream decompression is now faster on asynchronous, since the goroutine allocation much more effectively splits the workload. On typical streams this will typically use 2 cores fully for decompression. When a stream has finished decoding no goroutines will be left over, so decoders can now safely be pooled and still be garbage collected. - -While the release has been extensively tested, it is recommended to testing when upgrading. - -
- -
- See changes to v1.14.x - -* Feb 22, 2022 (v1.14.4) - * flate: Fix rare huffman only (-2) corruption. [#503](https://github.com/klauspost/compress/pull/503) - * zip: Update deprecated CreateHeaderRaw to correctly call CreateRaw by @saracen in [#502](https://github.com/klauspost/compress/pull/502) - * zip: don't read data descriptor early by @saracen in [#501](https://github.com/klauspost/compress/pull/501) #501 - * huff0: Use static decompression buffer up to 30% faster by @klauspost in [#499](https://github.com/klauspost/compress/pull/499) [#500](https://github.com/klauspost/compress/pull/500) - -* Feb 17, 2022 (v1.14.3) - * flate: Improve fastest levels compression speed ~10% more throughput. [#482](https://github.com/klauspost/compress/pull/482) [#489](https://github.com/klauspost/compress/pull/489) [#490](https://github.com/klauspost/compress/pull/490) [#491](https://github.com/klauspost/compress/pull/491) [#494](https://github.com/klauspost/compress/pull/494) [#478](https://github.com/klauspost/compress/pull/478) - * flate: Faster decompression speed, ~5-10%. [#483](https://github.com/klauspost/compress/pull/483) - * s2: Faster compression with Go v1.18 and amd64 microarch level 3+. [#484](https://github.com/klauspost/compress/pull/484) [#486](https://github.com/klauspost/compress/pull/486) - -* Jan 25, 2022 (v1.14.2) - * zstd: improve header decoder by @dsnet [#476](https://github.com/klauspost/compress/pull/476) - * zstd: Add bigger default blocks [#469](https://github.com/klauspost/compress/pull/469) - * zstd: Remove unused decompression buffer [#470](https://github.com/klauspost/compress/pull/470) - * zstd: Fix logically dead code by @ningmingxiao [#472](https://github.com/klauspost/compress/pull/472) - * flate: Improve level 7-9 [#471](https://github.com/klauspost/compress/pull/471) [#473](https://github.com/klauspost/compress/pull/473) - * zstd: Add noasm tag for xxhash [#475](https://github.com/klauspost/compress/pull/475) - -* Jan 11, 2022 (v1.14.1) - * s2: Add stream index in [#462](https://github.com/klauspost/compress/pull/462) - * flate: Speed and efficiency improvements in [#439](https://github.com/klauspost/compress/pull/439) [#461](https://github.com/klauspost/compress/pull/461) [#455](https://github.com/klauspost/compress/pull/455) [#452](https://github.com/klauspost/compress/pull/452) [#458](https://github.com/klauspost/compress/pull/458) - * zstd: Performance improvement in [#420]( https://github.com/klauspost/compress/pull/420) [#456](https://github.com/klauspost/compress/pull/456) [#437](https://github.com/klauspost/compress/pull/437) [#467](https://github.com/klauspost/compress/pull/467) [#468](https://github.com/klauspost/compress/pull/468) - * zstd: add arm64 xxhash assembly in [#464](https://github.com/klauspost/compress/pull/464) - * Add garbled for binaries for s2 in [#445](https://github.com/klauspost/compress/pull/445) -
- -
- See changes to v1.13.x - -* Aug 30, 2021 (v1.13.5) - * gz/zlib/flate: Alias stdlib errors [#425](https://github.com/klauspost/compress/pull/425) - * s2: Add block support to commandline tools [#413](https://github.com/klauspost/compress/pull/413) - * zstd: pooledZipWriter should return Writers to the same pool [#426](https://github.com/klauspost/compress/pull/426) - * Removed golang/snappy as external dependency for tests [#421](https://github.com/klauspost/compress/pull/421) - -* Aug 12, 2021 (v1.13.4) - * Add [snappy replacement package](https://github.com/klauspost/compress/tree/master/snappy). - * zstd: Fix incorrect encoding in "best" mode [#415](https://github.com/klauspost/compress/pull/415) - -* Aug 3, 2021 (v1.13.3) - * zstd: Improve Best compression [#404](https://github.com/klauspost/compress/pull/404) - * zstd: Fix WriteTo error forwarding [#411](https://github.com/klauspost/compress/pull/411) - * gzhttp: Return http.HandlerFunc instead of http.Handler. Unlikely breaking change. [#406](https://github.com/klauspost/compress/pull/406) - * s2sx: Fix max size error [#399](https://github.com/klauspost/compress/pull/399) - * zstd: Add optional stream content size on reset [#401](https://github.com/klauspost/compress/pull/401) - * zstd: use SpeedBestCompression for level >= 10 [#410](https://github.com/klauspost/compress/pull/410) - -* Jun 14, 2021 (v1.13.1) - * s2: Add full Snappy output support [#396](https://github.com/klauspost/compress/pull/396) - * zstd: Add configurable [Decoder window](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithDecoderMaxWindow) size [#394](https://github.com/klauspost/compress/pull/394) - * gzhttp: Add header to skip compression [#389](https://github.com/klauspost/compress/pull/389) - * s2: Improve speed with bigger output margin [#395](https://github.com/klauspost/compress/pull/395) - -* Jun 3, 2021 (v1.13.0) - * Added [gzhttp](https://github.com/klauspost/compress/tree/master/gzhttp#gzip-handler) which allows wrapping HTTP servers and clients with GZIP compressors. - * zstd: Detect short invalid signatures [#382](https://github.com/klauspost/compress/pull/382) - * zstd: Spawn decoder goroutine only if needed. [#380](https://github.com/klauspost/compress/pull/380) -
- - -
- See changes to v1.12.x - -* May 25, 2021 (v1.12.3) - * deflate: Better/faster Huffman encoding [#374](https://github.com/klauspost/compress/pull/374) - * deflate: Allocate less for history. [#375](https://github.com/klauspost/compress/pull/375) - * zstd: Forward read errors [#373](https://github.com/klauspost/compress/pull/373) - -* Apr 27, 2021 (v1.12.2) - * zstd: Improve better/best compression [#360](https://github.com/klauspost/compress/pull/360) [#364](https://github.com/klauspost/compress/pull/364) [#365](https://github.com/klauspost/compress/pull/365) - * zstd: Add helpers to compress/decompress zstd inside zip files [#363](https://github.com/klauspost/compress/pull/363) - * deflate: Improve level 5+6 compression [#367](https://github.com/klauspost/compress/pull/367) - * s2: Improve better/best compression [#358](https://github.com/klauspost/compress/pull/358) [#359](https://github.com/klauspost/compress/pull/358) - * s2: Load after checking src limit on amd64. [#362](https://github.com/klauspost/compress/pull/362) - * s2sx: Limit max executable size [#368](https://github.com/klauspost/compress/pull/368) - -* Apr 14, 2021 (v1.12.1) - * snappy package removed. Upstream added as dependency. - * s2: Better compression in "best" mode [#353](https://github.com/klauspost/compress/pull/353) - * s2sx: Add stdin input and detect pre-compressed from signature [#352](https://github.com/klauspost/compress/pull/352) - * s2c/s2d: Add http as possible input [#348](https://github.com/klauspost/compress/pull/348) - * s2c/s2d/s2sx: Always truncate when writing files [#352](https://github.com/klauspost/compress/pull/352) - * zstd: Reduce memory usage further when using [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) [#346](https://github.com/klauspost/compress/pull/346) - * s2: Fix potential problem with amd64 assembly and profilers [#349](https://github.com/klauspost/compress/pull/349) -
- -
- See changes to v1.11.x - -* Mar 26, 2021 (v1.11.13) - * zstd: Big speedup on small dictionary encodes [#344](https://github.com/klauspost/compress/pull/344) [#345](https://github.com/klauspost/compress/pull/345) - * zstd: Add [WithLowerEncoderMem](https://pkg.go.dev/github.com/klauspost/compress/zstd#WithLowerEncoderMem) encoder option [#336](https://github.com/klauspost/compress/pull/336) - * deflate: Improve entropy compression [#338](https://github.com/klauspost/compress/pull/338) - * s2: Clean up and minor performance improvement in best [#341](https://github.com/klauspost/compress/pull/341) - -* Mar 5, 2021 (v1.11.12) - * s2: Add `s2sx` binary that creates [self extracting archives](https://github.com/klauspost/compress/tree/master/s2#s2sx-self-extracting-archives). - * s2: Speed up decompression on non-assembly platforms [#328](https://github.com/klauspost/compress/pull/328) - -* Mar 1, 2021 (v1.11.9) - * s2: Add ARM64 decompression assembly. Around 2x output speed. [#324](https://github.com/klauspost/compress/pull/324) - * s2: Improve "better" speed and efficiency. [#325](https://github.com/klauspost/compress/pull/325) - * s2: Fix binaries. - -* Feb 25, 2021 (v1.11.8) - * s2: Fixed occational out-of-bounds write on amd64. Upgrade recommended. - * s2: Add AMD64 assembly for better mode. 25-50% faster. [#315](https://github.com/klauspost/compress/pull/315) - * s2: Less upfront decoder allocation. [#322](https://github.com/klauspost/compress/pull/322) - * zstd: Faster "compression" of incompressible data. [#314](https://github.com/klauspost/compress/pull/314) - * zip: Fix zip64 headers. [#313](https://github.com/klauspost/compress/pull/313) - -* Jan 14, 2021 (v1.11.7) - * Use Bytes() interface to get bytes across packages. [#309](https://github.com/klauspost/compress/pull/309) - * s2: Add 'best' compression option. [#310](https://github.com/klauspost/compress/pull/310) - * s2: Add ReaderMaxBlockSize, changes `s2.NewReader` signature to include varargs. [#311](https://github.com/klauspost/compress/pull/311) - * s2: Fix crash on small better buffers. [#308](https://github.com/klauspost/compress/pull/308) - * s2: Clean up decoder. [#312](https://github.com/klauspost/compress/pull/312) - -* Jan 7, 2021 (v1.11.6) - * zstd: Make decoder allocations smaller [#306](https://github.com/klauspost/compress/pull/306) - * zstd: Free Decoder resources when Reset is called with a nil io.Reader [#305](https://github.com/klauspost/compress/pull/305) - -* Dec 20, 2020 (v1.11.4) - * zstd: Add Best compression mode [#304](https://github.com/klauspost/compress/pull/304) - * Add header decoder [#299](https://github.com/klauspost/compress/pull/299) - * s2: Add uncompressed stream option [#297](https://github.com/klauspost/compress/pull/297) - * Simplify/speed up small blocks with known max size. [#300](https://github.com/klauspost/compress/pull/300) - * zstd: Always reset literal dict encoder [#303](https://github.com/klauspost/compress/pull/303) - -* Nov 15, 2020 (v1.11.3) - * inflate: 10-15% faster decompression [#293](https://github.com/klauspost/compress/pull/293) - * zstd: Tweak DecodeAll default allocation [#295](https://github.com/klauspost/compress/pull/295) - -* Oct 11, 2020 (v1.11.2) - * s2: Fix out of bounds read in "better" block compression [#291](https://github.com/klauspost/compress/pull/291) - -* Oct 1, 2020 (v1.11.1) - * zstd: Set allLitEntropy true in default configuration [#286](https://github.com/klauspost/compress/pull/286) - -* Sept 8, 2020 (v1.11.0) - * zstd: Add experimental compression [dictionaries](https://github.com/klauspost/compress/tree/master/zstd#dictionaries) [#281](https://github.com/klauspost/compress/pull/281) - * zstd: Fix mixed Write and ReadFrom calls [#282](https://github.com/klauspost/compress/pull/282) - * inflate/gz: Limit variable shifts, ~5% faster decompression [#274](https://github.com/klauspost/compress/pull/274) -
- -
- See changes to v1.10.x - -* July 8, 2020 (v1.10.11) - * zstd: Fix extra block when compressing with ReadFrom. [#278](https://github.com/klauspost/compress/pull/278) - * huff0: Also populate compression table when reading decoding table. [#275](https://github.com/klauspost/compress/pull/275) - -* June 23, 2020 (v1.10.10) - * zstd: Skip entropy compression in fastest mode when no matches. [#270](https://github.com/klauspost/compress/pull/270) - -* June 16, 2020 (v1.10.9): - * zstd: API change for specifying dictionaries. See [#268](https://github.com/klauspost/compress/pull/268) - * zip: update CreateHeaderRaw to handle zip64 fields. [#266](https://github.com/klauspost/compress/pull/266) - * Fuzzit tests removed. The service has been purchased and is no longer available. - -* June 5, 2020 (v1.10.8): - * 1.15x faster zstd block decompression. [#265](https://github.com/klauspost/compress/pull/265) - -* June 1, 2020 (v1.10.7): - * Added zstd decompression [dictionary support](https://github.com/klauspost/compress/tree/master/zstd#dictionaries) - * Increase zstd decompression speed up to 1.19x. [#259](https://github.com/klauspost/compress/pull/259) - * Remove internal reset call in zstd compression and reduce allocations. [#263](https://github.com/klauspost/compress/pull/263) - -* May 21, 2020: (v1.10.6) - * zstd: Reduce allocations while decoding. [#258](https://github.com/klauspost/compress/pull/258), [#252](https://github.com/klauspost/compress/pull/252) - * zstd: Stricter decompression checks. - -* April 12, 2020: (v1.10.5) - * s2-commands: Flush output when receiving SIGINT. [#239](https://github.com/klauspost/compress/pull/239) - -* Apr 8, 2020: (v1.10.4) - * zstd: Minor/special case optimizations. [#251](https://github.com/klauspost/compress/pull/251), [#250](https://github.com/klauspost/compress/pull/250), [#249](https://github.com/klauspost/compress/pull/249), [#247](https://github.com/klauspost/compress/pull/247) -* Mar 11, 2020: (v1.10.3) - * s2: Use S2 encoder in pure Go mode for Snappy output as well. [#245](https://github.com/klauspost/compress/pull/245) - * s2: Fix pure Go block encoder. [#244](https://github.com/klauspost/compress/pull/244) - * zstd: Added "better compression" mode. [#240](https://github.com/klauspost/compress/pull/240) - * zstd: Improve speed of fastest compression mode by 5-10% [#241](https://github.com/klauspost/compress/pull/241) - * zstd: Skip creating encoders when not needed. [#238](https://github.com/klauspost/compress/pull/238) - -* Feb 27, 2020: (v1.10.2) - * Close to 50% speedup in inflate (gzip/zip decompression). [#236](https://github.com/klauspost/compress/pull/236) [#234](https://github.com/klauspost/compress/pull/234) [#232](https://github.com/klauspost/compress/pull/232) - * Reduce deflate level 1-6 memory usage up to 59%. [#227](https://github.com/klauspost/compress/pull/227) - -* Feb 18, 2020: (v1.10.1) - * Fix zstd crash when resetting multiple times without sending data. [#226](https://github.com/klauspost/compress/pull/226) - * deflate: Fix dictionary use on level 1-6. [#224](https://github.com/klauspost/compress/pull/224) - * Remove deflate writer reference when closing. [#224](https://github.com/klauspost/compress/pull/224) - -* Feb 4, 2020: (v1.10.0) - * Add optional dictionary to [stateless deflate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc#StatelessDeflate). Breaking change, send `nil` for previous behaviour. [#216](https://github.com/klauspost/compress/pull/216) - * Fix buffer overflow on repeated small block deflate. [#218](https://github.com/klauspost/compress/pull/218) - * Allow copying content from an existing ZIP file without decompressing+compressing. [#214](https://github.com/klauspost/compress/pull/214) - * Added [S2](https://github.com/klauspost/compress/tree/master/s2#s2-compression) AMD64 assembler and various optimizations. Stream speed >10GB/s. [#186](https://github.com/klauspost/compress/pull/186) - -
- -
- See changes prior to v1.10.0 - -* Jan 20,2020 (v1.9.8) Optimize gzip/deflate with better size estimates and faster table generation. [#207](https://github.com/klauspost/compress/pull/207) by [luyu6056](https://github.com/luyu6056), [#206](https://github.com/klauspost/compress/pull/206). -* Jan 11, 2020: S2 Encode/Decode will use provided buffer if capacity is big enough. [#204](https://github.com/klauspost/compress/pull/204) -* Jan 5, 2020: (v1.9.7) Fix another zstd regression in v1.9.5 - v1.9.6 removed. -* Jan 4, 2020: (v1.9.6) Regression in v1.9.5 fixed causing corrupt zstd encodes in rare cases. -* Jan 4, 2020: Faster IO in [s2c + s2d commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) compression/decompression. [#192](https://github.com/klauspost/compress/pull/192) -* Dec 29, 2019: Removed v1.9.5 since fuzz tests showed a compatibility problem with the reference zstandard decoder. -* Dec 29, 2019: (v1.9.5) zstd: 10-20% faster block compression. [#199](https://github.com/klauspost/compress/pull/199) -* Dec 29, 2019: [zip](https://godoc.org/github.com/klauspost/compress/zip) package updated with latest Go features -* Dec 29, 2019: zstd: Single segment flag condintions tweaked. [#197](https://github.com/klauspost/compress/pull/197) -* Dec 18, 2019: s2: Faster compression when ReadFrom is used. [#198](https://github.com/klauspost/compress/pull/198) -* Dec 10, 2019: s2: Fix repeat length output when just above at 16MB limit. -* Dec 10, 2019: zstd: Add function to get decoder as io.ReadCloser. [#191](https://github.com/klauspost/compress/pull/191) -* Dec 3, 2019: (v1.9.4) S2: limit max repeat length. [#188](https://github.com/klauspost/compress/pull/188) -* Dec 3, 2019: Add [WithNoEntropyCompression](https://godoc.org/github.com/klauspost/compress/zstd#WithNoEntropyCompression) to zstd [#187](https://github.com/klauspost/compress/pull/187) -* Dec 3, 2019: Reduce memory use for tests. Check for leaked goroutines. -* Nov 28, 2019 (v1.9.3) Less allocations in stateless deflate. -* Nov 28, 2019: 5-20% Faster huff0 decode. Impacts zstd as well. [#184](https://github.com/klauspost/compress/pull/184) -* Nov 12, 2019 (v1.9.2) Added [Stateless Compression](#stateless-compression) for gzip/deflate. -* Nov 12, 2019: Fixed zstd decompression of large single blocks. [#180](https://github.com/klauspost/compress/pull/180) -* Nov 11, 2019: Set default [s2c](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) block size to 4MB. -* Nov 11, 2019: Reduce inflate memory use by 1KB. -* Nov 10, 2019: Less allocations in deflate bit writer. -* Nov 10, 2019: Fix inconsistent error returned by zstd decoder. -* Oct 28, 2019 (v1.9.1) ztsd: Fix crash when compressing blocks. [#174](https://github.com/klauspost/compress/pull/174) -* Oct 24, 2019 (v1.9.0) zstd: Fix rare data corruption [#173](https://github.com/klauspost/compress/pull/173) -* Oct 24, 2019 zstd: Fix huff0 out of buffer write [#171](https://github.com/klauspost/compress/pull/171) and always return errors [#172](https://github.com/klauspost/compress/pull/172) -* Oct 10, 2019: Big deflate rewrite, 30-40% faster with better compression [#105](https://github.com/klauspost/compress/pull/105) - -
- -
- See changes prior to v1.9.0 - -* Oct 10, 2019: (v1.8.6) zstd: Allow partial reads to get flushed data. [#169](https://github.com/klauspost/compress/pull/169) -* Oct 3, 2019: Fix inconsistent results on broken zstd streams. -* Sep 25, 2019: Added `-rm` (remove source files) and `-q` (no output except errors) to `s2c` and `s2d` [commands](https://github.com/klauspost/compress/tree/master/s2#commandline-tools) -* Sep 16, 2019: (v1.8.4) Add `s2c` and `s2d` [commandline tools](https://github.com/klauspost/compress/tree/master/s2#commandline-tools). -* Sep 10, 2019: (v1.8.3) Fix s2 decoder [Skip](https://godoc.org/github.com/klauspost/compress/s2#Reader.Skip). -* Sep 7, 2019: zstd: Added [WithWindowSize](https://godoc.org/github.com/klauspost/compress/zstd#WithWindowSize), contributed by [ianwilkes](https://github.com/ianwilkes). -* Sep 5, 2019: (v1.8.2) Add [WithZeroFrames](https://godoc.org/github.com/klauspost/compress/zstd#WithZeroFrames) which adds full zero payload block encoding option. -* Sep 5, 2019: Lazy initialization of zstandard predefined en/decoder tables. -* Aug 26, 2019: (v1.8.1) S2: 1-2% compression increase in "better" compression mode. -* Aug 26, 2019: zstd: Check maximum size of Huffman 1X compressed literals while decoding. -* Aug 24, 2019: (v1.8.0) Added [S2 compression](https://github.com/klauspost/compress/tree/master/s2#s2-compression), a high performance replacement for Snappy. -* Aug 21, 2019: (v1.7.6) Fixed minor issues found by fuzzer. One could lead to zstd not decompressing. -* Aug 18, 2019: Add [fuzzit](https://fuzzit.dev/) continuous fuzzing. -* Aug 14, 2019: zstd: Skip incompressible data 2x faster. [#147](https://github.com/klauspost/compress/pull/147) -* Aug 4, 2019 (v1.7.5): Better literal compression. [#146](https://github.com/klauspost/compress/pull/146) -* Aug 4, 2019: Faster zstd compression. [#143](https://github.com/klauspost/compress/pull/143) [#144](https://github.com/klauspost/compress/pull/144) -* Aug 4, 2019: Faster zstd decompression. [#145](https://github.com/klauspost/compress/pull/145) [#143](https://github.com/klauspost/compress/pull/143) [#142](https://github.com/klauspost/compress/pull/142) -* July 15, 2019 (v1.7.4): Fix double EOF block in rare cases on zstd encoder. -* July 15, 2019 (v1.7.3): Minor speedup/compression increase in default zstd encoder. -* July 14, 2019: zstd decoder: Fix decompression error on multiple uses with mixed content. -* July 7, 2019 (v1.7.2): Snappy update, zstd decoder potential race fix. -* June 17, 2019: zstd decompression bugfix. -* June 17, 2019: fix 32 bit builds. -* June 17, 2019: Easier use in modules (less dependencies). -* June 9, 2019: New stronger "default" [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression mode. Matches zstd default compression ratio. -* June 5, 2019: 20-40% throughput in [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and better compression. -* June 5, 2019: deflate/gzip compression: Reduce memory usage of lower compression levels. -* June 2, 2019: Added [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression! -* May 25, 2019: deflate/gzip: 10% faster bit writer, mostly visible in lower levels. -* Apr 22, 2019: [zstd](https://github.com/klauspost/compress/tree/master/zstd#zstd) decompression added. -* Aug 1, 2018: Added [huff0 README](https://github.com/klauspost/compress/tree/master/huff0#huff0-entropy-compression). -* Jul 8, 2018: Added [Performance Update 2018](#performance-update-2018) below. -* Jun 23, 2018: Merged [Go 1.11 inflate optimizations](https://go-review.googlesource.com/c/go/+/102235). Go 1.9 is now required. Backwards compatible version tagged with [v1.3.0](https://github.com/klauspost/compress/releases/tag/v1.3.0). -* Apr 2, 2018: Added [huff0](https://godoc.org/github.com/klauspost/compress/huff0) en/decoder. Experimental for now, API may change. -* Mar 4, 2018: Added [FSE Entropy](https://godoc.org/github.com/klauspost/compress/fse) en/decoder. Experimental for now, API may change. -* Nov 3, 2017: Add compression [Estimate](https://godoc.org/github.com/klauspost/compress#Estimate) function. -* May 28, 2017: Reduce allocations when resetting decoder. -* Apr 02, 2017: Change back to official crc32, since changes were merged in Go 1.7. -* Jan 14, 2017: Reduce stack pressure due to array copies. See [Issue #18625](https://github.com/golang/go/issues/18625). -* Oct 25, 2016: Level 2-4 have been rewritten and now offers significantly better performance than before. -* Oct 20, 2016: Port zlib changes from Go 1.7 to fix zlib writer issue. Please update. -* Oct 16, 2016: Go 1.7 changes merged. Apples to apples this package is a few percent faster, but has a significantly better balance between speed and compression per level. -* Mar 24, 2016: Always attempt Huffman encoding on level 4-7. This improves base 64 encoded data compression. -* Mar 24, 2016: Small speedup for level 1-3. -* Feb 19, 2016: Faster bit writer, level -2 is 15% faster, level 1 is 4% faster. -* Feb 19, 2016: Handle small payloads faster in level 1-3. -* Feb 19, 2016: Added faster level 2 + 3 compression modes. -* Feb 19, 2016: [Rebalanced compression levels](https://blog.klauspost.com/rebalancing-deflate-compression-levels/), so there is a more even progresssion in terms of compression. New default level is 5. -* Feb 14, 2016: Snappy: Merge upstream changes. -* Feb 14, 2016: Snappy: Fix aggressive skipping. -* Feb 14, 2016: Snappy: Update benchmark. -* Feb 13, 2016: Deflate: Fixed assembler problem that could lead to sub-optimal compression. -* Feb 12, 2016: Snappy: Added AMD64 SSE 4.2 optimizations to matching, which makes easy to compress material run faster. Typical speedup is around 25%. -* Feb 9, 2016: Added Snappy package fork. This version is 5-7% faster, much more on hard to compress content. -* Jan 30, 2016: Optimize level 1 to 3 by not considering static dictionary or storing uncompressed. ~4-5% speedup. -* Jan 16, 2016: Optimization on deflate level 1,2,3 compression. -* Jan 8 2016: Merge [CL 18317](https://go-review.googlesource.com/#/c/18317): fix reading, writing of zip64 archives. -* Dec 8 2015: Make level 1 and -2 deterministic even if write size differs. -* Dec 8 2015: Split encoding functions, so hashing and matching can potentially be inlined. 1-3% faster on AMD64. 5% faster on other platforms. -* Dec 8 2015: Fixed rare [one byte out-of bounds read](https://github.com/klauspost/compress/issues/20). Please update! -* Nov 23 2015: Optimization on token writer. ~2-4% faster. Contributed by [@dsnet](https://github.com/dsnet). -* Nov 20 2015: Small optimization to bit writer on 64 bit systems. -* Nov 17 2015: Fixed out-of-bound errors if the underlying Writer returned an error. See [#15](https://github.com/klauspost/compress/issues/15). -* Nov 12 2015: Added [io.WriterTo](https://golang.org/pkg/io/#WriterTo) support to gzip/inflate. -* Nov 11 2015: Merged [CL 16669](https://go-review.googlesource.com/#/c/16669/4): archive/zip: enable overriding (de)compressors per file -* Oct 15 2015: Added skipping on uncompressible data. Random data speed up >5x. - -
- -# deflate usage - -The packages are drop-in replacements for standard libraries. Simply replace the import path to use them: - -| old import | new import | Documentation -|--------------------|-----------------------------------------|--------------------| -| `compress/gzip` | `github.com/klauspost/compress/gzip` | [gzip](https://pkg.go.dev/github.com/klauspost/compress/gzip?tab=doc) -| `compress/zlib` | `github.com/klauspost/compress/zlib` | [zlib](https://pkg.go.dev/github.com/klauspost/compress/zlib?tab=doc) -| `archive/zip` | `github.com/klauspost/compress/zip` | [zip](https://pkg.go.dev/github.com/klauspost/compress/zip?tab=doc) -| `compress/flate` | `github.com/klauspost/compress/flate` | [flate](https://pkg.go.dev/github.com/klauspost/compress/flate?tab=doc) - -* Optimized [deflate](https://godoc.org/github.com/klauspost/compress/flate) packages which can be used as a dropin replacement for [gzip](https://godoc.org/github.com/klauspost/compress/gzip), [zip](https://godoc.org/github.com/klauspost/compress/zip) and [zlib](https://godoc.org/github.com/klauspost/compress/zlib). - -You may also be interested in [pgzip](https://github.com/klauspost/pgzip), which is a drop in replacement for gzip, which support multithreaded compression on big files and the optimized [crc32](https://github.com/klauspost/crc32) package used by these packages. - -The packages contains the same as the standard library, so you can use the godoc for that: [gzip](http://golang.org/pkg/compress/gzip/), [zip](http://golang.org/pkg/archive/zip/), [zlib](http://golang.org/pkg/compress/zlib/), [flate](http://golang.org/pkg/compress/flate/). - -Currently there is only minor speedup on decompression (mostly CRC32 calculation). - -Memory usage is typically 1MB for a Writer. stdlib is in the same range. -If you expect to have a lot of concurrently allocated Writers consider using -the stateless compress described below. - -For compression performance, see: [this spreadsheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing). - -# Stateless compression - -This package offers stateless compression as a special option for gzip/deflate. -It will do compression but without maintaining any state between Write calls. - -This means there will be no memory kept between Write calls, but compression and speed will be suboptimal. - -This is only relevant in cases where you expect to run many thousands of compressors concurrently, -but with very little activity. This is *not* intended for regular web servers serving individual requests. - -Because of this, the size of actual Write calls will affect output size. - -In gzip, specify level `-3` / `gzip.StatelessCompression` to enable. - -For direct deflate use, NewStatelessWriter and StatelessDeflate are available. See [documentation](https://godoc.org/github.com/klauspost/compress/flate#NewStatelessWriter) - -A `bufio.Writer` can of course be used to control write sizes. For example, to use a 4KB buffer: - -``` - // replace 'ioutil.Discard' with your output. - gzw, err := gzip.NewWriterLevel(ioutil.Discard, gzip.StatelessCompression) - if err != nil { - return err - } - defer gzw.Close() - - w := bufio.NewWriterSize(gzw, 4096) - defer w.Flush() - - // Write to 'w' -``` - -This will only use up to 4KB in memory when the writer is idle. - -Compression is almost always worse than the fastest compression level -and each write will allocate (a little) memory. - -# Performance Update 2018 - -It has been a while since we have been looking at the speed of this package compared to the standard library, so I thought I would re-do my tests and give some overall recommendations based on the current state. All benchmarks have been performed with Go 1.10 on my Desktop Intel(R) Core(TM) i7-2600 CPU @3.40GHz. Since I last ran the tests, I have gotten more RAM, which means tests with big files are no longer limited by my SSD. - -The raw results are in my [updated spreadsheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing). Due to cgo changes and upstream updates i could not get the cgo version of gzip to compile. Instead I included the [zstd](https://github.com/datadog/zstd) cgo implementation. If I get cgo gzip to work again, I might replace the results in the sheet. - -The columns to take note of are: *MB/s* - the throughput. *Reduction* - the data size reduction in percent of the original. *Rel Speed* relative speed compared to the standard library at the same level. *Smaller* - how many percent smaller is the compressed output compared to stdlib. Negative means the output was bigger. *Loss* means the loss (or gain) in compression as a percentage difference of the input. - -The `gzstd` (standard library gzip) and `gzkp` (this package gzip) only uses one CPU core. [`pgzip`](https://github.com/klauspost/pgzip), [`bgzf`](https://github.com/biogo/hts/tree/master/bgzf) uses all 4 cores. [`zstd`](https://github.com/DataDog/zstd) uses one core, and is a beast (but not Go, yet). - - -## Overall differences. - -There appears to be a roughly 5-10% speed advantage over the standard library when comparing at similar compression levels. - -The biggest difference you will see is the result of [re-balancing](https://blog.klauspost.com/rebalancing-deflate-compression-levels/) the compression levels. I wanted by library to give a smoother transition between the compression levels than the standard library. - -This package attempts to provide a more smooth transition, where "1" is taking a lot of shortcuts, "5" is the reasonable trade-off and "9" is the "give me the best compression", and the values in between gives something reasonable in between. The standard library has big differences in levels 1-4, but levels 5-9 having no significant gains - often spending a lot more time than can be justified by the achieved compression. - -There are links to all the test data in the [spreadsheet](https://docs.google.com/spreadsheets/d/1nuNE2nPfuINCZJRMt6wFWhKpToF95I47XjSsc-1rbPQ/edit?usp=sharing) in the top left field on each tab. - -## Web Content - -This test set aims to emulate typical use in a web server. The test-set is 4GB data in 53k files, and is a mixture of (mostly) HTML, JS, CSS. - -Since level 1 and 9 are close to being the same code, they are quite close. But looking at the levels in-between the differences are quite big. - -Looking at level 6, this package is 88% faster, but will output about 6% more data. For a web server, this means you can serve 88% more data, but have to pay for 6% more bandwidth. You can draw your own conclusions on what would be the most expensive for your case. - -## Object files - -This test is for typical data files stored on a server. In this case it is a collection of Go precompiled objects. They are very compressible. - -The picture is similar to the web content, but with small differences since this is very compressible. Levels 2-3 offer good speed, but is sacrificing quite a bit of compression. - -The standard library seems suboptimal on level 3 and 4 - offering both worse compression and speed than level 6 & 7 of this package respectively. - -## Highly Compressible File - -This is a JSON file with very high redundancy. The reduction starts at 95% on level 1, so in real life terms we are dealing with something like a highly redundant stream of data, etc. - -It is definitely visible that we are dealing with specialized content here, so the results are very scattered. This package does not do very well at levels 1-4, but picks up significantly at level 5 and levels 7 and 8 offering great speed for the achieved compression. - -So if you know you content is extremely compressible you might want to go slightly higher than the defaults. The standard library has a huge gap between levels 3 and 4 in terms of speed (2.75x slowdown), so it offers little "middle ground". - -## Medium-High Compressible - -This is a pretty common test corpus: [enwik9](http://mattmahoney.net/dc/textdata.html). It contains the first 10^9 bytes of the English Wikipedia dump on Mar. 3, 2006. This is a very good test of typical text based compression and more data heavy streams. - -We see a similar picture here as in "Web Content". On equal levels some compression is sacrificed for more speed. Level 5 seems to be the best trade-off between speed and size, beating stdlib level 3 in both. - -## Medium Compressible - -I will combine two test sets, one [10GB file set](http://mattmahoney.net/dc/10gb.html) and a VM disk image (~8GB). Both contain different data types and represent a typical backup scenario. - -The most notable thing is how quickly the standard library drops to very low compression speeds around level 5-6 without any big gains in compression. Since this type of data is fairly common, this does not seem like good behavior. - - -## Un-compressible Content - -This is mainly a test of how good the algorithms are at detecting un-compressible input. The standard library only offers this feature with very conservative settings at level 1. Obviously there is no reason for the algorithms to try to compress input that cannot be compressed. The only downside is that it might skip some compressible data on false detections. - - -## Huffman only compression - -This compression library adds a special compression level, named `HuffmanOnly`, which allows near linear time compression. This is done by completely disabling matching of previous data, and only reduce the number of bits to represent each character. - -This means that often used characters, like 'e' and ' ' (space) in text use the fewest bits to represent, and rare characters like '¤' takes more bits to represent. For more information see [wikipedia](https://en.wikipedia.org/wiki/Huffman_coding) or this nice [video](https://youtu.be/ZdooBTdW5bM). - -Since this type of compression has much less variance, the compression speed is mostly unaffected by the input data, and is usually more than *180MB/s* for a single core. - -The downside is that the compression ratio is usually considerably worse than even the fastest conventional compression. The compression ratio can never be better than 8:1 (12.5%). - -The linear time compression can be used as a "better than nothing" mode, where you cannot risk the encoder to slow down on some content. For comparison, the size of the "Twain" text is *233460 bytes* (+29% vs. level 1) and encode speed is 144MB/s (4.5x level 1). So in this case you trade a 30% size increase for a 4 times speedup. - -For more information see my blog post on [Fast Linear Time Compression](http://blog.klauspost.com/constant-time-gzipzip-compression/). - -This is implemented on Go 1.7 as "Huffman Only" mode, though not exposed for gzip. - -# Other packages - -Here are other packages of good quality and pure Go (no cgo wrappers or autoconverted code): - -* [github.com/pierrec/lz4](https://github.com/pierrec/lz4) - strong multithreaded LZ4 compression. -* [github.com/cosnicolaou/pbzip2](https://github.com/cosnicolaou/pbzip2) - multithreaded bzip2 decompression. -* [github.com/dsnet/compress](https://github.com/dsnet/compress) - brotli decompression, bzip2 writer. -* [github.com/ronanh/intcomp](https://github.com/ronanh/intcomp) - Integer compression. -* [github.com/spenczar/fpc](https://github.com/spenczar/fpc) - Float compression. -* [github.com/minio/zipindex](https://github.com/minio/zipindex) - External ZIP directory index. - -# license - -This code is licensed under the same conditions as the original Go code. See LICENSE file. diff --git a/vendor/github.com/klauspost/compress/SECURITY.md b/vendor/github.com/klauspost/compress/SECURITY.md deleted file mode 100644 index ca6685e2..00000000 --- a/vendor/github.com/klauspost/compress/SECURITY.md +++ /dev/null @@ -1,25 +0,0 @@ -# Security Policy - -## Supported Versions - -Security updates are applied only to the latest release. - -## Vulnerability Definition - -A security vulnerability is a bug that with certain input triggers a crash or an infinite loop. Most calls will have varying execution time and only in rare cases will slow operation be considered a security vulnerability. - -Corrupted output generally is not considered a security vulnerability, unless independent operations are able to affect each other. Note that not all functionality is re-entrant and safe to use concurrently. - -Out-of-memory crashes only applies if the en/decoder uses an abnormal amount of memory, with appropriate options applied, to limit maximum window size, concurrency, etc. However, if you are in doubt you are welcome to file a security issue. - -It is assumed that all callers are trusted, meaning internal data exposed through reflection or inspection of returned data structures is not considered a vulnerability. - -Vulnerabilities resulting from compiler/assembler errors should be reported upstream. Depending on the severity this package may or may not implement a workaround. - -## Reporting a Vulnerability - -If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. - -Please disclose it at [security advisory](https://github.com/klauspost/compress/security/advisories/new). If possible please provide a minimal reproducer. If the issue only applies to a single platform, it would be helpful to provide access to that. - -This project is maintained by a team of volunteers on a reasonable-effort basis. As such, vulnerabilities will be disclosed in a best effort base. diff --git a/vendor/github.com/klauspost/compress/compressible.go b/vendor/github.com/klauspost/compress/compressible.go deleted file mode 100644 index ea5a692d..00000000 --- a/vendor/github.com/klauspost/compress/compressible.go +++ /dev/null @@ -1,85 +0,0 @@ -package compress - -import "math" - -// Estimate returns a normalized compressibility estimate of block b. -// Values close to zero are likely uncompressible. -// Values above 0.1 are likely to be compressible. -// Values above 0.5 are very compressible. -// Very small lengths will return 0. -func Estimate(b []byte) float64 { - if len(b) < 16 { - return 0 - } - - // Correctly predicted order 1 - hits := 0 - lastMatch := false - var o1 [256]byte - var hist [256]int - c1 := byte(0) - for _, c := range b { - if c == o1[c1] { - // We only count a hit if there was two correct predictions in a row. - if lastMatch { - hits++ - } - lastMatch = true - } else { - lastMatch = false - } - o1[c1] = c - c1 = c - hist[c]++ - } - - // Use x^0.6 to give better spread - prediction := math.Pow(float64(hits)/float64(len(b)), 0.6) - - // Calculate histogram distribution - variance := float64(0) - avg := float64(len(b)) / 256 - - for _, v := range hist { - Δ := float64(v) - avg - variance += Δ * Δ - } - - stddev := math.Sqrt(float64(variance)) / float64(len(b)) - exp := math.Sqrt(1 / float64(len(b))) - - // Subtract expected stddev - stddev -= exp - if stddev < 0 { - stddev = 0 - } - stddev *= 1 + exp - - // Use x^0.4 to give better spread - entropy := math.Pow(stddev, 0.4) - - // 50/50 weight between prediction and histogram distribution - return math.Pow((prediction+entropy)/2, 0.9) -} - -// ShannonEntropyBits returns the number of bits minimum required to represent -// an entropy encoding of the input bytes. -// https://en.wiktionary.org/wiki/Shannon_entropy -func ShannonEntropyBits(b []byte) int { - if len(b) == 0 { - return 0 - } - var hist [256]int - for _, c := range b { - hist[c]++ - } - shannon := float64(0) - invTotal := 1.0 / float64(len(b)) - for _, v := range hist[:] { - if v > 0 { - n := float64(v) - shannon += math.Ceil(-math.Log2(n*invTotal) * n) - } - } - return int(math.Ceil(shannon)) -} diff --git a/vendor/github.com/klauspost/compress/fse/README.md b/vendor/github.com/klauspost/compress/fse/README.md deleted file mode 100644 index ea7324da..00000000 --- a/vendor/github.com/klauspost/compress/fse/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Finite State Entropy - -This package provides Finite State Entropy encoding and decoding. - -Finite State Entropy (also referenced as [tANS](https://en.wikipedia.org/wiki/Asymmetric_numeral_systems#tANS)) -encoding provides a fast near-optimal symbol encoding/decoding -for byte blocks as implemented in [zstandard](https://github.com/facebook/zstd). - -This can be used for compressing input with a lot of similar input values to the smallest number of bytes. -This does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders, -but it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding. - -* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/fse) - -## News - - * Feb 2018: First implementation released. Consider this beta software for now. - -# Usage - -This package provides a low level interface that allows to compress single independent blocks. - -Each block is separate, and there is no built in integrity checks. -This means that the caller should keep track of block sizes and also do checksums if needed. - -Compressing a block is done via the [`Compress`](https://godoc.org/github.com/klauspost/compress/fse#Compress) function. -You must provide input and will receive the output and maybe an error. - -These error values can be returned: - -| Error | Description | -|---------------------|-----------------------------------------------------------------------------| -| `` | Everything ok, output is returned | -| `ErrIncompressible` | Returned when input is judged to be too hard to compress | -| `ErrUseRLE` | Returned from the compressor when the input is a single byte value repeated | -| `(error)` | An internal error occurred. | - -As can be seen above there are errors that will be returned even under normal operation so it is important to handle these. - -To reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/fse#Scratch) object -that can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same -object can be used for both. - -Be aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this -you must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output. - -Decompressing is done by calling the [`Decompress`](https://godoc.org/github.com/klauspost/compress/fse#Decompress) function. -You must provide the output from the compression stage, at exactly the size you got back. If you receive an error back -your input was likely corrupted. - -It is important to note that a successful decoding does *not* mean your output matches your original input. -There are no integrity checks, so relying on errors from the decompressor does not assure your data is valid. - -For more detailed usage, see examples in the [godoc documentation](https://godoc.org/github.com/klauspost/compress/fse#pkg-examples). - -# Performance - -A lot of factors are affecting speed. Block sizes and compressibility of the material are primary factors. -All compression functions are currently only running on the calling goroutine so only one core will be used per block. - -The compressor is significantly faster if symbols are kept as small as possible. The highest byte value of the input -is used to reduce some of the processing, so if all your input is above byte value 64 for instance, it may be -beneficial to transpose all your input values down by 64. - -With moderate block sizes around 64k speed are typically 200MB/s per core for compression and -around 300MB/s decompression speed. - -The same hardware typically does Huffman (deflate) encoding at 125MB/s and decompression at 100MB/s. - -# Plans - -At one point, more internals will be exposed to facilitate more "expert" usage of the components. - -A streaming interface is also likely to be implemented. Likely compatible with [FSE stream format](https://github.com/Cyan4973/FiniteStateEntropy/blob/dev/programs/fileio.c#L261). - -# Contributing - -Contributions are always welcome. Be aware that adding public functions will require good justification and breaking -changes will likely not be accepted. If in doubt open an issue before writing the PR. \ No newline at end of file diff --git a/vendor/github.com/klauspost/compress/fse/bitreader.go b/vendor/github.com/klauspost/compress/fse/bitreader.go deleted file mode 100644 index f65eb390..00000000 --- a/vendor/github.com/klauspost/compress/fse/bitreader.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package fse - -import ( - "encoding/binary" - "errors" - "io" -) - -// bitReader reads a bitstream in reverse. -// The last set bit indicates the start of the stream and is used -// for aligning the input. -type bitReader struct { - in []byte - off uint // next byte to read is at in[off - 1] - value uint64 - bitsRead uint8 -} - -// init initializes and resets the bit reader. -func (b *bitReader) init(in []byte) error { - if len(in) < 1 { - return errors.New("corrupt stream: too short") - } - b.in = in - b.off = uint(len(in)) - // The highest bit of the last byte indicates where to start - v := in[len(in)-1] - if v == 0 { - return errors.New("corrupt stream, did not find end of stream") - } - b.bitsRead = 64 - b.value = 0 - if len(in) >= 8 { - b.fillFastStart() - } else { - b.fill() - b.fill() - } - b.bitsRead += 8 - uint8(highBits(uint32(v))) - return nil -} - -// getBits will return n bits. n can be 0. -func (b *bitReader) getBits(n uint8) uint16 { - if n == 0 || b.bitsRead >= 64 { - return 0 - } - return b.getBitsFast(n) -} - -// getBitsFast requires that at least one bit is requested every time. -// There are no checks if the buffer is filled. -func (b *bitReader) getBitsFast(n uint8) uint16 { - const regMask = 64 - 1 - v := uint16((b.value << (b.bitsRead & regMask)) >> ((regMask + 1 - n) & regMask)) - b.bitsRead += n - return v -} - -// fillFast() will make sure at least 32 bits are available. -// There must be at least 4 bytes available. -func (b *bitReader) fillFast() { - if b.bitsRead < 32 { - return - } - // 2 bounds checks. - v := b.in[b.off-4:] - v = v[:4] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value = (b.value << 32) | uint64(low) - b.bitsRead -= 32 - b.off -= 4 -} - -// fill() will make sure at least 32 bits are available. -func (b *bitReader) fill() { - if b.bitsRead < 32 { - return - } - if b.off > 4 { - v := b.in[b.off-4:] - v = v[:4] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value = (b.value << 32) | uint64(low) - b.bitsRead -= 32 - b.off -= 4 - return - } - for b.off > 0 { - b.value = (b.value << 8) | uint64(b.in[b.off-1]) - b.bitsRead -= 8 - b.off-- - } -} - -// fillFastStart() assumes the bitreader is empty and there is at least 8 bytes to read. -func (b *bitReader) fillFastStart() { - // Do single re-slice to avoid bounds checks. - b.value = binary.LittleEndian.Uint64(b.in[b.off-8:]) - b.bitsRead = 0 - b.off -= 8 -} - -// finished returns true if all bits have been read from the bit stream. -func (b *bitReader) finished() bool { - return b.bitsRead >= 64 && b.off == 0 -} - -// close the bitstream and returns an error if out-of-buffer reads occurred. -func (b *bitReader) close() error { - // Release reference. - b.in = nil - if b.bitsRead > 64 { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/vendor/github.com/klauspost/compress/fse/bitwriter.go b/vendor/github.com/klauspost/compress/fse/bitwriter.go deleted file mode 100644 index e82fa3bb..00000000 --- a/vendor/github.com/klauspost/compress/fse/bitwriter.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package fse - -import "fmt" - -// bitWriter will write bits. -// First bit will be LSB of the first byte of output. -type bitWriter struct { - bitContainer uint64 - nBits uint8 - out []byte -} - -// bitMask16 is bitmasks. Has extra to avoid bounds check. -var bitMask16 = [32]uint16{ - 0, 1, 3, 7, 0xF, 0x1F, - 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, - 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, 0xFFFF, - 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - 0xFFFF, 0xFFFF} /* up to 16 bits */ - -// addBits16NC will add up to 16 bits. -// It will not check if there is space for them, -// so the caller must ensure that it has flushed recently. -func (b *bitWriter) addBits16NC(value uint16, bits uint8) { - b.bitContainer |= uint64(value&bitMask16[bits&31]) << (b.nBits & 63) - b.nBits += bits -} - -// addBits16Clean will add up to 16 bits. value may not contain more set bits than indicated. -// It will not check if there is space for them, so the caller must ensure that it has flushed recently. -func (b *bitWriter) addBits16Clean(value uint16, bits uint8) { - b.bitContainer |= uint64(value) << (b.nBits & 63) - b.nBits += bits -} - -// addBits16ZeroNC will add up to 16 bits. -// It will not check if there is space for them, -// so the caller must ensure that it has flushed recently. -// This is fastest if bits can be zero. -func (b *bitWriter) addBits16ZeroNC(value uint16, bits uint8) { - if bits == 0 { - return - } - value <<= (16 - bits) & 15 - value >>= (16 - bits) & 15 - b.bitContainer |= uint64(value) << (b.nBits & 63) - b.nBits += bits -} - -// flush will flush all pending full bytes. -// There will be at least 56 bits available for writing when this has been called. -// Using flush32 is faster, but leaves less space for writing. -func (b *bitWriter) flush() { - v := b.nBits >> 3 - switch v { - case 0: - case 1: - b.out = append(b.out, - byte(b.bitContainer), - ) - case 2: - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - ) - case 3: - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - ) - case 4: - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24), - ) - case 5: - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24), - byte(b.bitContainer>>32), - ) - case 6: - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24), - byte(b.bitContainer>>32), - byte(b.bitContainer>>40), - ) - case 7: - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24), - byte(b.bitContainer>>32), - byte(b.bitContainer>>40), - byte(b.bitContainer>>48), - ) - case 8: - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24), - byte(b.bitContainer>>32), - byte(b.bitContainer>>40), - byte(b.bitContainer>>48), - byte(b.bitContainer>>56), - ) - default: - panic(fmt.Errorf("bits (%d) > 64", b.nBits)) - } - b.bitContainer >>= v << 3 - b.nBits &= 7 -} - -// flush32 will flush out, so there are at least 32 bits available for writing. -func (b *bitWriter) flush32() { - if b.nBits < 32 { - return - } - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24)) - b.nBits -= 32 - b.bitContainer >>= 32 -} - -// flushAlign will flush remaining full bytes and align to next byte boundary. -func (b *bitWriter) flushAlign() { - nbBytes := (b.nBits + 7) >> 3 - for i := uint8(0); i < nbBytes; i++ { - b.out = append(b.out, byte(b.bitContainer>>(i*8))) - } - b.nBits = 0 - b.bitContainer = 0 -} - -// close will write the alignment bit and write the final byte(s) -// to the output. -func (b *bitWriter) close() { - // End mark - b.addBits16Clean(1, 1) - // flush until next byte. - b.flushAlign() -} - -// reset and continue writing by appending to out. -func (b *bitWriter) reset(out []byte) { - b.bitContainer = 0 - b.nBits = 0 - b.out = out -} diff --git a/vendor/github.com/klauspost/compress/fse/bytereader.go b/vendor/github.com/klauspost/compress/fse/bytereader.go deleted file mode 100644 index abade2d6..00000000 --- a/vendor/github.com/klauspost/compress/fse/bytereader.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package fse - -// byteReader provides a byte reader that reads -// little endian values from a byte stream. -// The input stream is manually advanced. -// The reader performs no bounds checks. -type byteReader struct { - b []byte - off int -} - -// init will initialize the reader and set the input. -func (b *byteReader) init(in []byte) { - b.b = in - b.off = 0 -} - -// advance the stream b n bytes. -func (b *byteReader) advance(n uint) { - b.off += int(n) -} - -// Uint32 returns a little endian uint32 starting at current offset. -func (b byteReader) Uint32() uint32 { - b2 := b.b[b.off:] - b2 = b2[:4] - v3 := uint32(b2[3]) - v2 := uint32(b2[2]) - v1 := uint32(b2[1]) - v0 := uint32(b2[0]) - return v0 | (v1 << 8) | (v2 << 16) | (v3 << 24) -} - -// unread returns the unread portion of the input. -func (b byteReader) unread() []byte { - return b.b[b.off:] -} - -// remain will return the number of bytes remaining. -func (b byteReader) remain() int { - return len(b.b) - b.off -} diff --git a/vendor/github.com/klauspost/compress/fse/compress.go b/vendor/github.com/klauspost/compress/fse/compress.go deleted file mode 100644 index 65d77735..00000000 --- a/vendor/github.com/klauspost/compress/fse/compress.go +++ /dev/null @@ -1,683 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package fse - -import ( - "errors" - "fmt" -) - -// Compress the input bytes. Input must be < 2GB. -// Provide a Scratch buffer to avoid memory allocations. -// Note that the output is also kept in the scratch buffer. -// If input is too hard to compress, ErrIncompressible is returned. -// If input is a single byte value repeated ErrUseRLE is returned. -func Compress(in []byte, s *Scratch) ([]byte, error) { - if len(in) <= 1 { - return nil, ErrIncompressible - } - if len(in) > (2<<30)-1 { - return nil, errors.New("input too big, must be < 2GB") - } - s, err := s.prepare(in) - if err != nil { - return nil, err - } - - // Create histogram, if none was provided. - maxCount := s.maxCount - if maxCount == 0 { - maxCount = s.countSimple(in) - } - // Reset for next run. - s.clearCount = true - s.maxCount = 0 - if maxCount == len(in) { - // One symbol, use RLE - return nil, ErrUseRLE - } - if maxCount == 1 || maxCount < (len(in)>>7) { - // Each symbol present maximum once or too well distributed. - return nil, ErrIncompressible - } - s.optimalTableLog() - err = s.normalizeCount() - if err != nil { - return nil, err - } - err = s.writeCount() - if err != nil { - return nil, err - } - - if false { - err = s.validateNorm() - if err != nil { - return nil, err - } - } - - err = s.buildCTable() - if err != nil { - return nil, err - } - err = s.compress(in) - if err != nil { - return nil, err - } - s.Out = s.bw.out - // Check if we compressed. - if len(s.Out) >= len(in) { - return nil, ErrIncompressible - } - return s.Out, nil -} - -// cState contains the compression state of a stream. -type cState struct { - bw *bitWriter - stateTable []uint16 - state uint16 -} - -// init will initialize the compression state to the first symbol of the stream. -func (c *cState) init(bw *bitWriter, ct *cTable, tableLog uint8, first symbolTransform) { - c.bw = bw - c.stateTable = ct.stateTable - - nbBitsOut := (first.deltaNbBits + (1 << 15)) >> 16 - im := int32((nbBitsOut << 16) - first.deltaNbBits) - lu := (im >> nbBitsOut) + first.deltaFindState - c.state = c.stateTable[lu] -} - -// encode the output symbol provided and write it to the bitstream. -func (c *cState) encode(symbolTT symbolTransform) { - nbBitsOut := (uint32(c.state) + symbolTT.deltaNbBits) >> 16 - dstState := int32(c.state>>(nbBitsOut&15)) + symbolTT.deltaFindState - c.bw.addBits16NC(c.state, uint8(nbBitsOut)) - c.state = c.stateTable[dstState] -} - -// encode the output symbol provided and write it to the bitstream. -func (c *cState) encodeZero(symbolTT symbolTransform) { - nbBitsOut := (uint32(c.state) + symbolTT.deltaNbBits) >> 16 - dstState := int32(c.state>>(nbBitsOut&15)) + symbolTT.deltaFindState - c.bw.addBits16ZeroNC(c.state, uint8(nbBitsOut)) - c.state = c.stateTable[dstState] -} - -// flush will write the tablelog to the output and flush the remaining full bytes. -func (c *cState) flush(tableLog uint8) { - c.bw.flush32() - c.bw.addBits16NC(c.state, tableLog) - c.bw.flush() -} - -// compress is the main compression loop that will encode the input from the last byte to the first. -func (s *Scratch) compress(src []byte) error { - if len(src) <= 2 { - return errors.New("compress: src too small") - } - tt := s.ct.symbolTT[:256] - s.bw.reset(s.Out) - - // Our two states each encodes every second byte. - // Last byte encoded (first byte decoded) will always be encoded by c1. - var c1, c2 cState - - // Encode so remaining size is divisible by 4. - ip := len(src) - if ip&1 == 1 { - c1.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-1]]) - c2.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-2]]) - c1.encodeZero(tt[src[ip-3]]) - ip -= 3 - } else { - c2.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-1]]) - c1.init(&s.bw, &s.ct, s.actualTableLog, tt[src[ip-2]]) - ip -= 2 - } - if ip&2 != 0 { - c2.encodeZero(tt[src[ip-1]]) - c1.encodeZero(tt[src[ip-2]]) - ip -= 2 - } - src = src[:ip] - - // Main compression loop. - switch { - case !s.zeroBits && s.actualTableLog <= 8: - // We can encode 4 symbols without requiring a flush. - // We do not need to check if any output is 0 bits. - for ; len(src) >= 4; src = src[:len(src)-4] { - s.bw.flush32() - v3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1] - c2.encode(tt[v0]) - c1.encode(tt[v1]) - c2.encode(tt[v2]) - c1.encode(tt[v3]) - } - case !s.zeroBits: - // We do not need to check if any output is 0 bits. - for ; len(src) >= 4; src = src[:len(src)-4] { - s.bw.flush32() - v3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1] - c2.encode(tt[v0]) - c1.encode(tt[v1]) - s.bw.flush32() - c2.encode(tt[v2]) - c1.encode(tt[v3]) - } - case s.actualTableLog <= 8: - // We can encode 4 symbols without requiring a flush - for ; len(src) >= 4; src = src[:len(src)-4] { - s.bw.flush32() - v3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1] - c2.encodeZero(tt[v0]) - c1.encodeZero(tt[v1]) - c2.encodeZero(tt[v2]) - c1.encodeZero(tt[v3]) - } - default: - for ; len(src) >= 4; src = src[:len(src)-4] { - s.bw.flush32() - v3, v2, v1, v0 := src[len(src)-4], src[len(src)-3], src[len(src)-2], src[len(src)-1] - c2.encodeZero(tt[v0]) - c1.encodeZero(tt[v1]) - s.bw.flush32() - c2.encodeZero(tt[v2]) - c1.encodeZero(tt[v3]) - } - } - - // Flush final state. - // Used to initialize state when decoding. - c2.flush(s.actualTableLog) - c1.flush(s.actualTableLog) - - s.bw.close() - return nil -} - -// writeCount will write the normalized histogram count to header. -// This is read back by readNCount. -func (s *Scratch) writeCount() error { - var ( - tableLog = s.actualTableLog - tableSize = 1 << tableLog - previous0 bool - charnum uint16 - - maxHeaderSize = ((int(s.symbolLen) * int(tableLog)) >> 3) + 3 - - // Write Table Size - bitStream = uint32(tableLog - minTablelog) - bitCount = uint(4) - remaining = int16(tableSize + 1) /* +1 for extra accuracy */ - threshold = int16(tableSize) - nbBits = uint(tableLog + 1) - ) - if cap(s.Out) < maxHeaderSize { - s.Out = make([]byte, 0, s.br.remain()+maxHeaderSize) - } - outP := uint(0) - out := s.Out[:maxHeaderSize] - - // stops at 1 - for remaining > 1 { - if previous0 { - start := charnum - for s.norm[charnum] == 0 { - charnum++ - } - for charnum >= start+24 { - start += 24 - bitStream += uint32(0xFFFF) << bitCount - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += 2 - bitStream >>= 16 - } - for charnum >= start+3 { - start += 3 - bitStream += 3 << bitCount - bitCount += 2 - } - bitStream += uint32(charnum-start) << bitCount - bitCount += 2 - if bitCount > 16 { - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += 2 - bitStream >>= 16 - bitCount -= 16 - } - } - - count := s.norm[charnum] - charnum++ - max := (2*threshold - 1) - remaining - if count < 0 { - remaining += count - } else { - remaining -= count - } - count++ // +1 for extra accuracy - if count >= threshold { - count += max // [0..max[ [max..threshold[ (...) [threshold+max 2*threshold[ - } - bitStream += uint32(count) << bitCount - bitCount += nbBits - if count < max { - bitCount-- - } - - previous0 = count == 1 - if remaining < 1 { - return errors.New("internal error: remaining<1") - } - for remaining < threshold { - nbBits-- - threshold >>= 1 - } - - if bitCount > 16 { - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += 2 - bitStream >>= 16 - bitCount -= 16 - } - } - - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += (bitCount + 7) / 8 - - if charnum > s.symbolLen { - return errors.New("internal error: charnum > s.symbolLen") - } - s.Out = out[:outP] - return nil -} - -// symbolTransform contains the state transform for a symbol. -type symbolTransform struct { - deltaFindState int32 - deltaNbBits uint32 -} - -// String prints values as a human readable string. -func (s symbolTransform) String() string { - return fmt.Sprintf("dnbits: %08x, fs:%d", s.deltaNbBits, s.deltaFindState) -} - -// cTable contains tables used for compression. -type cTable struct { - tableSymbol []byte - stateTable []uint16 - symbolTT []symbolTransform -} - -// allocCtable will allocate tables needed for compression. -// If existing tables a re big enough, they are simply re-used. -func (s *Scratch) allocCtable() { - tableSize := 1 << s.actualTableLog - // get tableSymbol that is big enough. - if cap(s.ct.tableSymbol) < tableSize { - s.ct.tableSymbol = make([]byte, tableSize) - } - s.ct.tableSymbol = s.ct.tableSymbol[:tableSize] - - ctSize := tableSize - if cap(s.ct.stateTable) < ctSize { - s.ct.stateTable = make([]uint16, ctSize) - } - s.ct.stateTable = s.ct.stateTable[:ctSize] - - if cap(s.ct.symbolTT) < 256 { - s.ct.symbolTT = make([]symbolTransform, 256) - } - s.ct.symbolTT = s.ct.symbolTT[:256] -} - -// buildCTable will populate the compression table so it is ready to be used. -func (s *Scratch) buildCTable() error { - tableSize := uint32(1 << s.actualTableLog) - highThreshold := tableSize - 1 - var cumul [maxSymbolValue + 2]int16 - - s.allocCtable() - tableSymbol := s.ct.tableSymbol[:tableSize] - // symbol start positions - { - cumul[0] = 0 - for ui, v := range s.norm[:s.symbolLen-1] { - u := byte(ui) // one less than reference - if v == -1 { - // Low proba symbol - cumul[u+1] = cumul[u] + 1 - tableSymbol[highThreshold] = u - highThreshold-- - } else { - cumul[u+1] = cumul[u] + v - } - } - // Encode last symbol separately to avoid overflowing u - u := int(s.symbolLen - 1) - v := s.norm[s.symbolLen-1] - if v == -1 { - // Low proba symbol - cumul[u+1] = cumul[u] + 1 - tableSymbol[highThreshold] = byte(u) - highThreshold-- - } else { - cumul[u+1] = cumul[u] + v - } - if uint32(cumul[s.symbolLen]) != tableSize { - return fmt.Errorf("internal error: expected cumul[s.symbolLen] (%d) == tableSize (%d)", cumul[s.symbolLen], tableSize) - } - cumul[s.symbolLen] = int16(tableSize) + 1 - } - // Spread symbols - s.zeroBits = false - { - step := tableStep(tableSize) - tableMask := tableSize - 1 - var position uint32 - // if any symbol > largeLimit, we may have 0 bits output. - largeLimit := int16(1 << (s.actualTableLog - 1)) - for ui, v := range s.norm[:s.symbolLen] { - symbol := byte(ui) - if v > largeLimit { - s.zeroBits = true - } - for nbOccurrences := int16(0); nbOccurrences < v; nbOccurrences++ { - tableSymbol[position] = symbol - position = (position + step) & tableMask - for position > highThreshold { - position = (position + step) & tableMask - } /* Low proba area */ - } - } - - // Check if we have gone through all positions - if position != 0 { - return errors.New("position!=0") - } - } - - // Build table - table := s.ct.stateTable - { - tsi := int(tableSize) - for u, v := range tableSymbol { - // TableU16 : sorted by symbol order; gives next state value - table[cumul[v]] = uint16(tsi + u) - cumul[v]++ - } - } - - // Build Symbol Transformation Table - { - total := int16(0) - symbolTT := s.ct.symbolTT[:s.symbolLen] - tableLog := s.actualTableLog - tl := (uint32(tableLog) << 16) - (1 << tableLog) - for i, v := range s.norm[:s.symbolLen] { - switch v { - case 0: - case -1, 1: - symbolTT[i].deltaNbBits = tl - symbolTT[i].deltaFindState = int32(total - 1) - total++ - default: - maxBitsOut := uint32(tableLog) - highBits(uint32(v-1)) - minStatePlus := uint32(v) << maxBitsOut - symbolTT[i].deltaNbBits = (maxBitsOut << 16) - minStatePlus - symbolTT[i].deltaFindState = int32(total - v) - total += v - } - } - if total != int16(tableSize) { - return fmt.Errorf("total mismatch %d (got) != %d (want)", total, tableSize) - } - } - return nil -} - -// countSimple will create a simple histogram in s.count. -// Returns the biggest count. -// Does not update s.clearCount. -func (s *Scratch) countSimple(in []byte) (max int) { - for _, v := range in { - s.count[v]++ - } - m, symlen := uint32(0), s.symbolLen - for i, v := range s.count[:] { - if v == 0 { - continue - } - if v > m { - m = v - } - symlen = uint16(i) + 1 - } - s.symbolLen = symlen - return int(m) -} - -// minTableLog provides the minimum logSize to safely represent a distribution. -func (s *Scratch) minTableLog() uint8 { - minBitsSrc := highBits(uint32(s.br.remain()-1)) + 1 - minBitsSymbols := highBits(uint32(s.symbolLen-1)) + 2 - if minBitsSrc < minBitsSymbols { - return uint8(minBitsSrc) - } - return uint8(minBitsSymbols) -} - -// optimalTableLog calculates and sets the optimal tableLog in s.actualTableLog -func (s *Scratch) optimalTableLog() { - tableLog := s.TableLog - minBits := s.minTableLog() - maxBitsSrc := uint8(highBits(uint32(s.br.remain()-1))) - 2 - if maxBitsSrc < tableLog { - // Accuracy can be reduced - tableLog = maxBitsSrc - } - if minBits > tableLog { - tableLog = minBits - } - // Need a minimum to safely represent all symbol values - if tableLog < minTablelog { - tableLog = minTablelog - } - if tableLog > maxTableLog { - tableLog = maxTableLog - } - s.actualTableLog = tableLog -} - -var rtbTable = [...]uint32{0, 473195, 504333, 520860, 550000, 700000, 750000, 830000} - -// normalizeCount will normalize the count of the symbols so -// the total is equal to the table size. -func (s *Scratch) normalizeCount() error { - var ( - tableLog = s.actualTableLog - scale = 62 - uint64(tableLog) - step = (1 << 62) / uint64(s.br.remain()) - vStep = uint64(1) << (scale - 20) - stillToDistribute = int16(1 << tableLog) - largest int - largestP int16 - lowThreshold = (uint32)(s.br.remain() >> tableLog) - ) - - for i, cnt := range s.count[:s.symbolLen] { - // already handled - // if (count[s] == s.length) return 0; /* rle special case */ - - if cnt == 0 { - s.norm[i] = 0 - continue - } - if cnt <= lowThreshold { - s.norm[i] = -1 - stillToDistribute-- - } else { - proba := (int16)((uint64(cnt) * step) >> scale) - if proba < 8 { - restToBeat := vStep * uint64(rtbTable[proba]) - v := uint64(cnt)*step - (uint64(proba) << scale) - if v > restToBeat { - proba++ - } - } - if proba > largestP { - largestP = proba - largest = i - } - s.norm[i] = proba - stillToDistribute -= proba - } - } - - if -stillToDistribute >= (s.norm[largest] >> 1) { - // corner case, need another normalization method - return s.normalizeCount2() - } - s.norm[largest] += stillToDistribute - return nil -} - -// Secondary normalization method. -// To be used when primary method fails. -func (s *Scratch) normalizeCount2() error { - const notYetAssigned = -2 - var ( - distributed uint32 - total = uint32(s.br.remain()) - tableLog = s.actualTableLog - lowThreshold = total >> tableLog - lowOne = (total * 3) >> (tableLog + 1) - ) - for i, cnt := range s.count[:s.symbolLen] { - if cnt == 0 { - s.norm[i] = 0 - continue - } - if cnt <= lowThreshold { - s.norm[i] = -1 - distributed++ - total -= cnt - continue - } - if cnt <= lowOne { - s.norm[i] = 1 - distributed++ - total -= cnt - continue - } - s.norm[i] = notYetAssigned - } - toDistribute := (1 << tableLog) - distributed - - if (total / toDistribute) > lowOne { - // risk of rounding to zero - lowOne = (total * 3) / (toDistribute * 2) - for i, cnt := range s.count[:s.symbolLen] { - if (s.norm[i] == notYetAssigned) && (cnt <= lowOne) { - s.norm[i] = 1 - distributed++ - total -= cnt - continue - } - } - toDistribute = (1 << tableLog) - distributed - } - if distributed == uint32(s.symbolLen)+1 { - // all values are pretty poor; - // probably incompressible data (should have already been detected); - // find max, then give all remaining points to max - var maxV int - var maxC uint32 - for i, cnt := range s.count[:s.symbolLen] { - if cnt > maxC { - maxV = i - maxC = cnt - } - } - s.norm[maxV] += int16(toDistribute) - return nil - } - - if total == 0 { - // all of the symbols were low enough for the lowOne or lowThreshold - for i := uint32(0); toDistribute > 0; i = (i + 1) % (uint32(s.symbolLen)) { - if s.norm[i] > 0 { - toDistribute-- - s.norm[i]++ - } - } - return nil - } - - var ( - vStepLog = 62 - uint64(tableLog) - mid = uint64((1 << (vStepLog - 1)) - 1) - rStep = (((1 << vStepLog) * uint64(toDistribute)) + mid) / uint64(total) // scale on remaining - tmpTotal = mid - ) - for i, cnt := range s.count[:s.symbolLen] { - if s.norm[i] == notYetAssigned { - var ( - end = tmpTotal + uint64(cnt)*rStep - sStart = uint32(tmpTotal >> vStepLog) - sEnd = uint32(end >> vStepLog) - weight = sEnd - sStart - ) - if weight < 1 { - return errors.New("weight < 1") - } - s.norm[i] = int16(weight) - tmpTotal = end - } - } - return nil -} - -// validateNorm validates the normalized histogram table. -func (s *Scratch) validateNorm() (err error) { - var total int - for _, v := range s.norm[:s.symbolLen] { - if v >= 0 { - total += int(v) - } else { - total -= int(v) - } - } - defer func() { - if err == nil { - return - } - fmt.Printf("selected TableLog: %d, Symbol length: %d\n", s.actualTableLog, s.symbolLen) - for i, v := range s.norm[:s.symbolLen] { - fmt.Printf("%3d: %5d -> %4d \n", i, s.count[i], v) - } - }() - if total != (1 << s.actualTableLog) { - return fmt.Errorf("warning: Total == %d != %d", total, 1< tablelogAbsoluteMax { - return errors.New("tableLog too large") - } - bitStream >>= 4 - bitCount := uint(4) - - s.actualTableLog = uint8(nbBits) - remaining := int32((1 << nbBits) + 1) - threshold := int32(1 << nbBits) - gotTotal := int32(0) - nbBits++ - - for remaining > 1 { - if previous0 { - n0 := charnum - for (bitStream & 0xFFFF) == 0xFFFF { - n0 += 24 - if b.off < iend-5 { - b.advance(2) - bitStream = b.Uint32() >> bitCount - } else { - bitStream >>= 16 - bitCount += 16 - } - } - for (bitStream & 3) == 3 { - n0 += 3 - bitStream >>= 2 - bitCount += 2 - } - n0 += uint16(bitStream & 3) - bitCount += 2 - if n0 > maxSymbolValue { - return errors.New("maxSymbolValue too small") - } - for charnum < n0 { - s.norm[charnum&0xff] = 0 - charnum++ - } - - if b.off <= iend-7 || b.off+int(bitCount>>3) <= iend-4 { - b.advance(bitCount >> 3) - bitCount &= 7 - bitStream = b.Uint32() >> bitCount - } else { - bitStream >>= 2 - } - } - - max := (2*(threshold) - 1) - (remaining) - var count int32 - - if (int32(bitStream) & (threshold - 1)) < max { - count = int32(bitStream) & (threshold - 1) - bitCount += nbBits - 1 - } else { - count = int32(bitStream) & (2*threshold - 1) - if count >= threshold { - count -= max - } - bitCount += nbBits - } - - count-- // extra accuracy - if count < 0 { - // -1 means +1 - remaining += count - gotTotal -= count - } else { - remaining -= count - gotTotal += count - } - s.norm[charnum&0xff] = int16(count) - charnum++ - previous0 = count == 0 - for remaining < threshold { - nbBits-- - threshold >>= 1 - } - if b.off <= iend-7 || b.off+int(bitCount>>3) <= iend-4 { - b.advance(bitCount >> 3) - bitCount &= 7 - } else { - bitCount -= (uint)(8 * (len(b.b) - 4 - b.off)) - b.off = len(b.b) - 4 - } - bitStream = b.Uint32() >> (bitCount & 31) - } - s.symbolLen = charnum - - if s.symbolLen <= 1 { - return fmt.Errorf("symbolLen (%d) too small", s.symbolLen) - } - if s.symbolLen > maxSymbolValue+1 { - return fmt.Errorf("symbolLen (%d) too big", s.symbolLen) - } - if remaining != 1 { - return fmt.Errorf("corruption detected (remaining %d != 1)", remaining) - } - if bitCount > 32 { - return fmt.Errorf("corruption detected (bitCount %d > 32)", bitCount) - } - if gotTotal != 1<> 3) - return nil -} - -// decSymbol contains information about a state entry, -// Including the state offset base, the output symbol and -// the number of bits to read for the low part of the destination state. -type decSymbol struct { - newState uint16 - symbol uint8 - nbBits uint8 -} - -// allocDtable will allocate decoding tables if they are not big enough. -func (s *Scratch) allocDtable() { - tableSize := 1 << s.actualTableLog - if cap(s.decTable) < tableSize { - s.decTable = make([]decSymbol, tableSize) - } - s.decTable = s.decTable[:tableSize] - - if cap(s.ct.tableSymbol) < 256 { - s.ct.tableSymbol = make([]byte, 256) - } - s.ct.tableSymbol = s.ct.tableSymbol[:256] - - if cap(s.ct.stateTable) < 256 { - s.ct.stateTable = make([]uint16, 256) - } - s.ct.stateTable = s.ct.stateTable[:256] -} - -// buildDtable will build the decoding table. -func (s *Scratch) buildDtable() error { - tableSize := uint32(1 << s.actualTableLog) - highThreshold := tableSize - 1 - s.allocDtable() - symbolNext := s.ct.stateTable[:256] - - // Init, lay down lowprob symbols - s.zeroBits = false - { - largeLimit := int16(1 << (s.actualTableLog - 1)) - for i, v := range s.norm[:s.symbolLen] { - if v == -1 { - s.decTable[highThreshold].symbol = uint8(i) - highThreshold-- - symbolNext[i] = 1 - } else { - if v >= largeLimit { - s.zeroBits = true - } - symbolNext[i] = uint16(v) - } - } - } - // Spread symbols - { - tableMask := tableSize - 1 - step := tableStep(tableSize) - position := uint32(0) - for ss, v := range s.norm[:s.symbolLen] { - for i := 0; i < int(v); i++ { - s.decTable[position].symbol = uint8(ss) - position = (position + step) & tableMask - for position > highThreshold { - // lowprob area - position = (position + step) & tableMask - } - } - } - if position != 0 { - // position must reach all cells once, otherwise normalizedCounter is incorrect - return errors.New("corrupted input (position != 0)") - } - } - - // Build Decoding table - { - tableSize := uint16(1 << s.actualTableLog) - for u, v := range s.decTable { - symbol := v.symbol - nextState := symbolNext[symbol] - symbolNext[symbol] = nextState + 1 - nBits := s.actualTableLog - byte(highBits(uint32(nextState))) - s.decTable[u].nbBits = nBits - newState := (nextState << nBits) - tableSize - if newState >= tableSize { - return fmt.Errorf("newState (%d) outside table size (%d)", newState, tableSize) - } - if newState == uint16(u) && nBits == 0 { - // Seems weird that this is possible with nbits > 0. - return fmt.Errorf("newState (%d) == oldState (%d) and no bits", newState, u) - } - s.decTable[u].newState = newState - } - } - return nil -} - -// decompress will decompress the bitstream. -// If the buffer is over-read an error is returned. -func (s *Scratch) decompress() error { - br := &s.bits - if err := br.init(s.br.unread()); err != nil { - return err - } - - var s1, s2 decoder - // Initialize and decode first state and symbol. - s1.init(br, s.decTable, s.actualTableLog) - s2.init(br, s.decTable, s.actualTableLog) - - // Use temp table to avoid bound checks/append penalty. - var tmp = s.ct.tableSymbol[:256] - var off uint8 - - // Main part - if !s.zeroBits { - for br.off >= 8 { - br.fillFast() - tmp[off+0] = s1.nextFast() - tmp[off+1] = s2.nextFast() - br.fillFast() - tmp[off+2] = s1.nextFast() - tmp[off+3] = s2.nextFast() - off += 4 - // When off is 0, we have overflowed and should write. - if off == 0 { - s.Out = append(s.Out, tmp...) - if len(s.Out) >= s.DecompressLimit { - return fmt.Errorf("output size (%d) > DecompressLimit (%d)", len(s.Out), s.DecompressLimit) - } - } - } - } else { - for br.off >= 8 { - br.fillFast() - tmp[off+0] = s1.next() - tmp[off+1] = s2.next() - br.fillFast() - tmp[off+2] = s1.next() - tmp[off+3] = s2.next() - off += 4 - if off == 0 { - s.Out = append(s.Out, tmp...) - // When off is 0, we have overflowed and should write. - if len(s.Out) >= s.DecompressLimit { - return fmt.Errorf("output size (%d) > DecompressLimit (%d)", len(s.Out), s.DecompressLimit) - } - } - } - } - s.Out = append(s.Out, tmp[:off]...) - - // Final bits, a bit more expensive check - for { - if s1.finished() { - s.Out = append(s.Out, s1.final(), s2.final()) - break - } - br.fill() - s.Out = append(s.Out, s1.next()) - if s2.finished() { - s.Out = append(s.Out, s2.final(), s1.final()) - break - } - s.Out = append(s.Out, s2.next()) - if len(s.Out) >= s.DecompressLimit { - return fmt.Errorf("output size (%d) > DecompressLimit (%d)", len(s.Out), s.DecompressLimit) - } - } - return br.close() -} - -// decoder keeps track of the current state and updates it from the bitstream. -type decoder struct { - state uint16 - br *bitReader - dt []decSymbol -} - -// init will initialize the decoder and read the first state from the stream. -func (d *decoder) init(in *bitReader, dt []decSymbol, tableLog uint8) { - d.dt = dt - d.br = in - d.state = in.getBits(tableLog) -} - -// next returns the next symbol and sets the next state. -// At least tablelog bits must be available in the bit reader. -func (d *decoder) next() uint8 { - n := &d.dt[d.state] - lowBits := d.br.getBits(n.nbBits) - d.state = n.newState + lowBits - return n.symbol -} - -// finished returns true if all bits have been read from the bitstream -// and the next state would require reading bits from the input. -func (d *decoder) finished() bool { - return d.br.finished() && d.dt[d.state].nbBits > 0 -} - -// final returns the current state symbol without decoding the next. -func (d *decoder) final() uint8 { - return d.dt[d.state].symbol -} - -// nextFast returns the next symbol and sets the next state. -// This can only be used if no symbols are 0 bits. -// At least tablelog bits must be available in the bit reader. -func (d *decoder) nextFast() uint8 { - n := d.dt[d.state] - lowBits := d.br.getBitsFast(n.nbBits) - d.state = n.newState + lowBits - return n.symbol -} diff --git a/vendor/github.com/klauspost/compress/fse/fse.go b/vendor/github.com/klauspost/compress/fse/fse.go deleted file mode 100644 index 535cbadf..00000000 --- a/vendor/github.com/klauspost/compress/fse/fse.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -// Package fse provides Finite State Entropy encoding and decoding. -// -// Finite State Entropy encoding provides a fast near-optimal symbol encoding/decoding -// for byte blocks as implemented in zstd. -// -// See https://github.com/klauspost/compress/tree/master/fse for more information. -package fse - -import ( - "errors" - "fmt" - "math/bits" -) - -const ( - /*!MEMORY_USAGE : - * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) - * Increasing memory usage improves compression ratio - * Reduced memory usage can improve speed, due to cache effect - * Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ - maxMemoryUsage = 14 - defaultMemoryUsage = 13 - - maxTableLog = maxMemoryUsage - 2 - maxTablesize = 1 << maxTableLog - defaultTablelog = defaultMemoryUsage - 2 - minTablelog = 5 - maxSymbolValue = 255 -) - -var ( - // ErrIncompressible is returned when input is judged to be too hard to compress. - ErrIncompressible = errors.New("input is not compressible") - - // ErrUseRLE is returned from the compressor when the input is a single byte value repeated. - ErrUseRLE = errors.New("input is single value repeated") -) - -// Scratch provides temporary storage for compression and decompression. -type Scratch struct { - // Private - count [maxSymbolValue + 1]uint32 - norm [maxSymbolValue + 1]int16 - br byteReader - bits bitReader - bw bitWriter - ct cTable // Compression tables. - decTable []decSymbol // Decompression table. - maxCount int // count of the most probable symbol - - // Per block parameters. - // These can be used to override compression parameters of the block. - // Do not touch, unless you know what you are doing. - - // Out is output buffer. - // If the scratch is re-used before the caller is done processing the output, - // set this field to nil. - // Otherwise the output buffer will be re-used for next Compression/Decompression step - // and allocation will be avoided. - Out []byte - - // DecompressLimit limits the maximum decoded size acceptable. - // If > 0 decompression will stop when approximately this many bytes - // has been decoded. - // If 0, maximum size will be 2GB. - DecompressLimit int - - symbolLen uint16 // Length of active part of the symbol table. - actualTableLog uint8 // Selected tablelog. - zeroBits bool // no bits has prob > 50%. - clearCount bool // clear count - - // MaxSymbolValue will override the maximum symbol value of the next block. - MaxSymbolValue uint8 - - // TableLog will attempt to override the tablelog for the next block. - TableLog uint8 -} - -// Histogram allows to populate the histogram and skip that step in the compression, -// It otherwise allows to inspect the histogram when compression is done. -// To indicate that you have populated the histogram call HistogramFinished -// with the value of the highest populated symbol, as well as the number of entries -// in the most populated entry. These are accepted at face value. -// The returned slice will always be length 256. -func (s *Scratch) Histogram() []uint32 { - return s.count[:] -} - -// HistogramFinished can be called to indicate that the histogram has been populated. -// maxSymbol is the index of the highest set symbol of the next data segment. -// maxCount is the number of entries in the most populated entry. -// These are accepted at face value. -func (s *Scratch) HistogramFinished(maxSymbol uint8, maxCount int) { - s.maxCount = maxCount - s.symbolLen = uint16(maxSymbol) + 1 - s.clearCount = maxCount != 0 -} - -// prepare will prepare and allocate scratch tables used for both compression and decompression. -func (s *Scratch) prepare(in []byte) (*Scratch, error) { - if s == nil { - s = &Scratch{} - } - if s.MaxSymbolValue == 0 { - s.MaxSymbolValue = 255 - } - if s.TableLog == 0 { - s.TableLog = defaultTablelog - } - if s.TableLog > maxTableLog { - return nil, fmt.Errorf("tableLog (%d) > maxTableLog (%d)", s.TableLog, maxTableLog) - } - if cap(s.Out) == 0 { - s.Out = make([]byte, 0, len(in)) - } - if s.clearCount && s.maxCount == 0 { - for i := range s.count { - s.count[i] = 0 - } - s.clearCount = false - } - s.br.init(in) - if s.DecompressLimit == 0 { - // Max size 2GB. - s.DecompressLimit = (2 << 30) - 1 - } - - return s, nil -} - -// tableStep returns the next table index. -func tableStep(tableSize uint32) uint32 { - return (tableSize >> 1) + (tableSize >> 3) + 3 -} - -func highBits(val uint32) (n uint32) { - return uint32(bits.Len32(val) - 1) -} diff --git a/vendor/github.com/klauspost/compress/gen.sh b/vendor/github.com/klauspost/compress/gen.sh deleted file mode 100644 index aff94220..00000000 --- a/vendor/github.com/klauspost/compress/gen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -cd s2/cmd/_s2sx/ || exit 1 -go generate . diff --git a/vendor/github.com/klauspost/compress/huff0/.gitignore b/vendor/github.com/klauspost/compress/huff0/.gitignore deleted file mode 100644 index b3d26295..00000000 --- a/vendor/github.com/klauspost/compress/huff0/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/huff0-fuzz.zip diff --git a/vendor/github.com/klauspost/compress/huff0/README.md b/vendor/github.com/klauspost/compress/huff0/README.md deleted file mode 100644 index 8b6e5c66..00000000 --- a/vendor/github.com/klauspost/compress/huff0/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# Huff0 entropy compression - -This package provides Huff0 encoding and decoding as used in zstd. - -[Huff0](https://github.com/Cyan4973/FiniteStateEntropy#new-generation-entropy-coders), -a Huffman codec designed for modern CPU, featuring OoO (Out of Order) operations on multiple ALU -(Arithmetic Logic Unit), achieving extremely fast compression and decompression speeds. - -This can be used for compressing input with a lot of similar input values to the smallest number of bytes. -This does not perform any multi-byte [dictionary coding](https://en.wikipedia.org/wiki/Dictionary_coder) as LZ coders, -but it can be used as a secondary step to compressors (like Snappy) that does not do entropy encoding. - -* [Godoc documentation](https://godoc.org/github.com/klauspost/compress/huff0) - -## News - -This is used as part of the [zstandard](https://github.com/klauspost/compress/tree/master/zstd#zstd) compression and decompression package. - -This ensures that most functionality is well tested. - -# Usage - -This package provides a low level interface that allows to compress single independent blocks. - -Each block is separate, and there is no built in integrity checks. -This means that the caller should keep track of block sizes and also do checksums if needed. - -Compressing a block is done via the [`Compress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress1X) and -[`Compress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Compress4X) functions. -You must provide input and will receive the output and maybe an error. - -These error values can be returned: - -| Error | Description | -|---------------------|-----------------------------------------------------------------------------| -| `` | Everything ok, output is returned | -| `ErrIncompressible` | Returned when input is judged to be too hard to compress | -| `ErrUseRLE` | Returned from the compressor when the input is a single byte value repeated | -| `ErrTooBig` | Returned if the input block exceeds the maximum allowed size (128 Kib) | -| `(error)` | An internal error occurred. | - - -As can be seen above some of there are errors that will be returned even under normal operation so it is important to handle these. - -To reduce allocations you can provide a [`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object -that can be re-used for successive calls. Both compression and decompression accepts a `Scratch` object, and the same -object can be used for both. - -Be aware, that when re-using a `Scratch` object that the *output* buffer is also re-used, so if you are still using this -you must set the `Out` field in the scratch to nil. The same buffer is used for compression and decompression output. - -The `Scratch` object will retain state that allows to re-use previous tables for encoding and decoding. - -## Tables and re-use - -Huff0 allows for reusing tables from the previous block to save space if that is expected to give better/faster results. - -The Scratch object allows you to set a [`ReusePolicy`](https://godoc.org/github.com/klauspost/compress/huff0#ReusePolicy) -that controls this behaviour. See the documentation for details. This can be altered between each block. - -Do however note that this information is *not* stored in the output block and it is up to the users of the package to -record whether [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable) should be called, -based on the boolean reported back from the CompressXX call. - -If you want to store the table separate from the data, you can access them as `OutData` and `OutTable` on the -[`Scratch`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch) object. - -## Decompressing - -The first part of decoding is to initialize the decoding table through [`ReadTable`](https://godoc.org/github.com/klauspost/compress/huff0#ReadTable). -This will initialize the decoding tables. -You can supply the complete block to `ReadTable` and it will return the data part of the block -which can be given to the decompressor. - -Decompressing is done by calling the [`Decompress1X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress1X) -or [`Decompress4X`](https://godoc.org/github.com/klauspost/compress/huff0#Scratch.Decompress4X) function. - -For concurrently decompressing content with a fixed table a stateless [`Decoder`](https://godoc.org/github.com/klauspost/compress/huff0#Decoder) can be requested which will remain correct as long as the scratch is unchanged. The capacity of the provided slice indicates the expected output size. - -You must provide the output from the compression stage, at exactly the size you got back. If you receive an error back -your input was likely corrupted. - -It is important to note that a successful decoding does *not* mean your output matches your original input. -There are no integrity checks, so relying on errors from the decompressor does not assure your data is valid. - -# Contributing - -Contributions are always welcome. Be aware that adding public functions will require good justification and breaking -changes will likely not be accepted. If in doubt open an issue before writing the PR. diff --git a/vendor/github.com/klauspost/compress/huff0/bitreader.go b/vendor/github.com/klauspost/compress/huff0/bitreader.go deleted file mode 100644 index e36d9742..00000000 --- a/vendor/github.com/klauspost/compress/huff0/bitreader.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package huff0 - -import ( - "encoding/binary" - "errors" - "fmt" - "io" -) - -// bitReader reads a bitstream in reverse. -// The last set bit indicates the start of the stream and is used -// for aligning the input. -type bitReaderBytes struct { - in []byte - off uint // next byte to read is at in[off - 1] - value uint64 - bitsRead uint8 -} - -// init initializes and resets the bit reader. -func (b *bitReaderBytes) init(in []byte) error { - if len(in) < 1 { - return errors.New("corrupt stream: too short") - } - b.in = in - b.off = uint(len(in)) - // The highest bit of the last byte indicates where to start - v := in[len(in)-1] - if v == 0 { - return errors.New("corrupt stream, did not find end of stream") - } - b.bitsRead = 64 - b.value = 0 - if len(in) >= 8 { - b.fillFastStart() - } else { - b.fill() - b.fill() - } - b.advance(8 - uint8(highBit32(uint32(v)))) - return nil -} - -// peekBitsFast requires that at least one bit is requested every time. -// There are no checks if the buffer is filled. -func (b *bitReaderBytes) peekByteFast() uint8 { - got := uint8(b.value >> 56) - return got -} - -func (b *bitReaderBytes) advance(n uint8) { - b.bitsRead += n - b.value <<= n & 63 -} - -// fillFast() will make sure at least 32 bits are available. -// There must be at least 4 bytes available. -func (b *bitReaderBytes) fillFast() { - if b.bitsRead < 32 { - return - } - - // 2 bounds checks. - v := b.in[b.off-4 : b.off] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value |= uint64(low) << (b.bitsRead - 32) - b.bitsRead -= 32 - b.off -= 4 -} - -// fillFastStart() assumes the bitReaderBytes is empty and there is at least 8 bytes to read. -func (b *bitReaderBytes) fillFastStart() { - // Do single re-slice to avoid bounds checks. - b.value = binary.LittleEndian.Uint64(b.in[b.off-8:]) - b.bitsRead = 0 - b.off -= 8 -} - -// fill() will make sure at least 32 bits are available. -func (b *bitReaderBytes) fill() { - if b.bitsRead < 32 { - return - } - if b.off > 4 { - v := b.in[b.off-4 : b.off] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value |= uint64(low) << (b.bitsRead - 32) - b.bitsRead -= 32 - b.off -= 4 - return - } - for b.off > 0 { - b.value |= uint64(b.in[b.off-1]) << (b.bitsRead - 8) - b.bitsRead -= 8 - b.off-- - } -} - -// finished returns true if all bits have been read from the bit stream. -func (b *bitReaderBytes) finished() bool { - return b.off == 0 && b.bitsRead >= 64 -} - -func (b *bitReaderBytes) remaining() uint { - return b.off*8 + uint(64-b.bitsRead) -} - -// close the bitstream and returns an error if out-of-buffer reads occurred. -func (b *bitReaderBytes) close() error { - // Release reference. - b.in = nil - if b.remaining() > 0 { - return fmt.Errorf("corrupt input: %d bits remain on stream", b.remaining()) - } - if b.bitsRead > 64 { - return io.ErrUnexpectedEOF - } - return nil -} - -// bitReaderShifted reads a bitstream in reverse. -// The last set bit indicates the start of the stream and is used -// for aligning the input. -type bitReaderShifted struct { - in []byte - off uint // next byte to read is at in[off - 1] - value uint64 - bitsRead uint8 -} - -// init initializes and resets the bit reader. -func (b *bitReaderShifted) init(in []byte) error { - if len(in) < 1 { - return errors.New("corrupt stream: too short") - } - b.in = in - b.off = uint(len(in)) - // The highest bit of the last byte indicates where to start - v := in[len(in)-1] - if v == 0 { - return errors.New("corrupt stream, did not find end of stream") - } - b.bitsRead = 64 - b.value = 0 - if len(in) >= 8 { - b.fillFastStart() - } else { - b.fill() - b.fill() - } - b.advance(8 - uint8(highBit32(uint32(v)))) - return nil -} - -// peekBitsFast requires that at least one bit is requested every time. -// There are no checks if the buffer is filled. -func (b *bitReaderShifted) peekBitsFast(n uint8) uint16 { - return uint16(b.value >> ((64 - n) & 63)) -} - -func (b *bitReaderShifted) advance(n uint8) { - b.bitsRead += n - b.value <<= n & 63 -} - -// fillFast() will make sure at least 32 bits are available. -// There must be at least 4 bytes available. -func (b *bitReaderShifted) fillFast() { - if b.bitsRead < 32 { - return - } - - // 2 bounds checks. - v := b.in[b.off-4 : b.off] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value |= uint64(low) << ((b.bitsRead - 32) & 63) - b.bitsRead -= 32 - b.off -= 4 -} - -// fillFastStart() assumes the bitReaderShifted is empty and there is at least 8 bytes to read. -func (b *bitReaderShifted) fillFastStart() { - // Do single re-slice to avoid bounds checks. - b.value = binary.LittleEndian.Uint64(b.in[b.off-8:]) - b.bitsRead = 0 - b.off -= 8 -} - -// fill() will make sure at least 32 bits are available. -func (b *bitReaderShifted) fill() { - if b.bitsRead < 32 { - return - } - if b.off > 4 { - v := b.in[b.off-4 : b.off] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value |= uint64(low) << ((b.bitsRead - 32) & 63) - b.bitsRead -= 32 - b.off -= 4 - return - } - for b.off > 0 { - b.value |= uint64(b.in[b.off-1]) << ((b.bitsRead - 8) & 63) - b.bitsRead -= 8 - b.off-- - } -} - -func (b *bitReaderShifted) remaining() uint { - return b.off*8 + uint(64-b.bitsRead) -} - -// close the bitstream and returns an error if out-of-buffer reads occurred. -func (b *bitReaderShifted) close() error { - // Release reference. - b.in = nil - if b.remaining() > 0 { - return fmt.Errorf("corrupt input: %d bits remain on stream", b.remaining()) - } - if b.bitsRead > 64 { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/vendor/github.com/klauspost/compress/huff0/bitwriter.go b/vendor/github.com/klauspost/compress/huff0/bitwriter.go deleted file mode 100644 index 0ebc9aaa..00000000 --- a/vendor/github.com/klauspost/compress/huff0/bitwriter.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package huff0 - -// bitWriter will write bits. -// First bit will be LSB of the first byte of output. -type bitWriter struct { - bitContainer uint64 - nBits uint8 - out []byte -} - -// addBits16Clean will add up to 16 bits. value may not contain more set bits than indicated. -// It will not check if there is space for them, so the caller must ensure that it has flushed recently. -func (b *bitWriter) addBits16Clean(value uint16, bits uint8) { - b.bitContainer |= uint64(value) << (b.nBits & 63) - b.nBits += bits -} - -// encSymbol will add up to 16 bits. value may not contain more set bits than indicated. -// It will not check if there is space for them, so the caller must ensure that it has flushed recently. -func (b *bitWriter) encSymbol(ct cTable, symbol byte) { - enc := ct[symbol] - b.bitContainer |= uint64(enc.val) << (b.nBits & 63) - if false { - if enc.nBits == 0 { - panic("nbits 0") - } - } - b.nBits += enc.nBits -} - -// encTwoSymbols will add up to 32 bits. value may not contain more set bits than indicated. -// It will not check if there is space for them, so the caller must ensure that it has flushed recently. -func (b *bitWriter) encTwoSymbols(ct cTable, av, bv byte) { - encA := ct[av] - encB := ct[bv] - sh := b.nBits & 63 - combined := uint64(encA.val) | (uint64(encB.val) << (encA.nBits & 63)) - b.bitContainer |= combined << sh - if false { - if encA.nBits == 0 { - panic("nbitsA 0") - } - if encB.nBits == 0 { - panic("nbitsB 0") - } - } - b.nBits += encA.nBits + encB.nBits -} - -// encFourSymbols adds up to 32 bits from four symbols. -// It will not check if there is space for them, -// so the caller must ensure that b has been flushed recently. -func (b *bitWriter) encFourSymbols(encA, encB, encC, encD cTableEntry) { - bitsA := encA.nBits - bitsB := bitsA + encB.nBits - bitsC := bitsB + encC.nBits - bitsD := bitsC + encD.nBits - combined := uint64(encA.val) | - (uint64(encB.val) << (bitsA & 63)) | - (uint64(encC.val) << (bitsB & 63)) | - (uint64(encD.val) << (bitsC & 63)) - b.bitContainer |= combined << (b.nBits & 63) - b.nBits += bitsD -} - -// flush32 will flush out, so there are at least 32 bits available for writing. -func (b *bitWriter) flush32() { - if b.nBits < 32 { - return - } - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24)) - b.nBits -= 32 - b.bitContainer >>= 32 -} - -// flushAlign will flush remaining full bytes and align to next byte boundary. -func (b *bitWriter) flushAlign() { - nbBytes := (b.nBits + 7) >> 3 - for i := uint8(0); i < nbBytes; i++ { - b.out = append(b.out, byte(b.bitContainer>>(i*8))) - } - b.nBits = 0 - b.bitContainer = 0 -} - -// close will write the alignment bit and write the final byte(s) -// to the output. -func (b *bitWriter) close() { - // End mark - b.addBits16Clean(1, 1) - // flush until next byte. - b.flushAlign() -} diff --git a/vendor/github.com/klauspost/compress/huff0/bytereader.go b/vendor/github.com/klauspost/compress/huff0/bytereader.go deleted file mode 100644 index 4dcab8d2..00000000 --- a/vendor/github.com/klauspost/compress/huff0/bytereader.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package huff0 - -// byteReader provides a byte reader that reads -// little endian values from a byte stream. -// The input stream is manually advanced. -// The reader performs no bounds checks. -type byteReader struct { - b []byte - off int -} - -// init will initialize the reader and set the input. -func (b *byteReader) init(in []byte) { - b.b = in - b.off = 0 -} - -// Int32 returns a little endian int32 starting at current offset. -func (b byteReader) Int32() int32 { - v3 := int32(b.b[b.off+3]) - v2 := int32(b.b[b.off+2]) - v1 := int32(b.b[b.off+1]) - v0 := int32(b.b[b.off]) - return (v3 << 24) | (v2 << 16) | (v1 << 8) | v0 -} - -// Uint32 returns a little endian uint32 starting at current offset. -func (b byteReader) Uint32() uint32 { - v3 := uint32(b.b[b.off+3]) - v2 := uint32(b.b[b.off+2]) - v1 := uint32(b.b[b.off+1]) - v0 := uint32(b.b[b.off]) - return (v3 << 24) | (v2 << 16) | (v1 << 8) | v0 -} - -// remain will return the number of bytes remaining. -func (b byteReader) remain() int { - return len(b.b) - b.off -} diff --git a/vendor/github.com/klauspost/compress/huff0/compress.go b/vendor/github.com/klauspost/compress/huff0/compress.go deleted file mode 100644 index 518436cf..00000000 --- a/vendor/github.com/klauspost/compress/huff0/compress.go +++ /dev/null @@ -1,741 +0,0 @@ -package huff0 - -import ( - "fmt" - "math" - "runtime" - "sync" -) - -// Compress1X will compress the input. -// The output can be decoded using Decompress1X. -// Supply a Scratch object. The scratch object contains state about re-use, -// So when sharing across independent encodes, be sure to set the re-use policy. -func Compress1X(in []byte, s *Scratch) (out []byte, reUsed bool, err error) { - s, err = s.prepare(in) - if err != nil { - return nil, false, err - } - return compress(in, s, s.compress1X) -} - -// Compress4X will compress the input. The input is split into 4 independent blocks -// and compressed similar to Compress1X. -// The output can be decoded using Decompress4X. -// Supply a Scratch object. The scratch object contains state about re-use, -// So when sharing across independent encodes, be sure to set the re-use policy. -func Compress4X(in []byte, s *Scratch) (out []byte, reUsed bool, err error) { - s, err = s.prepare(in) - if err != nil { - return nil, false, err - } - if false { - // TODO: compress4Xp only slightly faster. - const parallelThreshold = 8 << 10 - if len(in) < parallelThreshold || runtime.GOMAXPROCS(0) == 1 { - return compress(in, s, s.compress4X) - } - return compress(in, s, s.compress4Xp) - } - return compress(in, s, s.compress4X) -} - -func compress(in []byte, s *Scratch, compressor func(src []byte) ([]byte, error)) (out []byte, reUsed bool, err error) { - // Nuke previous table if we cannot reuse anyway. - if s.Reuse == ReusePolicyNone { - s.prevTable = s.prevTable[:0] - } - - // Create histogram, if none was provided. - maxCount := s.maxCount - var canReuse = false - if maxCount == 0 { - maxCount, canReuse = s.countSimple(in) - } else { - canReuse = s.canUseTable(s.prevTable) - } - - // We want the output size to be less than this: - wantSize := len(in) - if s.WantLogLess > 0 { - wantSize -= wantSize >> s.WantLogLess - } - - // Reset for next run. - s.clearCount = true - s.maxCount = 0 - if maxCount >= len(in) { - if maxCount > len(in) { - return nil, false, fmt.Errorf("maxCount (%d) > length (%d)", maxCount, len(in)) - } - if len(in) == 1 { - return nil, false, ErrIncompressible - } - // One symbol, use RLE - return nil, false, ErrUseRLE - } - if maxCount == 1 || maxCount < (len(in)>>7) { - // Each symbol present maximum once or too well distributed. - return nil, false, ErrIncompressible - } - if s.Reuse == ReusePolicyMust && !canReuse { - // We must reuse, but we can't. - return nil, false, ErrIncompressible - } - if (s.Reuse == ReusePolicyPrefer || s.Reuse == ReusePolicyMust) && canReuse { - keepTable := s.cTable - keepTL := s.actualTableLog - s.cTable = s.prevTable - s.actualTableLog = s.prevTableLog - s.Out, err = compressor(in) - s.cTable = keepTable - s.actualTableLog = keepTL - if err == nil && len(s.Out) < wantSize { - s.OutData = s.Out - return s.Out, true, nil - } - if s.Reuse == ReusePolicyMust { - return nil, false, ErrIncompressible - } - // Do not attempt to re-use later. - s.prevTable = s.prevTable[:0] - } - - // Calculate new table. - err = s.buildCTable() - if err != nil { - return nil, false, err - } - - if false && !s.canUseTable(s.cTable) { - panic("invalid table generated") - } - - if s.Reuse == ReusePolicyAllow && canReuse { - hSize := len(s.Out) - oldSize := s.prevTable.estimateSize(s.count[:s.symbolLen]) - newSize := s.cTable.estimateSize(s.count[:s.symbolLen]) - if oldSize <= hSize+newSize || hSize+12 >= wantSize { - // Retain cTable even if we re-use. - keepTable := s.cTable - keepTL := s.actualTableLog - - s.cTable = s.prevTable - s.actualTableLog = s.prevTableLog - s.Out, err = compressor(in) - - // Restore ctable. - s.cTable = keepTable - s.actualTableLog = keepTL - if err != nil { - return nil, false, err - } - if len(s.Out) >= wantSize { - return nil, false, ErrIncompressible - } - s.OutData = s.Out - return s.Out, true, nil - } - } - - // Use new table - err = s.cTable.write(s) - if err != nil { - s.OutTable = nil - return nil, false, err - } - s.OutTable = s.Out - - // Compress using new table - s.Out, err = compressor(in) - if err != nil { - s.OutTable = nil - return nil, false, err - } - if len(s.Out) >= wantSize { - s.OutTable = nil - return nil, false, ErrIncompressible - } - // Move current table into previous. - s.prevTable, s.prevTableLog, s.cTable = s.cTable, s.actualTableLog, s.prevTable[:0] - s.OutData = s.Out[len(s.OutTable):] - return s.Out, false, nil -} - -// EstimateSizes will estimate the data sizes -func EstimateSizes(in []byte, s *Scratch) (tableSz, dataSz, reuseSz int, err error) { - s, err = s.prepare(in) - if err != nil { - return 0, 0, 0, err - } - - // Create histogram, if none was provided. - tableSz, dataSz, reuseSz = -1, -1, -1 - maxCount := s.maxCount - var canReuse = false - if maxCount == 0 { - maxCount, canReuse = s.countSimple(in) - } else { - canReuse = s.canUseTable(s.prevTable) - } - - // We want the output size to be less than this: - wantSize := len(in) - if s.WantLogLess > 0 { - wantSize -= wantSize >> s.WantLogLess - } - - // Reset for next run. - s.clearCount = true - s.maxCount = 0 - if maxCount >= len(in) { - if maxCount > len(in) { - return 0, 0, 0, fmt.Errorf("maxCount (%d) > length (%d)", maxCount, len(in)) - } - if len(in) == 1 { - return 0, 0, 0, ErrIncompressible - } - // One symbol, use RLE - return 0, 0, 0, ErrUseRLE - } - if maxCount == 1 || maxCount < (len(in)>>7) { - // Each symbol present maximum once or too well distributed. - return 0, 0, 0, ErrIncompressible - } - - // Calculate new table. - err = s.buildCTable() - if err != nil { - return 0, 0, 0, err - } - - if false && !s.canUseTable(s.cTable) { - panic("invalid table generated") - } - - tableSz, err = s.cTable.estTableSize(s) - if err != nil { - return 0, 0, 0, err - } - if canReuse { - reuseSz = s.prevTable.estimateSize(s.count[:s.symbolLen]) - } - dataSz = s.cTable.estimateSize(s.count[:s.symbolLen]) - - // Restore - return tableSz, dataSz, reuseSz, nil -} - -func (s *Scratch) compress1X(src []byte) ([]byte, error) { - return s.compress1xDo(s.Out, src), nil -} - -func (s *Scratch) compress1xDo(dst, src []byte) []byte { - var bw = bitWriter{out: dst} - - // N is length divisible by 4. - n := len(src) - n -= n & 3 - cTable := s.cTable[:256] - - // Encode last bytes. - for i := len(src) & 3; i > 0; i-- { - bw.encSymbol(cTable, src[n+i-1]) - } - n -= 4 - if s.actualTableLog <= 8 { - for ; n >= 0; n -= 4 { - tmp := src[n : n+4] - // tmp should be len 4 - bw.flush32() - bw.encFourSymbols(cTable[tmp[3]], cTable[tmp[2]], cTable[tmp[1]], cTable[tmp[0]]) - } - } else { - for ; n >= 0; n -= 4 { - tmp := src[n : n+4] - // tmp should be len 4 - bw.flush32() - bw.encTwoSymbols(cTable, tmp[3], tmp[2]) - bw.flush32() - bw.encTwoSymbols(cTable, tmp[1], tmp[0]) - } - } - bw.close() - return bw.out -} - -var sixZeros [6]byte - -func (s *Scratch) compress4X(src []byte) ([]byte, error) { - if len(src) < 12 { - return nil, ErrIncompressible - } - segmentSize := (len(src) + 3) / 4 - - // Add placeholder for output length - offsetIdx := len(s.Out) - s.Out = append(s.Out, sixZeros[:]...) - - for i := 0; i < 4; i++ { - toDo := src - if len(toDo) > segmentSize { - toDo = toDo[:segmentSize] - } - src = src[len(toDo):] - - idx := len(s.Out) - s.Out = s.compress1xDo(s.Out, toDo) - if len(s.Out)-idx > math.MaxUint16 { - // We cannot store the size in the jump table - return nil, ErrIncompressible - } - // Write compressed length as little endian before block. - if i < 3 { - // Last length is not written. - length := len(s.Out) - idx - s.Out[i*2+offsetIdx] = byte(length) - s.Out[i*2+offsetIdx+1] = byte(length >> 8) - } - } - - return s.Out, nil -} - -// compress4Xp will compress 4 streams using separate goroutines. -func (s *Scratch) compress4Xp(src []byte) ([]byte, error) { - if len(src) < 12 { - return nil, ErrIncompressible - } - // Add placeholder for output length - s.Out = s.Out[:6] - - segmentSize := (len(src) + 3) / 4 - var wg sync.WaitGroup - wg.Add(4) - for i := 0; i < 4; i++ { - toDo := src - if len(toDo) > segmentSize { - toDo = toDo[:segmentSize] - } - src = src[len(toDo):] - - // Separate goroutine for each block. - go func(i int) { - s.tmpOut[i] = s.compress1xDo(s.tmpOut[i][:0], toDo) - wg.Done() - }(i) - } - wg.Wait() - for i := 0; i < 4; i++ { - o := s.tmpOut[i] - if len(o) > math.MaxUint16 { - // We cannot store the size in the jump table - return nil, ErrIncompressible - } - // Write compressed length as little endian before block. - if i < 3 { - // Last length is not written. - s.Out[i*2] = byte(len(o)) - s.Out[i*2+1] = byte(len(o) >> 8) - } - - // Write output. - s.Out = append(s.Out, o...) - } - return s.Out, nil -} - -// countSimple will create a simple histogram in s.count. -// Returns the biggest count. -// Does not update s.clearCount. -func (s *Scratch) countSimple(in []byte) (max int, reuse bool) { - reuse = true - for _, v := range in { - s.count[v]++ - } - m := uint32(0) - if len(s.prevTable) > 0 { - for i, v := range s.count[:] { - if v == 0 { - continue - } - if v > m { - m = v - } - s.symbolLen = uint16(i) + 1 - if i >= len(s.prevTable) { - reuse = false - } else if s.prevTable[i].nBits == 0 { - reuse = false - } - } - return int(m), reuse - } - for i, v := range s.count[:] { - if v == 0 { - continue - } - if v > m { - m = v - } - s.symbolLen = uint16(i) + 1 - } - return int(m), false -} - -func (s *Scratch) canUseTable(c cTable) bool { - if len(c) < int(s.symbolLen) { - return false - } - for i, v := range s.count[:s.symbolLen] { - if v != 0 && c[i].nBits == 0 { - return false - } - } - return true -} - -//lint:ignore U1000 used for debugging -func (s *Scratch) validateTable(c cTable) bool { - if len(c) < int(s.symbolLen) { - return false - } - for i, v := range s.count[:s.symbolLen] { - if v != 0 { - if c[i].nBits == 0 { - return false - } - if c[i].nBits > s.actualTableLog { - return false - } - } - } - return true -} - -// minTableLog provides the minimum logSize to safely represent a distribution. -func (s *Scratch) minTableLog() uint8 { - minBitsSrc := highBit32(uint32(s.br.remain())) + 1 - minBitsSymbols := highBit32(uint32(s.symbolLen-1)) + 2 - if minBitsSrc < minBitsSymbols { - return uint8(minBitsSrc) - } - return uint8(minBitsSymbols) -} - -// optimalTableLog calculates and sets the optimal tableLog in s.actualTableLog -func (s *Scratch) optimalTableLog() { - tableLog := s.TableLog - minBits := s.minTableLog() - maxBitsSrc := uint8(highBit32(uint32(s.br.remain()-1))) - 1 - if maxBitsSrc < tableLog { - // Accuracy can be reduced - tableLog = maxBitsSrc - } - if minBits > tableLog { - tableLog = minBits - } - // Need a minimum to safely represent all symbol values - if tableLog < minTablelog { - tableLog = minTablelog - } - if tableLog > tableLogMax { - tableLog = tableLogMax - } - s.actualTableLog = tableLog -} - -type cTableEntry struct { - val uint16 - nBits uint8 - // We have 8 bits extra -} - -const huffNodesMask = huffNodesLen - 1 - -func (s *Scratch) buildCTable() error { - s.optimalTableLog() - s.huffSort() - if cap(s.cTable) < maxSymbolValue+1 { - s.cTable = make([]cTableEntry, s.symbolLen, maxSymbolValue+1) - } else { - s.cTable = s.cTable[:s.symbolLen] - for i := range s.cTable { - s.cTable[i] = cTableEntry{} - } - } - - var startNode = int16(s.symbolLen) - nonNullRank := s.symbolLen - 1 - - nodeNb := startNode - huffNode := s.nodes[1 : huffNodesLen+1] - - // This overlays the slice above, but allows "-1" index lookups. - // Different from reference implementation. - huffNode0 := s.nodes[0 : huffNodesLen+1] - - for huffNode[nonNullRank].count() == 0 { - nonNullRank-- - } - - lowS := int16(nonNullRank) - nodeRoot := nodeNb + lowS - 1 - lowN := nodeNb - huffNode[nodeNb].setCount(huffNode[lowS].count() + huffNode[lowS-1].count()) - huffNode[lowS].setParent(nodeNb) - huffNode[lowS-1].setParent(nodeNb) - nodeNb++ - lowS -= 2 - for n := nodeNb; n <= nodeRoot; n++ { - huffNode[n].setCount(1 << 30) - } - // fake entry, strong barrier - huffNode0[0].setCount(1 << 31) - - // create parents - for nodeNb <= nodeRoot { - var n1, n2 int16 - if huffNode0[lowS+1].count() < huffNode0[lowN+1].count() { - n1 = lowS - lowS-- - } else { - n1 = lowN - lowN++ - } - if huffNode0[lowS+1].count() < huffNode0[lowN+1].count() { - n2 = lowS - lowS-- - } else { - n2 = lowN - lowN++ - } - - huffNode[nodeNb].setCount(huffNode0[n1+1].count() + huffNode0[n2+1].count()) - huffNode0[n1+1].setParent(nodeNb) - huffNode0[n2+1].setParent(nodeNb) - nodeNb++ - } - - // distribute weights (unlimited tree height) - huffNode[nodeRoot].setNbBits(0) - for n := nodeRoot - 1; n >= startNode; n-- { - huffNode[n].setNbBits(huffNode[huffNode[n].parent()].nbBits() + 1) - } - for n := uint16(0); n <= nonNullRank; n++ { - huffNode[n].setNbBits(huffNode[huffNode[n].parent()].nbBits() + 1) - } - s.actualTableLog = s.setMaxHeight(int(nonNullRank)) - maxNbBits := s.actualTableLog - - // fill result into tree (val, nbBits) - if maxNbBits > tableLogMax { - return fmt.Errorf("internal error: maxNbBits (%d) > tableLogMax (%d)", maxNbBits, tableLogMax) - } - var nbPerRank [tableLogMax + 1]uint16 - var valPerRank [16]uint16 - for _, v := range huffNode[:nonNullRank+1] { - nbPerRank[v.nbBits()]++ - } - // determine stating value per rank - { - min := uint16(0) - for n := maxNbBits; n > 0; n-- { - // get starting value within each rank - valPerRank[n] = min - min += nbPerRank[n] - min >>= 1 - } - } - - // push nbBits per symbol, symbol order - for _, v := range huffNode[:nonNullRank+1] { - s.cTable[v.symbol()].nBits = v.nbBits() - } - - // assign value within rank, symbol order - t := s.cTable[:s.symbolLen] - for n, val := range t { - nbits := val.nBits & 15 - v := valPerRank[nbits] - t[n].val = v - valPerRank[nbits] = v + 1 - } - - return nil -} - -// huffSort will sort symbols, decreasing order. -func (s *Scratch) huffSort() { - type rankPos struct { - base uint32 - current uint32 - } - - // Clear nodes - nodes := s.nodes[:huffNodesLen+1] - s.nodes = nodes - nodes = nodes[1 : huffNodesLen+1] - - // Sort into buckets based on length of symbol count. - var rank [32]rankPos - for _, v := range s.count[:s.symbolLen] { - r := highBit32(v+1) & 31 - rank[r].base++ - } - // maxBitLength is log2(BlockSizeMax) + 1 - const maxBitLength = 18 + 1 - for n := maxBitLength; n > 0; n-- { - rank[n-1].base += rank[n].base - } - for n := range rank[:maxBitLength] { - rank[n].current = rank[n].base - } - for n, c := range s.count[:s.symbolLen] { - r := (highBit32(c+1) + 1) & 31 - pos := rank[r].current - rank[r].current++ - prev := nodes[(pos-1)&huffNodesMask] - for pos > rank[r].base && c > prev.count() { - nodes[pos&huffNodesMask] = prev - pos-- - prev = nodes[(pos-1)&huffNodesMask] - } - nodes[pos&huffNodesMask] = makeNodeElt(c, byte(n)) - } -} - -func (s *Scratch) setMaxHeight(lastNonNull int) uint8 { - maxNbBits := s.actualTableLog - huffNode := s.nodes[1 : huffNodesLen+1] - //huffNode = huffNode[: huffNodesLen] - - largestBits := huffNode[lastNonNull].nbBits() - - // early exit : no elt > maxNbBits - if largestBits <= maxNbBits { - return largestBits - } - totalCost := int(0) - baseCost := int(1) << (largestBits - maxNbBits) - n := uint32(lastNonNull) - - for huffNode[n].nbBits() > maxNbBits { - totalCost += baseCost - (1 << (largestBits - huffNode[n].nbBits())) - huffNode[n].setNbBits(maxNbBits) - n-- - } - // n stops at huffNode[n].nbBits <= maxNbBits - - for huffNode[n].nbBits() == maxNbBits { - n-- - } - // n end at index of smallest symbol using < maxNbBits - - // renorm totalCost - totalCost >>= largestBits - maxNbBits /* note : totalCost is necessarily a multiple of baseCost */ - - // repay normalized cost - { - const noSymbol = 0xF0F0F0F0 - var rankLast [tableLogMax + 2]uint32 - - for i := range rankLast[:] { - rankLast[i] = noSymbol - } - - // Get pos of last (smallest) symbol per rank - { - currentNbBits := maxNbBits - for pos := int(n); pos >= 0; pos-- { - if huffNode[pos].nbBits() >= currentNbBits { - continue - } - currentNbBits = huffNode[pos].nbBits() // < maxNbBits - rankLast[maxNbBits-currentNbBits] = uint32(pos) - } - } - - for totalCost > 0 { - nBitsToDecrease := uint8(highBit32(uint32(totalCost))) + 1 - - for ; nBitsToDecrease > 1; nBitsToDecrease-- { - highPos := rankLast[nBitsToDecrease] - lowPos := rankLast[nBitsToDecrease-1] - if highPos == noSymbol { - continue - } - if lowPos == noSymbol { - break - } - highTotal := huffNode[highPos].count() - lowTotal := 2 * huffNode[lowPos].count() - if highTotal <= lowTotal { - break - } - } - // only triggered when no more rank 1 symbol left => find closest one (note : there is necessarily at least one !) - // HUF_MAX_TABLELOG test just to please gcc 5+; but it should not be necessary - // FIXME: try to remove - for (nBitsToDecrease <= tableLogMax) && (rankLast[nBitsToDecrease] == noSymbol) { - nBitsToDecrease++ - } - totalCost -= 1 << (nBitsToDecrease - 1) - if rankLast[nBitsToDecrease-1] == noSymbol { - // this rank is no longer empty - rankLast[nBitsToDecrease-1] = rankLast[nBitsToDecrease] - } - huffNode[rankLast[nBitsToDecrease]].setNbBits(1 + - huffNode[rankLast[nBitsToDecrease]].nbBits()) - if rankLast[nBitsToDecrease] == 0 { - /* special case, reached largest symbol */ - rankLast[nBitsToDecrease] = noSymbol - } else { - rankLast[nBitsToDecrease]-- - if huffNode[rankLast[nBitsToDecrease]].nbBits() != maxNbBits-nBitsToDecrease { - rankLast[nBitsToDecrease] = noSymbol /* this rank is now empty */ - } - } - } - - for totalCost < 0 { /* Sometimes, cost correction overshoot */ - if rankLast[1] == noSymbol { /* special case : no rank 1 symbol (using maxNbBits-1); let's create one from largest rank 0 (using maxNbBits) */ - for huffNode[n].nbBits() == maxNbBits { - n-- - } - huffNode[n+1].setNbBits(huffNode[n+1].nbBits() - 1) - rankLast[1] = n + 1 - totalCost++ - continue - } - huffNode[rankLast[1]+1].setNbBits(huffNode[rankLast[1]+1].nbBits() - 1) - rankLast[1]++ - totalCost++ - } - } - return maxNbBits -} - -// A nodeElt is the fields -// -// count uint32 -// parent uint16 -// symbol byte -// nbBits uint8 -// -// in some order, all squashed into an integer so that the compiler -// always loads and stores entire nodeElts instead of separate fields. -type nodeElt uint64 - -func makeNodeElt(count uint32, symbol byte) nodeElt { - return nodeElt(count) | nodeElt(symbol)<<48 -} - -func (e *nodeElt) count() uint32 { return uint32(*e) } -func (e *nodeElt) parent() uint16 { return uint16(*e >> 32) } -func (e *nodeElt) symbol() byte { return byte(*e >> 48) } -func (e *nodeElt) nbBits() uint8 { return uint8(*e >> 56) } - -func (e *nodeElt) setCount(c uint32) { *e = (*e)&0xffffffff00000000 | nodeElt(c) } -func (e *nodeElt) setParent(p int16) { *e = (*e)&0xffff0000ffffffff | nodeElt(uint16(p))<<32 } -func (e *nodeElt) setNbBits(n uint8) { *e = (*e)&0x00ffffffffffffff | nodeElt(n)<<56 } diff --git a/vendor/github.com/klauspost/compress/huff0/decompress.go b/vendor/github.com/klauspost/compress/huff0/decompress.go deleted file mode 100644 index 54bd08b2..00000000 --- a/vendor/github.com/klauspost/compress/huff0/decompress.go +++ /dev/null @@ -1,1167 +0,0 @@ -package huff0 - -import ( - "errors" - "fmt" - "io" - "sync" - - "github.com/klauspost/compress/fse" -) - -type dTable struct { - single []dEntrySingle -} - -// single-symbols decoding -type dEntrySingle struct { - entry uint16 -} - -// Uses special code for all tables that are < 8 bits. -const use8BitTables = true - -// ReadTable will read a table from the input. -// The size of the input may be larger than the table definition. -// Any content remaining after the table definition will be returned. -// If no Scratch is provided a new one is allocated. -// The returned Scratch can be used for encoding or decoding input using this table. -func ReadTable(in []byte, s *Scratch) (s2 *Scratch, remain []byte, err error) { - s, err = s.prepare(nil) - if err != nil { - return s, nil, err - } - if len(in) <= 1 { - return s, nil, errors.New("input too small for table") - } - iSize := in[0] - in = in[1:] - if iSize >= 128 { - // Uncompressed - oSize := iSize - 127 - iSize = (oSize + 1) / 2 - if int(iSize) > len(in) { - return s, nil, errors.New("input too small for table") - } - for n := uint8(0); n < oSize; n += 2 { - v := in[n/2] - s.huffWeight[n] = v >> 4 - s.huffWeight[n+1] = v & 15 - } - s.symbolLen = uint16(oSize) - in = in[iSize:] - } else { - if len(in) < int(iSize) { - return s, nil, fmt.Errorf("input too small for table, want %d bytes, have %d", iSize, len(in)) - } - // FSE compressed weights - s.fse.DecompressLimit = 255 - hw := s.huffWeight[:] - s.fse.Out = hw - b, err := fse.Decompress(in[:iSize], s.fse) - s.fse.Out = nil - if err != nil { - return s, nil, fmt.Errorf("fse decompress returned: %w", err) - } - if len(b) > 255 { - return s, nil, errors.New("corrupt input: output table too large") - } - s.symbolLen = uint16(len(b)) - in = in[iSize:] - } - - // collect weight stats - var rankStats [16]uint32 - weightTotal := uint32(0) - for _, v := range s.huffWeight[:s.symbolLen] { - if v > tableLogMax { - return s, nil, errors.New("corrupt input: weight too large") - } - v2 := v & 15 - rankStats[v2]++ - // (1 << (v2-1)) is slower since the compiler cannot prove that v2 isn't 0. - weightTotal += (1 << v2) >> 1 - } - if weightTotal == 0 { - return s, nil, errors.New("corrupt input: weights zero") - } - - // get last non-null symbol weight (implied, total must be 2^n) - { - tableLog := highBit32(weightTotal) + 1 - if tableLog > tableLogMax { - return s, nil, errors.New("corrupt input: tableLog too big") - } - s.actualTableLog = uint8(tableLog) - // determine last weight - { - total := uint32(1) << tableLog - rest := total - weightTotal - verif := uint32(1) << highBit32(rest) - lastWeight := highBit32(rest) + 1 - if verif != rest { - // last value must be a clean power of 2 - return s, nil, errors.New("corrupt input: last value not power of two") - } - s.huffWeight[s.symbolLen] = uint8(lastWeight) - s.symbolLen++ - rankStats[lastWeight]++ - } - } - - if (rankStats[1] < 2) || (rankStats[1]&1 != 0) { - // by construction : at least 2 elts of rank 1, must be even - return s, nil, errors.New("corrupt input: min elt size, even check failed ") - } - - // TODO: Choose between single/double symbol decoding - - // Calculate starting value for each rank - { - var nextRankStart uint32 - for n := uint8(1); n < s.actualTableLog+1; n++ { - current := nextRankStart - nextRankStart += rankStats[n] << (n - 1) - rankStats[n] = current - } - } - - // fill DTable (always full size) - tSize := 1 << tableLogMax - if len(s.dt.single) != tSize { - s.dt.single = make([]dEntrySingle, tSize) - } - cTable := s.prevTable - if cap(cTable) < maxSymbolValue+1 { - cTable = make([]cTableEntry, 0, maxSymbolValue+1) - } - cTable = cTable[:maxSymbolValue+1] - s.prevTable = cTable[:s.symbolLen] - s.prevTableLog = s.actualTableLog - - for n, w := range s.huffWeight[:s.symbolLen] { - if w == 0 { - cTable[n] = cTableEntry{ - val: 0, - nBits: 0, - } - continue - } - length := (uint32(1) << w) >> 1 - d := dEntrySingle{ - entry: uint16(s.actualTableLog+1-w) | (uint16(n) << 8), - } - - rank := &rankStats[w] - cTable[n] = cTableEntry{ - val: uint16(*rank >> (w - 1)), - nBits: uint8(d.entry), - } - - single := s.dt.single[*rank : *rank+length] - for i := range single { - single[i] = d - } - *rank += length - } - - return s, in, nil -} - -// Decompress1X will decompress a 1X encoded stream. -// The length of the supplied input must match the end of a block exactly. -// Before this is called, the table must be initialized with ReadTable unless -// the encoder re-used the table. -// deprecated: Use the stateless Decoder() to get a concurrent version. -func (s *Scratch) Decompress1X(in []byte) (out []byte, err error) { - if cap(s.Out) < s.MaxDecodedSize { - s.Out = make([]byte, s.MaxDecodedSize) - } - s.Out = s.Out[:0:s.MaxDecodedSize] - s.Out, err = s.Decoder().Decompress1X(s.Out, in) - return s.Out, err -} - -// Decompress4X will decompress a 4X encoded stream. -// Before this is called, the table must be initialized with ReadTable unless -// the encoder re-used the table. -// The length of the supplied input must match the end of a block exactly. -// The destination size of the uncompressed data must be known and provided. -// deprecated: Use the stateless Decoder() to get a concurrent version. -func (s *Scratch) Decompress4X(in []byte, dstSize int) (out []byte, err error) { - if dstSize > s.MaxDecodedSize { - return nil, ErrMaxDecodedSizeExceeded - } - if cap(s.Out) < dstSize { - s.Out = make([]byte, s.MaxDecodedSize) - } - s.Out = s.Out[:0:dstSize] - s.Out, err = s.Decoder().Decompress4X(s.Out, in) - return s.Out, err -} - -// Decoder will return a stateless decoder that can be used by multiple -// decompressors concurrently. -// Before this is called, the table must be initialized with ReadTable. -// The Decoder is still linked to the scratch buffer so that cannot be reused. -// However, it is safe to discard the scratch. -func (s *Scratch) Decoder() *Decoder { - return &Decoder{ - dt: s.dt, - actualTableLog: s.actualTableLog, - bufs: &s.decPool, - } -} - -// Decoder provides stateless decoding. -type Decoder struct { - dt dTable - actualTableLog uint8 - bufs *sync.Pool -} - -func (d *Decoder) buffer() *[4][256]byte { - buf, ok := d.bufs.Get().(*[4][256]byte) - if ok { - return buf - } - return &[4][256]byte{} -} - -// decompress1X8Bit will decompress a 1X encoded stream with tablelog <= 8. -// The cap of the output buffer will be the maximum decompressed size. -// The length of the supplied input must match the end of a block exactly. -func (d *Decoder) decompress1X8Bit(dst, src []byte) ([]byte, error) { - if d.actualTableLog == 8 { - return d.decompress1X8BitExactly(dst, src) - } - var br bitReaderBytes - err := br.init(src) - if err != nil { - return dst, err - } - maxDecodedSize := cap(dst) - dst = dst[:0] - - // Avoid bounds check by always having full sized table. - dt := d.dt.single[:256] - - // Use temp table to avoid bound checks/append penalty. - bufs := d.buffer() - buf := &bufs[0] - var off uint8 - - switch d.actualTableLog { - case 8: - const shift = 0 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - br.close() - d.bufs.Put(bufs) - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - case 7: - const shift = 8 - 7 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - br.close() - d.bufs.Put(bufs) - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - case 6: - const shift = 8 - 6 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - case 5: - const shift = 8 - 5 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - case 4: - const shift = 8 - 4 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - case 3: - const shift = 8 - 3 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - case 2: - const shift = 8 - 2 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - case 1: - const shift = 8 - 1 - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>(56+shift))] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - default: - d.bufs.Put(bufs) - return nil, fmt.Errorf("invalid tablelog: %d", d.actualTableLog) - } - - if len(dst)+int(off) > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:off]...) - - // br < 4, so uint8 is fine - bitsLeft := int8(uint8(br.off)*8 + (64 - br.bitsRead)) - shift := (8 - d.actualTableLog) & 7 - - for bitsLeft > 0 { - if br.bitsRead >= 64-8 { - for br.off > 0 { - br.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8) - br.bitsRead -= 8 - br.off-- - } - } - if len(dst) >= maxDecodedSize { - br.close() - d.bufs.Put(bufs) - return nil, ErrMaxDecodedSizeExceeded - } - v := dt[br.peekByteFast()>>shift] - nBits := uint8(v.entry) - br.advance(nBits) - bitsLeft -= int8(nBits) - dst = append(dst, uint8(v.entry>>8)) - } - d.bufs.Put(bufs) - return dst, br.close() -} - -// decompress1X8Bit will decompress a 1X encoded stream with tablelog <= 8. -// The cap of the output buffer will be the maximum decompressed size. -// The length of the supplied input must match the end of a block exactly. -func (d *Decoder) decompress1X8BitExactly(dst, src []byte) ([]byte, error) { - var br bitReaderBytes - err := br.init(src) - if err != nil { - return dst, err - } - maxDecodedSize := cap(dst) - dst = dst[:0] - - // Avoid bounds check by always having full sized table. - dt := d.dt.single[:256] - - // Use temp table to avoid bound checks/append penalty. - bufs := d.buffer() - buf := &bufs[0] - var off uint8 - - const shift = 56 - - //fmt.Printf("mask: %b, tl:%d\n", mask, d.actualTableLog) - for br.off >= 4 { - br.fillFast() - v := dt[uint8(br.value>>shift)] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>shift)] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>shift)] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[uint8(br.value>>shift)] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - - if len(dst)+int(off) > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:off]...) - - // br < 4, so uint8 is fine - bitsLeft := int8(uint8(br.off)*8 + (64 - br.bitsRead)) - for bitsLeft > 0 { - if br.bitsRead >= 64-8 { - for br.off > 0 { - br.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8) - br.bitsRead -= 8 - br.off-- - } - } - if len(dst) >= maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - v := dt[br.peekByteFast()] - nBits := uint8(v.entry) - br.advance(nBits) - bitsLeft -= int8(nBits) - dst = append(dst, uint8(v.entry>>8)) - } - d.bufs.Put(bufs) - return dst, br.close() -} - -// Decompress4X will decompress a 4X encoded stream. -// The length of the supplied input must match the end of a block exactly. -// The *capacity* of the dst slice must match the destination size of -// the uncompressed data exactly. -func (d *Decoder) decompress4X8bit(dst, src []byte) ([]byte, error) { - if d.actualTableLog == 8 { - return d.decompress4X8bitExactly(dst, src) - } - - var br [4]bitReaderBytes - start := 6 - for i := 0; i < 3; i++ { - length := int(src[i*2]) | (int(src[i*2+1]) << 8) - if start+length >= len(src) { - return nil, errors.New("truncated input (or invalid offset)") - } - err := br[i].init(src[start : start+length]) - if err != nil { - return nil, err - } - start += length - } - err := br[3].init(src[start:]) - if err != nil { - return nil, err - } - - // destination, offset to match first output - dstSize := cap(dst) - dst = dst[:dstSize] - out := dst - dstEvery := (dstSize + 3) / 4 - - shift := (56 + (8 - d.actualTableLog)) & 63 - - const tlSize = 1 << 8 - single := d.dt.single[:tlSize] - - // Use temp table to avoid bound checks/append penalty. - buf := d.buffer() - var off uint8 - var decoded int - - // Decode 4 values from each decoder/loop. - const bufoff = 256 - for { - if br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 { - break - } - - { - // Interleave 2 decodes. - const stream = 0 - const stream2 = 1 - br1 := &br[stream] - br2 := &br[stream2] - br1.fillFast() - br2.fillFast() - - v := single[uint8(br1.value>>shift)].entry - v2 := single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off] = uint8(v >> 8) - buf[stream2][off] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+1] = uint8(v >> 8) - buf[stream2][off+1] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+2] = uint8(v >> 8) - buf[stream2][off+2] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+3] = uint8(v >> 8) - buf[stream2][off+3] = uint8(v2 >> 8) - } - - { - const stream = 2 - const stream2 = 3 - br1 := &br[stream] - br2 := &br[stream2] - br1.fillFast() - br2.fillFast() - - v := single[uint8(br1.value>>shift)].entry - v2 := single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off] = uint8(v >> 8) - buf[stream2][off] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+1] = uint8(v >> 8) - buf[stream2][off+1] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+2] = uint8(v >> 8) - buf[stream2][off+2] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+3] = uint8(v >> 8) - buf[stream2][off+3] = uint8(v2 >> 8) - } - - off += 4 - - if off == 0 { - if bufoff > dstEvery { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 1") - } - // There must at least be 3 buffers left. - if len(out)-bufoff < dstEvery*3 { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 2") - } - //copy(out, buf[0][:]) - //copy(out[dstEvery:], buf[1][:]) - //copy(out[dstEvery*2:], buf[2][:]) - *(*[bufoff]byte)(out) = buf[0] - *(*[bufoff]byte)(out[dstEvery:]) = buf[1] - *(*[bufoff]byte)(out[dstEvery*2:]) = buf[2] - *(*[bufoff]byte)(out[dstEvery*3:]) = buf[3] - out = out[bufoff:] - decoded += bufoff * 4 - } - } - if off > 0 { - ioff := int(off) - if len(out) < dstEvery*3+ioff { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 3") - } - copy(out, buf[0][:off]) - copy(out[dstEvery:], buf[1][:off]) - copy(out[dstEvery*2:], buf[2][:off]) - copy(out[dstEvery*3:], buf[3][:off]) - decoded += int(off) * 4 - out = out[off:] - } - - // Decode remaining. - // Decode remaining. - remainBytes := dstEvery - (decoded / 4) - for i := range br { - offset := dstEvery * i - endsAt := offset + remainBytes - if endsAt > len(out) { - endsAt = len(out) - } - br := &br[i] - bitsLeft := br.remaining() - for bitsLeft > 0 { - if br.finished() { - d.bufs.Put(buf) - return nil, io.ErrUnexpectedEOF - } - if br.bitsRead >= 56 { - if br.off >= 4 { - v := br.in[br.off-4:] - v = v[:4] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - br.value |= uint64(low) << (br.bitsRead - 32) - br.bitsRead -= 32 - br.off -= 4 - } else { - for br.off > 0 { - br.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8) - br.bitsRead -= 8 - br.off-- - } - } - } - // end inline... - if offset >= endsAt { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 4") - } - - // Read value and increment offset. - v := single[uint8(br.value>>shift)].entry - nBits := uint8(v) - br.advance(nBits) - bitsLeft -= uint(nBits) - out[offset] = uint8(v >> 8) - offset++ - } - if offset != endsAt { - d.bufs.Put(buf) - return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt) - } - decoded += offset - dstEvery*i - err = br.close() - if err != nil { - d.bufs.Put(buf) - return nil, err - } - } - d.bufs.Put(buf) - if dstSize != decoded { - return nil, errors.New("corruption detected: short output block") - } - return dst, nil -} - -// Decompress4X will decompress a 4X encoded stream. -// The length of the supplied input must match the end of a block exactly. -// The *capacity* of the dst slice must match the destination size of -// the uncompressed data exactly. -func (d *Decoder) decompress4X8bitExactly(dst, src []byte) ([]byte, error) { - var br [4]bitReaderBytes - start := 6 - for i := 0; i < 3; i++ { - length := int(src[i*2]) | (int(src[i*2+1]) << 8) - if start+length >= len(src) { - return nil, errors.New("truncated input (or invalid offset)") - } - err := br[i].init(src[start : start+length]) - if err != nil { - return nil, err - } - start += length - } - err := br[3].init(src[start:]) - if err != nil { - return nil, err - } - - // destination, offset to match first output - dstSize := cap(dst) - dst = dst[:dstSize] - out := dst - dstEvery := (dstSize + 3) / 4 - - const shift = 56 - const tlSize = 1 << 8 - single := d.dt.single[:tlSize] - - // Use temp table to avoid bound checks/append penalty. - buf := d.buffer() - var off uint8 - var decoded int - - // Decode 4 values from each decoder/loop. - const bufoff = 256 - for { - if br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 { - break - } - - { - // Interleave 2 decodes. - const stream = 0 - const stream2 = 1 - br1 := &br[stream] - br2 := &br[stream2] - br1.fillFast() - br2.fillFast() - - v := single[uint8(br1.value>>shift)].entry - v2 := single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off] = uint8(v >> 8) - buf[stream2][off] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+1] = uint8(v >> 8) - buf[stream2][off+1] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+2] = uint8(v >> 8) - buf[stream2][off+2] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+3] = uint8(v >> 8) - buf[stream2][off+3] = uint8(v2 >> 8) - } - - { - const stream = 2 - const stream2 = 3 - br1 := &br[stream] - br2 := &br[stream2] - br1.fillFast() - br2.fillFast() - - v := single[uint8(br1.value>>shift)].entry - v2 := single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off] = uint8(v >> 8) - buf[stream2][off] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+1] = uint8(v >> 8) - buf[stream2][off+1] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+2] = uint8(v >> 8) - buf[stream2][off+2] = uint8(v2 >> 8) - - v = single[uint8(br1.value>>shift)].entry - v2 = single[uint8(br2.value>>shift)].entry - br1.bitsRead += uint8(v) - br1.value <<= v & 63 - br2.bitsRead += uint8(v2) - br2.value <<= v2 & 63 - buf[stream][off+3] = uint8(v >> 8) - buf[stream2][off+3] = uint8(v2 >> 8) - } - - off += 4 - - if off == 0 { - if bufoff > dstEvery { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 1") - } - // There must at least be 3 buffers left. - if len(out)-bufoff < dstEvery*3 { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 2") - } - - //copy(out, buf[0][:]) - //copy(out[dstEvery:], buf[1][:]) - //copy(out[dstEvery*2:], buf[2][:]) - // copy(out[dstEvery*3:], buf[3][:]) - *(*[bufoff]byte)(out) = buf[0] - *(*[bufoff]byte)(out[dstEvery:]) = buf[1] - *(*[bufoff]byte)(out[dstEvery*2:]) = buf[2] - *(*[bufoff]byte)(out[dstEvery*3:]) = buf[3] - out = out[bufoff:] - decoded += bufoff * 4 - } - } - if off > 0 { - ioff := int(off) - if len(out) < dstEvery*3+ioff { - return nil, errors.New("corruption detected: stream overrun 3") - } - copy(out, buf[0][:off]) - copy(out[dstEvery:], buf[1][:off]) - copy(out[dstEvery*2:], buf[2][:off]) - copy(out[dstEvery*3:], buf[3][:off]) - decoded += int(off) * 4 - out = out[off:] - } - - // Decode remaining. - remainBytes := dstEvery - (decoded / 4) - for i := range br { - offset := dstEvery * i - endsAt := offset + remainBytes - if endsAt > len(out) { - endsAt = len(out) - } - br := &br[i] - bitsLeft := br.remaining() - for bitsLeft > 0 { - if br.finished() { - d.bufs.Put(buf) - return nil, io.ErrUnexpectedEOF - } - if br.bitsRead >= 56 { - if br.off >= 4 { - v := br.in[br.off-4:] - v = v[:4] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - br.value |= uint64(low) << (br.bitsRead - 32) - br.bitsRead -= 32 - br.off -= 4 - } else { - for br.off > 0 { - br.value |= uint64(br.in[br.off-1]) << (br.bitsRead - 8) - br.bitsRead -= 8 - br.off-- - } - } - } - // end inline... - if offset >= endsAt { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 4") - } - - // Read value and increment offset. - v := single[br.peekByteFast()].entry - nBits := uint8(v) - br.advance(nBits) - bitsLeft -= uint(nBits) - out[offset] = uint8(v >> 8) - offset++ - } - if offset != endsAt { - d.bufs.Put(buf) - return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt) - } - - decoded += offset - dstEvery*i - err = br.close() - if err != nil { - d.bufs.Put(buf) - return nil, err - } - } - d.bufs.Put(buf) - if dstSize != decoded { - return nil, errors.New("corruption detected: short output block") - } - return dst, nil -} - -// matches will compare a decoding table to a coding table. -// Errors are written to the writer. -// Nothing will be written if table is ok. -func (s *Scratch) matches(ct cTable, w io.Writer) { - if s == nil || len(s.dt.single) == 0 { - return - } - dt := s.dt.single[:1<>8) == byte(sym) { - fmt.Fprintf(w, "symbol %x has decoder, but no encoder\n", sym) - errs++ - break - } - } - if errs == 0 { - broken-- - } - continue - } - // Unused bits in input - ub := tablelog - enc.nBits - top := enc.val << ub - // decoder looks at top bits. - dec := dt[top] - if uint8(dec.entry) != enc.nBits { - fmt.Fprintf(w, "symbol 0x%x bit size mismatch (enc: %d, dec:%d).\n", sym, enc.nBits, uint8(dec.entry)) - errs++ - } - if uint8(dec.entry>>8) != uint8(sym) { - fmt.Fprintf(w, "symbol 0x%x decoder output mismatch (enc: %d, dec:%d).\n", sym, sym, uint8(dec.entry>>8)) - errs++ - } - if errs > 0 { - fmt.Fprintf(w, "%d errros in base, stopping\n", errs) - continue - } - // Ensure that all combinations are covered. - for i := uint16(0); i < (1 << ub); i++ { - vval := top | i - dec := dt[vval] - if uint8(dec.entry) != enc.nBits { - fmt.Fprintf(w, "symbol 0x%x bit size mismatch (enc: %d, dec:%d).\n", vval, enc.nBits, uint8(dec.entry)) - errs++ - } - if uint8(dec.entry>>8) != uint8(sym) { - fmt.Fprintf(w, "symbol 0x%x decoder output mismatch (enc: %d, dec:%d).\n", vval, sym, uint8(dec.entry>>8)) - errs++ - } - if errs > 20 { - fmt.Fprintf(w, "%d errros, stopping\n", errs) - break - } - } - if errs == 0 { - ok++ - broken-- - } - } - if broken > 0 { - fmt.Fprintf(w, "%d broken, %d ok\n", broken, ok) - } -} diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go deleted file mode 100644 index ba7e8e6b..00000000 --- a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go +++ /dev/null @@ -1,226 +0,0 @@ -//go:build amd64 && !appengine && !noasm && gc -// +build amd64,!appengine,!noasm,gc - -// This file contains the specialisation of Decoder.Decompress4X -// and Decoder.Decompress1X that use an asm implementation of thir main loops. -package huff0 - -import ( - "errors" - "fmt" - - "github.com/klauspost/compress/internal/cpuinfo" -) - -// decompress4x_main_loop_x86 is an x86 assembler implementation -// of Decompress4X when tablelog > 8. -// -//go:noescape -func decompress4x_main_loop_amd64(ctx *decompress4xContext) - -// decompress4x_8b_loop_x86 is an x86 assembler implementation -// of Decompress4X when tablelog <= 8 which decodes 4 entries -// per loop. -// -//go:noescape -func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext) - -// fallback8BitSize is the size where using Go version is faster. -const fallback8BitSize = 800 - -type decompress4xContext struct { - pbr *[4]bitReaderShifted - peekBits uint8 - out *byte - dstEvery int - tbl *dEntrySingle - decoded int - limit *byte -} - -// Decompress4X will decompress a 4X encoded stream. -// The length of the supplied input must match the end of a block exactly. -// The *capacity* of the dst slice must match the destination size of -// the uncompressed data exactly. -func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) { - if len(d.dt.single) == 0 { - return nil, errors.New("no table loaded") - } - if len(src) < 6+(4*1) { - return nil, errors.New("input too small") - } - - use8BitTables := d.actualTableLog <= 8 - if cap(dst) < fallback8BitSize && use8BitTables { - return d.decompress4X8bit(dst, src) - } - - var br [4]bitReaderShifted - // Decode "jump table" - start := 6 - for i := 0; i < 3; i++ { - length := int(src[i*2]) | (int(src[i*2+1]) << 8) - if start+length >= len(src) { - return nil, errors.New("truncated input (or invalid offset)") - } - err := br[i].init(src[start : start+length]) - if err != nil { - return nil, err - } - start += length - } - err := br[3].init(src[start:]) - if err != nil { - return nil, err - } - - // destination, offset to match first output - dstSize := cap(dst) - dst = dst[:dstSize] - out := dst - dstEvery := (dstSize + 3) / 4 - - const tlSize = 1 << tableLogMax - const tlMask = tlSize - 1 - single := d.dt.single[:tlSize] - - var decoded int - - if len(out) > 4*4 && !(br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4) { - ctx := decompress4xContext{ - pbr: &br, - peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast() - out: &out[0], - dstEvery: dstEvery, - tbl: &single[0], - limit: &out[dstEvery-4], // Always stop decoding when first buffer gets here to avoid writing OOB on last. - } - if use8BitTables { - decompress4x_8b_main_loop_amd64(&ctx) - } else { - decompress4x_main_loop_amd64(&ctx) - } - - decoded = ctx.decoded - out = out[decoded/4:] - } - - // Decode remaining. - remainBytes := dstEvery - (decoded / 4) - for i := range br { - offset := dstEvery * i - endsAt := offset + remainBytes - if endsAt > len(out) { - endsAt = len(out) - } - br := &br[i] - bitsLeft := br.remaining() - for bitsLeft > 0 { - br.fill() - if offset >= endsAt { - return nil, errors.New("corruption detected: stream overrun 4") - } - - // Read value and increment offset. - val := br.peekBitsFast(d.actualTableLog) - v := single[val&tlMask].entry - nBits := uint8(v) - br.advance(nBits) - bitsLeft -= uint(nBits) - out[offset] = uint8(v >> 8) - offset++ - } - if offset != endsAt { - return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt) - } - decoded += offset - dstEvery*i - err = br.close() - if err != nil { - return nil, err - } - } - if dstSize != decoded { - return nil, errors.New("corruption detected: short output block") - } - return dst, nil -} - -// decompress4x_main_loop_x86 is an x86 assembler implementation -// of Decompress1X when tablelog > 8. -// -//go:noescape -func decompress1x_main_loop_amd64(ctx *decompress1xContext) - -// decompress4x_main_loop_x86 is an x86 with BMI2 assembler implementation -// of Decompress1X when tablelog > 8. -// -//go:noescape -func decompress1x_main_loop_bmi2(ctx *decompress1xContext) - -type decompress1xContext struct { - pbr *bitReaderShifted - peekBits uint8 - out *byte - outCap int - tbl *dEntrySingle - decoded int -} - -// Error reported by asm implementations -const error_max_decoded_size_exeeded = -1 - -// Decompress1X will decompress a 1X encoded stream. -// The cap of the output buffer will be the maximum decompressed size. -// The length of the supplied input must match the end of a block exactly. -func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) { - if len(d.dt.single) == 0 { - return nil, errors.New("no table loaded") - } - var br bitReaderShifted - err := br.init(src) - if err != nil { - return dst, err - } - maxDecodedSize := cap(dst) - dst = dst[:maxDecodedSize] - - const tlSize = 1 << tableLogMax - const tlMask = tlSize - 1 - - if maxDecodedSize >= 4 { - ctx := decompress1xContext{ - pbr: &br, - out: &dst[0], - outCap: maxDecodedSize, - peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast() - tbl: &d.dt.single[0], - } - - if cpuinfo.HasBMI2() { - decompress1x_main_loop_bmi2(&ctx) - } else { - decompress1x_main_loop_amd64(&ctx) - } - if ctx.decoded == error_max_decoded_size_exeeded { - return nil, ErrMaxDecodedSizeExceeded - } - - dst = dst[:ctx.decoded] - } - - // br < 8, so uint8 is fine - bitsLeft := uint8(br.off)*8 + 64 - br.bitsRead - for bitsLeft > 0 { - br.fill() - if len(dst) >= maxDecodedSize { - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - v := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask] - nBits := uint8(v.entry) - br.advance(nBits) - bitsLeft -= nBits - dst = append(dst, uint8(v.entry>>8)) - } - return dst, br.close() -} diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s deleted file mode 100644 index c4c7ab2d..00000000 --- a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s +++ /dev/null @@ -1,830 +0,0 @@ -// Code generated by command: go run gen.go -out ../decompress_amd64.s -pkg=huff0. DO NOT EDIT. - -//go:build amd64 && !appengine && !noasm && gc - -// func decompress4x_main_loop_amd64(ctx *decompress4xContext) -TEXT ·decompress4x_main_loop_amd64(SB), $0-8 - // Preload values - MOVQ ctx+0(FP), AX - MOVBQZX 8(AX), DI - MOVQ 16(AX), BX - MOVQ 48(AX), SI - MOVQ 24(AX), R8 - MOVQ 32(AX), R9 - MOVQ (AX), R10 - - // Main loop -main_loop: - XORL DX, DX - CMPQ BX, SI - SETGE DL - - // br0.fillFast32() - MOVQ 32(R10), R11 - MOVBQZX 40(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill0 - MOVQ 24(R10), AX - SUBQ $0x20, R12 - SUBQ $0x04, AX - MOVQ (R10), R13 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (AX)(R13*1), R13 - MOVQ R12, CX - SHLQ CL, R13 - MOVQ AX, 24(R10) - ORQ R13, R11 - - // exhausted += (br0.off < 4) - CMPQ AX, $0x04 - ADCB $+0, DL - -skip_fill0: - // val0 := br0.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br0.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br0.peekTopBits(peekBits) - MOVQ DI, CX - MOVQ R11, R13 - SHRQ CL, R13 - - // v1 := table[val1&mask] - MOVW (R9)(R13*2), CX - - // br0.advance(uint8(v1.entry)) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // these two writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - MOVW AX, (BX) - - // update the bitreader structure - MOVQ R11, 32(R10) - MOVB R12, 40(R10) - - // br1.fillFast32() - MOVQ 80(R10), R11 - MOVBQZX 88(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill1 - MOVQ 72(R10), AX - SUBQ $0x20, R12 - SUBQ $0x04, AX - MOVQ 48(R10), R13 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (AX)(R13*1), R13 - MOVQ R12, CX - SHLQ CL, R13 - MOVQ AX, 72(R10) - ORQ R13, R11 - - // exhausted += (br1.off < 4) - CMPQ AX, $0x04 - ADCB $+0, DL - -skip_fill1: - // val0 := br1.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br1.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br1.peekTopBits(peekBits) - MOVQ DI, CX - MOVQ R11, R13 - SHRQ CL, R13 - - // v1 := table[val1&mask] - MOVW (R9)(R13*2), CX - - // br1.advance(uint8(v1.entry)) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // these two writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - MOVW AX, (BX)(R8*1) - - // update the bitreader structure - MOVQ R11, 80(R10) - MOVB R12, 88(R10) - - // br2.fillFast32() - MOVQ 128(R10), R11 - MOVBQZX 136(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill2 - MOVQ 120(R10), AX - SUBQ $0x20, R12 - SUBQ $0x04, AX - MOVQ 96(R10), R13 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (AX)(R13*1), R13 - MOVQ R12, CX - SHLQ CL, R13 - MOVQ AX, 120(R10) - ORQ R13, R11 - - // exhausted += (br2.off < 4) - CMPQ AX, $0x04 - ADCB $+0, DL - -skip_fill2: - // val0 := br2.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br2.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br2.peekTopBits(peekBits) - MOVQ DI, CX - MOVQ R11, R13 - SHRQ CL, R13 - - // v1 := table[val1&mask] - MOVW (R9)(R13*2), CX - - // br2.advance(uint8(v1.entry)) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // these two writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - MOVW AX, (BX)(R8*2) - - // update the bitreader structure - MOVQ R11, 128(R10) - MOVB R12, 136(R10) - - // br3.fillFast32() - MOVQ 176(R10), R11 - MOVBQZX 184(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill3 - MOVQ 168(R10), AX - SUBQ $0x20, R12 - SUBQ $0x04, AX - MOVQ 144(R10), R13 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (AX)(R13*1), R13 - MOVQ R12, CX - SHLQ CL, R13 - MOVQ AX, 168(R10) - ORQ R13, R11 - - // exhausted += (br3.off < 4) - CMPQ AX, $0x04 - ADCB $+0, DL - -skip_fill3: - // val0 := br3.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br3.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br3.peekTopBits(peekBits) - MOVQ DI, CX - MOVQ R11, R13 - SHRQ CL, R13 - - // v1 := table[val1&mask] - MOVW (R9)(R13*2), CX - - // br3.advance(uint8(v1.entry)) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // these two writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - LEAQ (R8)(R8*2), CX - MOVW AX, (BX)(CX*1) - - // update the bitreader structure - MOVQ R11, 176(R10) - MOVB R12, 184(R10) - ADDQ $0x02, BX - TESTB DL, DL - JZ main_loop - MOVQ ctx+0(FP), AX - SUBQ 16(AX), BX - SHLQ $0x02, BX - MOVQ BX, 40(AX) - RET - -// func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext) -TEXT ·decompress4x_8b_main_loop_amd64(SB), $0-8 - // Preload values - MOVQ ctx+0(FP), CX - MOVBQZX 8(CX), DI - MOVQ 16(CX), BX - MOVQ 48(CX), SI - MOVQ 24(CX), R8 - MOVQ 32(CX), R9 - MOVQ (CX), R10 - - // Main loop -main_loop: - XORL DX, DX - CMPQ BX, SI - SETGE DL - - // br0.fillFast32() - MOVQ 32(R10), R11 - MOVBQZX 40(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill0 - MOVQ 24(R10), R13 - SUBQ $0x20, R12 - SUBQ $0x04, R13 - MOVQ (R10), R14 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (R13)(R14*1), R14 - MOVQ R12, CX - SHLQ CL, R14 - MOVQ R13, 24(R10) - ORQ R14, R11 - - // exhausted += (br0.off < 4) - CMPQ R13, $0x04 - ADCB $+0, DL - -skip_fill0: - // val0 := br0.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br0.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br0.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v1 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br0.advance(uint8(v1.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // val2 := br0.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v2 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br0.advance(uint8(v2.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // val3 := br0.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v3 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br0.advance(uint8(v3.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // these four writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - // out[id * dstEvery + 3] = uint8(v2.entry >> 8) - // out[id * dstEvery + 4] = uint8(v3.entry >> 8) - MOVL AX, (BX) - - // update the bitreader structure - MOVQ R11, 32(R10) - MOVB R12, 40(R10) - - // br1.fillFast32() - MOVQ 80(R10), R11 - MOVBQZX 88(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill1 - MOVQ 72(R10), R13 - SUBQ $0x20, R12 - SUBQ $0x04, R13 - MOVQ 48(R10), R14 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (R13)(R14*1), R14 - MOVQ R12, CX - SHLQ CL, R14 - MOVQ R13, 72(R10) - ORQ R14, R11 - - // exhausted += (br1.off < 4) - CMPQ R13, $0x04 - ADCB $+0, DL - -skip_fill1: - // val0 := br1.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br1.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br1.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v1 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br1.advance(uint8(v1.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // val2 := br1.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v2 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br1.advance(uint8(v2.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // val3 := br1.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v3 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br1.advance(uint8(v3.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // these four writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - // out[id * dstEvery + 3] = uint8(v2.entry >> 8) - // out[id * dstEvery + 4] = uint8(v3.entry >> 8) - MOVL AX, (BX)(R8*1) - - // update the bitreader structure - MOVQ R11, 80(R10) - MOVB R12, 88(R10) - - // br2.fillFast32() - MOVQ 128(R10), R11 - MOVBQZX 136(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill2 - MOVQ 120(R10), R13 - SUBQ $0x20, R12 - SUBQ $0x04, R13 - MOVQ 96(R10), R14 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (R13)(R14*1), R14 - MOVQ R12, CX - SHLQ CL, R14 - MOVQ R13, 120(R10) - ORQ R14, R11 - - // exhausted += (br2.off < 4) - CMPQ R13, $0x04 - ADCB $+0, DL - -skip_fill2: - // val0 := br2.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br2.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br2.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v1 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br2.advance(uint8(v1.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // val2 := br2.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v2 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br2.advance(uint8(v2.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // val3 := br2.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v3 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br2.advance(uint8(v3.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // these four writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - // out[id * dstEvery + 3] = uint8(v2.entry >> 8) - // out[id * dstEvery + 4] = uint8(v3.entry >> 8) - MOVL AX, (BX)(R8*2) - - // update the bitreader structure - MOVQ R11, 128(R10) - MOVB R12, 136(R10) - - // br3.fillFast32() - MOVQ 176(R10), R11 - MOVBQZX 184(R10), R12 - CMPQ R12, $0x20 - JBE skip_fill3 - MOVQ 168(R10), R13 - SUBQ $0x20, R12 - SUBQ $0x04, R13 - MOVQ 144(R10), R14 - - // b.value |= uint64(low) << (b.bitsRead & 63) - MOVL (R13)(R14*1), R14 - MOVQ R12, CX - SHLQ CL, R14 - MOVQ R13, 168(R10) - ORQ R14, R11 - - // exhausted += (br3.off < 4) - CMPQ R13, $0x04 - ADCB $+0, DL - -skip_fill3: - // val0 := br3.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v0 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br3.advance(uint8(v0.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - - // val1 := br3.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v1 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br3.advance(uint8(v1.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // val2 := br3.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v2 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br3.advance(uint8(v2.entry) - MOVB CH, AH - SHLQ CL, R11 - ADDB CL, R12 - - // val3 := br3.peekTopBits(peekBits) - MOVQ R11, R13 - MOVQ DI, CX - SHRQ CL, R13 - - // v3 := table[val0&mask] - MOVW (R9)(R13*2), CX - - // br3.advance(uint8(v3.entry) - MOVB CH, AL - SHLQ CL, R11 - ADDB CL, R12 - BSWAPL AX - - // these four writes get coalesced - // out[id * dstEvery + 0] = uint8(v0.entry >> 8) - // out[id * dstEvery + 1] = uint8(v1.entry >> 8) - // out[id * dstEvery + 3] = uint8(v2.entry >> 8) - // out[id * dstEvery + 4] = uint8(v3.entry >> 8) - LEAQ (R8)(R8*2), CX - MOVL AX, (BX)(CX*1) - - // update the bitreader structure - MOVQ R11, 176(R10) - MOVB R12, 184(R10) - ADDQ $0x04, BX - TESTB DL, DL - JZ main_loop - MOVQ ctx+0(FP), AX - SUBQ 16(AX), BX - SHLQ $0x02, BX - MOVQ BX, 40(AX) - RET - -// func decompress1x_main_loop_amd64(ctx *decompress1xContext) -TEXT ·decompress1x_main_loop_amd64(SB), $0-8 - MOVQ ctx+0(FP), CX - MOVQ 16(CX), DX - MOVQ 24(CX), BX - CMPQ BX, $0x04 - JB error_max_decoded_size_exceeded - LEAQ (DX)(BX*1), BX - MOVQ (CX), SI - MOVQ (SI), R8 - MOVQ 24(SI), R9 - MOVQ 32(SI), R10 - MOVBQZX 40(SI), R11 - MOVQ 32(CX), SI - MOVBQZX 8(CX), DI - JMP loop_condition - -main_loop: - // Check if we have room for 4 bytes in the output buffer - LEAQ 4(DX), CX - CMPQ CX, BX - JGE error_max_decoded_size_exceeded - - // Decode 4 values - CMPQ R11, $0x20 - JL bitReader_fillFast_1_end - SUBQ $0x20, R11 - SUBQ $0x04, R9 - MOVL (R8)(R9*1), R12 - MOVQ R11, CX - SHLQ CL, R12 - ORQ R12, R10 - -bitReader_fillFast_1_end: - MOVQ DI, CX - MOVQ R10, R12 - SHRQ CL, R12 - MOVW (SI)(R12*2), CX - MOVB CH, AL - MOVBQZX CL, CX - ADDQ CX, R11 - SHLQ CL, R10 - MOVQ DI, CX - MOVQ R10, R12 - SHRQ CL, R12 - MOVW (SI)(R12*2), CX - MOVB CH, AH - MOVBQZX CL, CX - ADDQ CX, R11 - SHLQ CL, R10 - BSWAPL AX - CMPQ R11, $0x20 - JL bitReader_fillFast_2_end - SUBQ $0x20, R11 - SUBQ $0x04, R9 - MOVL (R8)(R9*1), R12 - MOVQ R11, CX - SHLQ CL, R12 - ORQ R12, R10 - -bitReader_fillFast_2_end: - MOVQ DI, CX - MOVQ R10, R12 - SHRQ CL, R12 - MOVW (SI)(R12*2), CX - MOVB CH, AH - MOVBQZX CL, CX - ADDQ CX, R11 - SHLQ CL, R10 - MOVQ DI, CX - MOVQ R10, R12 - SHRQ CL, R12 - MOVW (SI)(R12*2), CX - MOVB CH, AL - MOVBQZX CL, CX - ADDQ CX, R11 - SHLQ CL, R10 - BSWAPL AX - - // Store the decoded values - MOVL AX, (DX) - ADDQ $0x04, DX - -loop_condition: - CMPQ R9, $0x08 - JGE main_loop - - // Update ctx structure - MOVQ ctx+0(FP), AX - SUBQ 16(AX), DX - MOVQ DX, 40(AX) - MOVQ (AX), AX - MOVQ R9, 24(AX) - MOVQ R10, 32(AX) - MOVB R11, 40(AX) - RET - - // Report error -error_max_decoded_size_exceeded: - MOVQ ctx+0(FP), AX - MOVQ $-1, CX - MOVQ CX, 40(AX) - RET - -// func decompress1x_main_loop_bmi2(ctx *decompress1xContext) -// Requires: BMI2 -TEXT ·decompress1x_main_loop_bmi2(SB), $0-8 - MOVQ ctx+0(FP), CX - MOVQ 16(CX), DX - MOVQ 24(CX), BX - CMPQ BX, $0x04 - JB error_max_decoded_size_exceeded - LEAQ (DX)(BX*1), BX - MOVQ (CX), SI - MOVQ (SI), R8 - MOVQ 24(SI), R9 - MOVQ 32(SI), R10 - MOVBQZX 40(SI), R11 - MOVQ 32(CX), SI - MOVBQZX 8(CX), DI - JMP loop_condition - -main_loop: - // Check if we have room for 4 bytes in the output buffer - LEAQ 4(DX), CX - CMPQ CX, BX - JGE error_max_decoded_size_exceeded - - // Decode 4 values - CMPQ R11, $0x20 - JL bitReader_fillFast_1_end - SUBQ $0x20, R11 - SUBQ $0x04, R9 - MOVL (R8)(R9*1), CX - SHLXQ R11, CX, CX - ORQ CX, R10 - -bitReader_fillFast_1_end: - SHRXQ DI, R10, CX - MOVW (SI)(CX*2), CX - MOVB CH, AL - MOVBQZX CL, CX - ADDQ CX, R11 - SHLXQ CX, R10, R10 - SHRXQ DI, R10, CX - MOVW (SI)(CX*2), CX - MOVB CH, AH - MOVBQZX CL, CX - ADDQ CX, R11 - SHLXQ CX, R10, R10 - BSWAPL AX - CMPQ R11, $0x20 - JL bitReader_fillFast_2_end - SUBQ $0x20, R11 - SUBQ $0x04, R9 - MOVL (R8)(R9*1), CX - SHLXQ R11, CX, CX - ORQ CX, R10 - -bitReader_fillFast_2_end: - SHRXQ DI, R10, CX - MOVW (SI)(CX*2), CX - MOVB CH, AH - MOVBQZX CL, CX - ADDQ CX, R11 - SHLXQ CX, R10, R10 - SHRXQ DI, R10, CX - MOVW (SI)(CX*2), CX - MOVB CH, AL - MOVBQZX CL, CX - ADDQ CX, R11 - SHLXQ CX, R10, R10 - BSWAPL AX - - // Store the decoded values - MOVL AX, (DX) - ADDQ $0x04, DX - -loop_condition: - CMPQ R9, $0x08 - JGE main_loop - - // Update ctx structure - MOVQ ctx+0(FP), AX - SUBQ 16(AX), DX - MOVQ DX, 40(AX) - MOVQ (AX), AX - MOVQ R9, 24(AX) - MOVQ R10, 32(AX) - MOVB R11, 40(AX) - RET - - // Report error -error_max_decoded_size_exceeded: - MOVQ ctx+0(FP), AX - MOVQ $-1, CX - MOVQ CX, 40(AX) - RET diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_generic.go b/vendor/github.com/klauspost/compress/huff0/decompress_generic.go deleted file mode 100644 index 908c17de..00000000 --- a/vendor/github.com/klauspost/compress/huff0/decompress_generic.go +++ /dev/null @@ -1,299 +0,0 @@ -//go:build !amd64 || appengine || !gc || noasm -// +build !amd64 appengine !gc noasm - -// This file contains a generic implementation of Decoder.Decompress4X. -package huff0 - -import ( - "errors" - "fmt" -) - -// Decompress4X will decompress a 4X encoded stream. -// The length of the supplied input must match the end of a block exactly. -// The *capacity* of the dst slice must match the destination size of -// the uncompressed data exactly. -func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) { - if len(d.dt.single) == 0 { - return nil, errors.New("no table loaded") - } - if len(src) < 6+(4*1) { - return nil, errors.New("input too small") - } - if use8BitTables && d.actualTableLog <= 8 { - return d.decompress4X8bit(dst, src) - } - - var br [4]bitReaderShifted - // Decode "jump table" - start := 6 - for i := 0; i < 3; i++ { - length := int(src[i*2]) | (int(src[i*2+1]) << 8) - if start+length >= len(src) { - return nil, errors.New("truncated input (or invalid offset)") - } - err := br[i].init(src[start : start+length]) - if err != nil { - return nil, err - } - start += length - } - err := br[3].init(src[start:]) - if err != nil { - return nil, err - } - - // destination, offset to match first output - dstSize := cap(dst) - dst = dst[:dstSize] - out := dst - dstEvery := (dstSize + 3) / 4 - - const tlSize = 1 << tableLogMax - const tlMask = tlSize - 1 - single := d.dt.single[:tlSize] - - // Use temp table to avoid bound checks/append penalty. - buf := d.buffer() - var off uint8 - var decoded int - - // Decode 2 values from each decoder/loop. - const bufoff = 256 - for { - if br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 { - break - } - - { - const stream = 0 - const stream2 = 1 - br[stream].fillFast() - br[stream2].fillFast() - - val := br[stream].peekBitsFast(d.actualTableLog) - val2 := br[stream2].peekBitsFast(d.actualTableLog) - v := single[val&tlMask] - v2 := single[val2&tlMask] - br[stream].advance(uint8(v.entry)) - br[stream2].advance(uint8(v2.entry)) - buf[stream][off] = uint8(v.entry >> 8) - buf[stream2][off] = uint8(v2.entry >> 8) - - val = br[stream].peekBitsFast(d.actualTableLog) - val2 = br[stream2].peekBitsFast(d.actualTableLog) - v = single[val&tlMask] - v2 = single[val2&tlMask] - br[stream].advance(uint8(v.entry)) - br[stream2].advance(uint8(v2.entry)) - buf[stream][off+1] = uint8(v.entry >> 8) - buf[stream2][off+1] = uint8(v2.entry >> 8) - } - - { - const stream = 2 - const stream2 = 3 - br[stream].fillFast() - br[stream2].fillFast() - - val := br[stream].peekBitsFast(d.actualTableLog) - val2 := br[stream2].peekBitsFast(d.actualTableLog) - v := single[val&tlMask] - v2 := single[val2&tlMask] - br[stream].advance(uint8(v.entry)) - br[stream2].advance(uint8(v2.entry)) - buf[stream][off] = uint8(v.entry >> 8) - buf[stream2][off] = uint8(v2.entry >> 8) - - val = br[stream].peekBitsFast(d.actualTableLog) - val2 = br[stream2].peekBitsFast(d.actualTableLog) - v = single[val&tlMask] - v2 = single[val2&tlMask] - br[stream].advance(uint8(v.entry)) - br[stream2].advance(uint8(v2.entry)) - buf[stream][off+1] = uint8(v.entry >> 8) - buf[stream2][off+1] = uint8(v2.entry >> 8) - } - - off += 2 - - if off == 0 { - if bufoff > dstEvery { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 1") - } - // There must at least be 3 buffers left. - if len(out)-bufoff < dstEvery*3 { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 2") - } - //copy(out, buf[0][:]) - //copy(out[dstEvery:], buf[1][:]) - //copy(out[dstEvery*2:], buf[2][:]) - //copy(out[dstEvery*3:], buf[3][:]) - *(*[bufoff]byte)(out) = buf[0] - *(*[bufoff]byte)(out[dstEvery:]) = buf[1] - *(*[bufoff]byte)(out[dstEvery*2:]) = buf[2] - *(*[bufoff]byte)(out[dstEvery*3:]) = buf[3] - out = out[bufoff:] - decoded += bufoff * 4 - } - } - if off > 0 { - ioff := int(off) - if len(out) < dstEvery*3+ioff { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 3") - } - copy(out, buf[0][:off]) - copy(out[dstEvery:], buf[1][:off]) - copy(out[dstEvery*2:], buf[2][:off]) - copy(out[dstEvery*3:], buf[3][:off]) - decoded += int(off) * 4 - out = out[off:] - } - - // Decode remaining. - remainBytes := dstEvery - (decoded / 4) - for i := range br { - offset := dstEvery * i - endsAt := offset + remainBytes - if endsAt > len(out) { - endsAt = len(out) - } - br := &br[i] - bitsLeft := br.remaining() - for bitsLeft > 0 { - br.fill() - if offset >= endsAt { - d.bufs.Put(buf) - return nil, errors.New("corruption detected: stream overrun 4") - } - - // Read value and increment offset. - val := br.peekBitsFast(d.actualTableLog) - v := single[val&tlMask].entry - nBits := uint8(v) - br.advance(nBits) - bitsLeft -= uint(nBits) - out[offset] = uint8(v >> 8) - offset++ - } - if offset != endsAt { - d.bufs.Put(buf) - return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt) - } - decoded += offset - dstEvery*i - err = br.close() - if err != nil { - return nil, err - } - } - d.bufs.Put(buf) - if dstSize != decoded { - return nil, errors.New("corruption detected: short output block") - } - return dst, nil -} - -// Decompress1X will decompress a 1X encoded stream. -// The cap of the output buffer will be the maximum decompressed size. -// The length of the supplied input must match the end of a block exactly. -func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) { - if len(d.dt.single) == 0 { - return nil, errors.New("no table loaded") - } - if use8BitTables && d.actualTableLog <= 8 { - return d.decompress1X8Bit(dst, src) - } - var br bitReaderShifted - err := br.init(src) - if err != nil { - return dst, err - } - maxDecodedSize := cap(dst) - dst = dst[:0] - - // Avoid bounds check by always having full sized table. - const tlSize = 1 << tableLogMax - const tlMask = tlSize - 1 - dt := d.dt.single[:tlSize] - - // Use temp table to avoid bound checks/append penalty. - bufs := d.buffer() - buf := &bufs[0] - var off uint8 - - for br.off >= 8 { - br.fillFast() - v := dt[br.peekBitsFast(d.actualTableLog)&tlMask] - br.advance(uint8(v.entry)) - buf[off+0] = uint8(v.entry >> 8) - - v = dt[br.peekBitsFast(d.actualTableLog)&tlMask] - br.advance(uint8(v.entry)) - buf[off+1] = uint8(v.entry >> 8) - - // Refill - br.fillFast() - - v = dt[br.peekBitsFast(d.actualTableLog)&tlMask] - br.advance(uint8(v.entry)) - buf[off+2] = uint8(v.entry >> 8) - - v = dt[br.peekBitsFast(d.actualTableLog)&tlMask] - br.advance(uint8(v.entry)) - buf[off+3] = uint8(v.entry >> 8) - - off += 4 - if off == 0 { - if len(dst)+256 > maxDecodedSize { - br.close() - d.bufs.Put(bufs) - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:]...) - } - } - - if len(dst)+int(off) > maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - dst = append(dst, buf[:off]...) - - // br < 8, so uint8 is fine - bitsLeft := uint8(br.off)*8 + 64 - br.bitsRead - for bitsLeft > 0 { - br.fill() - if false && br.bitsRead >= 32 { - if br.off >= 4 { - v := br.in[br.off-4:] - v = v[:4] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - br.value = (br.value << 32) | uint64(low) - br.bitsRead -= 32 - br.off -= 4 - } else { - for br.off > 0 { - br.value = (br.value << 8) | uint64(br.in[br.off-1]) - br.bitsRead -= 8 - br.off-- - } - } - } - if len(dst) >= maxDecodedSize { - d.bufs.Put(bufs) - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - v := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask] - nBits := uint8(v.entry) - br.advance(nBits) - bitsLeft -= nBits - dst = append(dst, uint8(v.entry>>8)) - } - d.bufs.Put(bufs) - return dst, br.close() -} diff --git a/vendor/github.com/klauspost/compress/huff0/huff0.go b/vendor/github.com/klauspost/compress/huff0/huff0.go deleted file mode 100644 index e8ad17ad..00000000 --- a/vendor/github.com/klauspost/compress/huff0/huff0.go +++ /dev/null @@ -1,337 +0,0 @@ -// Package huff0 provides fast huffman encoding as used in zstd. -// -// See README.md at https://github.com/klauspost/compress/tree/master/huff0 for details. -package huff0 - -import ( - "errors" - "fmt" - "math" - "math/bits" - "sync" - - "github.com/klauspost/compress/fse" -) - -const ( - maxSymbolValue = 255 - - // zstandard limits tablelog to 11, see: - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#huffman-tree-description - tableLogMax = 11 - tableLogDefault = 11 - minTablelog = 5 - huffNodesLen = 512 - - // BlockSizeMax is maximum input size for a single block uncompressed. - BlockSizeMax = 1<<18 - 1 -) - -var ( - // ErrIncompressible is returned when input is judged to be too hard to compress. - ErrIncompressible = errors.New("input is not compressible") - - // ErrUseRLE is returned from the compressor when the input is a single byte value repeated. - ErrUseRLE = errors.New("input is single value repeated") - - // ErrTooBig is return if input is too large for a single block. - ErrTooBig = errors.New("input too big") - - // ErrMaxDecodedSizeExceeded is return if input is too large for a single block. - ErrMaxDecodedSizeExceeded = errors.New("maximum output size exceeded") -) - -type ReusePolicy uint8 - -const ( - // ReusePolicyAllow will allow reuse if it produces smaller output. - ReusePolicyAllow ReusePolicy = iota - - // ReusePolicyPrefer will re-use aggressively if possible. - // This will not check if a new table will produce smaller output, - // except if the current table is impossible to use or - // compressed output is bigger than input. - ReusePolicyPrefer - - // ReusePolicyNone will disable re-use of tables. - // This is slightly faster than ReusePolicyAllow but may produce larger output. - ReusePolicyNone - - // ReusePolicyMust must allow reuse and produce smaller output. - ReusePolicyMust -) - -type Scratch struct { - count [maxSymbolValue + 1]uint32 - - // Per block parameters. - // These can be used to override compression parameters of the block. - // Do not touch, unless you know what you are doing. - - // Out is output buffer. - // If the scratch is re-used before the caller is done processing the output, - // set this field to nil. - // Otherwise the output buffer will be re-used for next Compression/Decompression step - // and allocation will be avoided. - Out []byte - - // OutTable will contain the table data only, if a new table has been generated. - // Slice of the returned data. - OutTable []byte - - // OutData will contain the compressed data. - // Slice of the returned data. - OutData []byte - - // MaxDecodedSize will set the maximum allowed output size. - // This value will automatically be set to BlockSizeMax if not set. - // Decoders will return ErrMaxDecodedSizeExceeded is this limit is exceeded. - MaxDecodedSize int - - br byteReader - - // MaxSymbolValue will override the maximum symbol value of the next block. - MaxSymbolValue uint8 - - // TableLog will attempt to override the tablelog for the next block. - // Must be <= 11 and >= 5. - TableLog uint8 - - // Reuse will specify the reuse policy - Reuse ReusePolicy - - // WantLogLess allows to specify a log 2 reduction that should at least be achieved, - // otherwise the block will be returned as incompressible. - // The reduction should then at least be (input size >> WantLogLess) - // If WantLogLess == 0 any improvement will do. - WantLogLess uint8 - - symbolLen uint16 // Length of active part of the symbol table. - maxCount int // count of the most probable symbol - clearCount bool // clear count - actualTableLog uint8 // Selected tablelog. - prevTableLog uint8 // Tablelog for previous table - prevTable cTable // Table used for previous compression. - cTable cTable // compression table - dt dTable // decompression table - nodes []nodeElt - tmpOut [4][]byte - fse *fse.Scratch - decPool sync.Pool // *[4][256]byte buffers. - huffWeight [maxSymbolValue + 1]byte -} - -// TransferCTable will transfer the previously used compression table. -func (s *Scratch) TransferCTable(src *Scratch) { - if cap(s.prevTable) < len(src.prevTable) { - s.prevTable = make(cTable, 0, maxSymbolValue+1) - } - s.prevTable = s.prevTable[:len(src.prevTable)] - copy(s.prevTable, src.prevTable) - s.prevTableLog = src.prevTableLog -} - -func (s *Scratch) prepare(in []byte) (*Scratch, error) { - if len(in) > BlockSizeMax { - return nil, ErrTooBig - } - if s == nil { - s = &Scratch{} - } - if s.MaxSymbolValue == 0 { - s.MaxSymbolValue = maxSymbolValue - } - if s.TableLog == 0 { - s.TableLog = tableLogDefault - } - if s.TableLog > tableLogMax || s.TableLog < minTablelog { - return nil, fmt.Errorf(" invalid tableLog %d (%d -> %d)", s.TableLog, minTablelog, tableLogMax) - } - if s.MaxDecodedSize <= 0 || s.MaxDecodedSize > BlockSizeMax { - s.MaxDecodedSize = BlockSizeMax - } - if s.clearCount && s.maxCount == 0 { - for i := range s.count { - s.count[i] = 0 - } - s.clearCount = false - } - if cap(s.Out) == 0 { - s.Out = make([]byte, 0, len(in)) - } - s.Out = s.Out[:0] - - s.OutTable = nil - s.OutData = nil - if cap(s.nodes) < huffNodesLen+1 { - s.nodes = make([]nodeElt, 0, huffNodesLen+1) - } - s.nodes = s.nodes[:0] - if s.fse == nil { - s.fse = &fse.Scratch{} - } - s.br.init(in) - - return s, nil -} - -type cTable []cTableEntry - -func (c cTable) write(s *Scratch) error { - var ( - // precomputed conversion table - bitsToWeight [tableLogMax + 1]byte - huffLog = s.actualTableLog - // last weight is not saved. - maxSymbolValue = uint8(s.symbolLen - 1) - huffWeight = s.huffWeight[:256] - ) - const ( - maxFSETableLog = 6 - ) - // convert to weight - bitsToWeight[0] = 0 - for n := uint8(1); n < huffLog+1; n++ { - bitsToWeight[n] = huffLog + 1 - n - } - - // Acquire histogram for FSE. - hist := s.fse.Histogram() - hist = hist[:256] - for i := range hist[:16] { - hist[i] = 0 - } - for n := uint8(0); n < maxSymbolValue; n++ { - v := bitsToWeight[c[n].nBits] & 15 - huffWeight[n] = v - hist[v]++ - } - - // FSE compress if feasible. - if maxSymbolValue >= 2 { - huffMaxCnt := uint32(0) - huffMax := uint8(0) - for i, v := range hist[:16] { - if v == 0 { - continue - } - huffMax = byte(i) - if v > huffMaxCnt { - huffMaxCnt = v - } - } - s.fse.HistogramFinished(huffMax, int(huffMaxCnt)) - s.fse.TableLog = maxFSETableLog - b, err := fse.Compress(huffWeight[:maxSymbolValue], s.fse) - if err == nil && len(b) < int(s.symbolLen>>1) { - s.Out = append(s.Out, uint8(len(b))) - s.Out = append(s.Out, b...) - return nil - } - // Unable to compress (RLE/uncompressible) - } - // write raw values as 4-bits (max : 15) - if maxSymbolValue > (256 - 128) { - // should not happen : likely means source cannot be compressed - return ErrIncompressible - } - op := s.Out - // special case, pack weights 4 bits/weight. - op = append(op, 128|(maxSymbolValue-1)) - // be sure it doesn't cause msan issue in final combination - huffWeight[maxSymbolValue] = 0 - for n := uint16(0); n < uint16(maxSymbolValue); n += 2 { - op = append(op, (huffWeight[n]<<4)|huffWeight[n+1]) - } - s.Out = op - return nil -} - -func (c cTable) estTableSize(s *Scratch) (sz int, err error) { - var ( - // precomputed conversion table - bitsToWeight [tableLogMax + 1]byte - huffLog = s.actualTableLog - // last weight is not saved. - maxSymbolValue = uint8(s.symbolLen - 1) - huffWeight = s.huffWeight[:256] - ) - const ( - maxFSETableLog = 6 - ) - // convert to weight - bitsToWeight[0] = 0 - for n := uint8(1); n < huffLog+1; n++ { - bitsToWeight[n] = huffLog + 1 - n - } - - // Acquire histogram for FSE. - hist := s.fse.Histogram() - hist = hist[:256] - for i := range hist[:16] { - hist[i] = 0 - } - for n := uint8(0); n < maxSymbolValue; n++ { - v := bitsToWeight[c[n].nBits] & 15 - huffWeight[n] = v - hist[v]++ - } - - // FSE compress if feasible. - if maxSymbolValue >= 2 { - huffMaxCnt := uint32(0) - huffMax := uint8(0) - for i, v := range hist[:16] { - if v == 0 { - continue - } - huffMax = byte(i) - if v > huffMaxCnt { - huffMaxCnt = v - } - } - s.fse.HistogramFinished(huffMax, int(huffMaxCnt)) - s.fse.TableLog = maxFSETableLog - b, err := fse.Compress(huffWeight[:maxSymbolValue], s.fse) - if err == nil && len(b) < int(s.symbolLen>>1) { - sz += 1 + len(b) - return sz, nil - } - // Unable to compress (RLE/uncompressible) - } - // write raw values as 4-bits (max : 15) - if maxSymbolValue > (256 - 128) { - // should not happen : likely means source cannot be compressed - return 0, ErrIncompressible - } - // special case, pack weights 4 bits/weight. - sz += 1 + int(maxSymbolValue/2) - return sz, nil -} - -// estimateSize returns the estimated size in bytes of the input represented in the -// histogram supplied. -func (c cTable) estimateSize(hist []uint32) int { - nbBits := uint32(7) - for i, v := range c[:len(hist)] { - nbBits += uint32(v.nBits) * hist[i] - } - return int(nbBits >> 3) -} - -// minSize returns the minimum possible size considering the shannon limit. -func (s *Scratch) minSize(total int) int { - nbBits := float64(7) - fTotal := float64(total) - for _, v := range s.count[:s.symbolLen] { - n := float64(v) - if n > 0 { - nbBits += math.Log2(fTotal/n) * n - } - } - return int(nbBits) >> 3 -} - -func highBit32(val uint32) (n uint32) { - return uint32(bits.Len32(val) - 1) -} diff --git a/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go b/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go deleted file mode 100644 index 3954c512..00000000 --- a/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo.go +++ /dev/null @@ -1,34 +0,0 @@ -// Package cpuinfo gives runtime info about the current CPU. -// -// This is a very limited module meant for use internally -// in this project. For more versatile solution check -// https://github.com/klauspost/cpuid. -package cpuinfo - -// HasBMI1 checks whether an x86 CPU supports the BMI1 extension. -func HasBMI1() bool { - return hasBMI1 -} - -// HasBMI2 checks whether an x86 CPU supports the BMI2 extension. -func HasBMI2() bool { - return hasBMI2 -} - -// DisableBMI2 will disable BMI2, for testing purposes. -// Call returned function to restore previous state. -func DisableBMI2() func() { - old := hasBMI2 - hasBMI2 = false - return func() { - hasBMI2 = old - } -} - -// HasBMI checks whether an x86 CPU supports both BMI1 and BMI2 extensions. -func HasBMI() bool { - return HasBMI1() && HasBMI2() -} - -var hasBMI1 bool -var hasBMI2 bool diff --git a/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go b/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go deleted file mode 100644 index e802579c..00000000 --- a/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.go +++ /dev/null @@ -1,11 +0,0 @@ -//go:build amd64 && !appengine && !noasm && gc -// +build amd64,!appengine,!noasm,gc - -package cpuinfo - -// go:noescape -func x86extensions() (bmi1, bmi2 bool) - -func init() { - hasBMI1, hasBMI2 = x86extensions() -} diff --git a/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.s b/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.s deleted file mode 100644 index 4465fbe9..00000000 --- a/vendor/github.com/klauspost/compress/internal/cpuinfo/cpuinfo_amd64.s +++ /dev/null @@ -1,36 +0,0 @@ -// +build !appengine -// +build gc -// +build !noasm - -#include "textflag.h" -#include "funcdata.h" -#include "go_asm.h" - -TEXT ·x86extensions(SB), NOSPLIT, $0 - // 1. determine max EAX value - XORQ AX, AX - CPUID - - CMPQ AX, $7 - JB unsupported - - // 2. EAX = 7, ECX = 0 --- see Table 3-8 "Information Returned by CPUID Instruction" - MOVQ $7, AX - MOVQ $0, CX - CPUID - - BTQ $3, BX // bit 3 = BMI1 - SETCS AL - - BTQ $8, BX // bit 8 = BMI2 - SETCS AH - - MOVB AL, bmi1+0(FP) - MOVB AH, bmi2+1(FP) - RET - -unsupported: - XORQ AX, AX - MOVB AL, bmi1+0(FP) - MOVB AL, bmi2+1(FP) - RET diff --git a/vendor/github.com/klauspost/compress/internal/snapref/LICENSE b/vendor/github.com/klauspost/compress/internal/snapref/LICENSE deleted file mode 100644 index 6050c10f..00000000 --- a/vendor/github.com/klauspost/compress/internal/snapref/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The Snappy-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/github.com/klauspost/compress/internal/snapref/decode.go b/vendor/github.com/klauspost/compress/internal/snapref/decode.go deleted file mode 100644 index 40796a49..00000000 --- a/vendor/github.com/klauspost/compress/internal/snapref/decode.go +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright 2011 The Snappy-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 snapref - -import ( - "encoding/binary" - "errors" - "io" -) - -var ( - // ErrCorrupt reports that the input is invalid. - ErrCorrupt = errors.New("snappy: corrupt input") - // ErrTooLarge reports that the uncompressed length is too large. - ErrTooLarge = errors.New("snappy: decoded block is too large") - // ErrUnsupported reports that the input isn't supported. - ErrUnsupported = errors.New("snappy: unsupported input") - - errUnsupportedLiteralLength = errors.New("snappy: unsupported literal length") -) - -// DecodedLen returns the length of the decoded block. -func DecodedLen(src []byte) (int, error) { - v, _, err := decodedLen(src) - return v, err -} - -// decodedLen returns the length of the decoded block and the number of bytes -// that the length header occupied. -func decodedLen(src []byte) (blockLen, headerLen int, err error) { - v, n := binary.Uvarint(src) - if n <= 0 || v > 0xffffffff { - return 0, 0, ErrCorrupt - } - - const wordSize = 32 << (^uint(0) >> 32 & 1) - if wordSize == 32 && v > 0x7fffffff { - return 0, 0, ErrTooLarge - } - return int(v), n, nil -} - -const ( - decodeErrCodeCorrupt = 1 - decodeErrCodeUnsupportedLiteralLength = 2 -) - -// Decode returns the decoded form of src. The returned slice may be a sub- -// slice of dst if dst was large enough to hold the entire decoded block. -// Otherwise, a newly allocated slice will be returned. -// -// The dst and src must not overlap. It is valid to pass a nil dst. -// -// Decode handles the Snappy block format, not the Snappy stream format. -func Decode(dst, src []byte) ([]byte, error) { - dLen, s, err := decodedLen(src) - if err != nil { - return nil, err - } - if dLen <= len(dst) { - dst = dst[:dLen] - } else { - dst = make([]byte, dLen) - } - switch decode(dst, src[s:]) { - case 0: - return dst, nil - case decodeErrCodeUnsupportedLiteralLength: - return nil, errUnsupportedLiteralLength - } - return nil, ErrCorrupt -} - -// NewReader returns a new Reader that decompresses from r, using the framing -// format described at -// https://github.com/google/snappy/blob/master/framing_format.txt -func NewReader(r io.Reader) *Reader { - return &Reader{ - r: r, - decoded: make([]byte, maxBlockSize), - buf: make([]byte, maxEncodedLenOfMaxBlockSize+checksumSize), - } -} - -// Reader is an io.Reader that can read Snappy-compressed bytes. -// -// Reader handles the Snappy stream format, not the Snappy block format. -type Reader struct { - r io.Reader - err error - decoded []byte - buf []byte - // decoded[i:j] contains decoded bytes that have not yet been passed on. - i, j int - readHeader bool -} - -// Reset discards any buffered data, resets all state, and switches the Snappy -// reader to read from r. This permits reusing a Reader rather than allocating -// a new one. -func (r *Reader) Reset(reader io.Reader) { - r.r = reader - r.err = nil - r.i = 0 - r.j = 0 - r.readHeader = false -} - -func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) { - if _, r.err = io.ReadFull(r.r, p); r.err != nil { - if r.err == io.ErrUnexpectedEOF || (r.err == io.EOF && !allowEOF) { - r.err = ErrCorrupt - } - return false - } - return true -} - -func (r *Reader) fill() error { - for r.i >= r.j { - if !r.readFull(r.buf[:4], true) { - return r.err - } - chunkType := r.buf[0] - if !r.readHeader { - if chunkType != chunkTypeStreamIdentifier { - r.err = ErrCorrupt - return r.err - } - r.readHeader = true - } - chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16 - if chunkLen > len(r.buf) { - r.err = ErrUnsupported - return r.err - } - - // The chunk types are specified at - // https://github.com/google/snappy/blob/master/framing_format.txt - switch chunkType { - case chunkTypeCompressedData: - // Section 4.2. Compressed data (chunk type 0x00). - if chunkLen < checksumSize { - r.err = ErrCorrupt - return r.err - } - buf := r.buf[:chunkLen] - if !r.readFull(buf, false) { - return r.err - } - checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 - buf = buf[checksumSize:] - - n, err := DecodedLen(buf) - if err != nil { - r.err = err - return r.err - } - if n > len(r.decoded) { - r.err = ErrCorrupt - return r.err - } - if _, err := Decode(r.decoded, buf); err != nil { - r.err = err - return r.err - } - if crc(r.decoded[:n]) != checksum { - r.err = ErrCorrupt - return r.err - } - r.i, r.j = 0, n - continue - - case chunkTypeUncompressedData: - // Section 4.3. Uncompressed data (chunk type 0x01). - if chunkLen < checksumSize { - r.err = ErrCorrupt - return r.err - } - buf := r.buf[:checksumSize] - if !r.readFull(buf, false) { - return r.err - } - checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 - // Read directly into r.decoded instead of via r.buf. - n := chunkLen - checksumSize - if n > len(r.decoded) { - r.err = ErrCorrupt - return r.err - } - if !r.readFull(r.decoded[:n], false) { - return r.err - } - if crc(r.decoded[:n]) != checksum { - r.err = ErrCorrupt - return r.err - } - r.i, r.j = 0, n - continue - - case chunkTypeStreamIdentifier: - // Section 4.1. Stream identifier (chunk type 0xff). - if chunkLen != len(magicBody) { - r.err = ErrCorrupt - return r.err - } - if !r.readFull(r.buf[:len(magicBody)], false) { - return r.err - } - for i := 0; i < len(magicBody); i++ { - if r.buf[i] != magicBody[i] { - r.err = ErrCorrupt - return r.err - } - } - continue - } - - if chunkType <= 0x7f { - // Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f). - r.err = ErrUnsupported - return r.err - } - // Section 4.4 Padding (chunk type 0xfe). - // Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd). - if !r.readFull(r.buf[:chunkLen], false) { - return r.err - } - } - - return nil -} - -// Read satisfies the io.Reader interface. -func (r *Reader) Read(p []byte) (int, error) { - if r.err != nil { - return 0, r.err - } - - if err := r.fill(); err != nil { - return 0, err - } - - n := copy(p, r.decoded[r.i:r.j]) - r.i += n - return n, nil -} - -// ReadByte satisfies the io.ByteReader interface. -func (r *Reader) ReadByte() (byte, error) { - if r.err != nil { - return 0, r.err - } - - if err := r.fill(); err != nil { - return 0, err - } - - c := r.decoded[r.i] - r.i++ - return c, nil -} diff --git a/vendor/github.com/klauspost/compress/internal/snapref/decode_other.go b/vendor/github.com/klauspost/compress/internal/snapref/decode_other.go deleted file mode 100644 index 77395a6b..00000000 --- a/vendor/github.com/klauspost/compress/internal/snapref/decode_other.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2016 The Snappy-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 snapref - -// decode writes the decoding of src to dst. It assumes that the varint-encoded -// length of the decompressed bytes has already been read, and that len(dst) -// equals that length. -// -// It returns 0 on success or a decodeErrCodeXxx error code on failure. -func decode(dst, src []byte) int { - var d, s, offset, length int - for s < len(src) { - switch src[s] & 0x03 { - case tagLiteral: - x := uint32(src[s] >> 2) - switch { - case x < 60: - s++ - case x == 60: - s += 2 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - return decodeErrCodeCorrupt - } - x = uint32(src[s-1]) - case x == 61: - s += 3 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - return decodeErrCodeCorrupt - } - x = uint32(src[s-2]) | uint32(src[s-1])<<8 - case x == 62: - s += 4 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - return decodeErrCodeCorrupt - } - x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16 - case x == 63: - s += 5 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - return decodeErrCodeCorrupt - } - x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24 - } - length = int(x) + 1 - if length <= 0 { - return decodeErrCodeUnsupportedLiteralLength - } - if length > len(dst)-d || length > len(src)-s { - return decodeErrCodeCorrupt - } - copy(dst[d:], src[s:s+length]) - d += length - s += length - continue - - case tagCopy1: - s += 2 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - return decodeErrCodeCorrupt - } - length = 4 + int(src[s-2])>>2&0x7 - offset = int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1])) - - case tagCopy2: - s += 3 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - return decodeErrCodeCorrupt - } - length = 1 + int(src[s-3])>>2 - offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8) - - case tagCopy4: - s += 5 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - return decodeErrCodeCorrupt - } - length = 1 + int(src[s-5])>>2 - offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24) - } - - if offset <= 0 || d < offset || length > len(dst)-d { - return decodeErrCodeCorrupt - } - // Copy from an earlier sub-slice of dst to a later sub-slice. - // If no overlap, use the built-in copy: - if offset >= length { - copy(dst[d:d+length], dst[d-offset:]) - d += length - continue - } - - // Unlike the built-in copy function, this byte-by-byte copy always runs - // forwards, even if the slices overlap. Conceptually, this is: - // - // d += forwardCopy(dst[d:d+length], dst[d-offset:]) - // - // We align the slices into a and b and show the compiler they are the same size. - // This allows the loop to run without bounds checks. - a := dst[d : d+length] - b := dst[d-offset:] - b = b[:len(a)] - for i := range a { - a[i] = b[i] - } - d += length - } - if d != len(dst) { - return decodeErrCodeCorrupt - } - return 0 -} diff --git a/vendor/github.com/klauspost/compress/internal/snapref/encode.go b/vendor/github.com/klauspost/compress/internal/snapref/encode.go deleted file mode 100644 index 13c6040a..00000000 --- a/vendor/github.com/klauspost/compress/internal/snapref/encode.go +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright 2011 The Snappy-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 snapref - -import ( - "encoding/binary" - "errors" - "io" -) - -// Encode returns the encoded form of src. The returned slice may be a sub- -// slice of dst if dst was large enough to hold the entire encoded block. -// Otherwise, a newly allocated slice will be returned. -// -// The dst and src must not overlap. It is valid to pass a nil dst. -// -// Encode handles the Snappy block format, not the Snappy stream format. -func Encode(dst, src []byte) []byte { - if n := MaxEncodedLen(len(src)); n < 0 { - panic(ErrTooLarge) - } else if len(dst) < n { - dst = make([]byte, n) - } - - // The block starts with the varint-encoded length of the decompressed bytes. - d := binary.PutUvarint(dst, uint64(len(src))) - - for len(src) > 0 { - p := src - src = nil - if len(p) > maxBlockSize { - p, src = p[:maxBlockSize], p[maxBlockSize:] - } - if len(p) < minNonLiteralBlockSize { - d += emitLiteral(dst[d:], p) - } else { - d += encodeBlock(dst[d:], p) - } - } - return dst[:d] -} - -// inputMargin is the minimum number of extra input bytes to keep, inside -// encodeBlock's inner loop. On some architectures, this margin lets us -// implement a fast path for emitLiteral, where the copy of short (<= 16 byte) -// literals can be implemented as a single load to and store from a 16-byte -// register. That literal's actual length can be as short as 1 byte, so this -// can copy up to 15 bytes too much, but that's OK as subsequent iterations of -// the encoding loop will fix up the copy overrun, and this inputMargin ensures -// that we don't overrun the dst and src buffers. -const inputMargin = 16 - 1 - -// minNonLiteralBlockSize is the minimum size of the input to encodeBlock that -// could be encoded with a copy tag. This is the minimum with respect to the -// algorithm used by encodeBlock, not a minimum enforced by the file format. -// -// The encoded output must start with at least a 1 byte literal, as there are -// no previous bytes to copy. A minimal (1 byte) copy after that, generated -// from an emitCopy call in encodeBlock's main loop, would require at least -// another inputMargin bytes, for the reason above: we want any emitLiteral -// calls inside encodeBlock's main loop to use the fast path if possible, which -// requires being able to overrun by inputMargin bytes. Thus, -// minNonLiteralBlockSize equals 1 + 1 + inputMargin. -// -// The C++ code doesn't use this exact threshold, but it could, as discussed at -// https://groups.google.com/d/topic/snappy-compression/oGbhsdIJSJ8/discussion -// The difference between Go (2+inputMargin) and C++ (inputMargin) is purely an -// optimization. It should not affect the encoded form. This is tested by -// TestSameEncodingAsCppShortCopies. -const minNonLiteralBlockSize = 1 + 1 + inputMargin - -// MaxEncodedLen returns the maximum length of a snappy block, given its -// uncompressed length. -// -// It will return a negative value if srcLen is too large to encode. -func MaxEncodedLen(srcLen int) int { - n := uint64(srcLen) - if n > 0xffffffff { - return -1 - } - // Compressed data can be defined as: - // compressed := item* literal* - // item := literal* copy - // - // The trailing literal sequence has a space blowup of at most 62/60 - // since a literal of length 60 needs one tag byte + one extra byte - // for length information. - // - // Item blowup is trickier to measure. Suppose the "copy" op copies - // 4 bytes of data. Because of a special check in the encoding code, - // we produce a 4-byte copy only if the offset is < 65536. Therefore - // the copy op takes 3 bytes to encode, and this type of item leads - // to at most the 62/60 blowup for representing literals. - // - // Suppose the "copy" op copies 5 bytes of data. If the offset is big - // enough, it will take 5 bytes to encode the copy op. Therefore the - // worst case here is a one-byte literal followed by a five-byte copy. - // That is, 6 bytes of input turn into 7 bytes of "compressed" data. - // - // This last factor dominates the blowup, so the final estimate is: - n = 32 + n + n/6 - if n > 0xffffffff { - return -1 - } - return int(n) -} - -var errClosed = errors.New("snappy: Writer is closed") - -// NewWriter returns a new Writer that compresses to w. -// -// The Writer returned does not buffer writes. There is no need to Flush or -// Close such a Writer. -// -// Deprecated: the Writer returned is not suitable for many small writes, only -// for few large writes. Use NewBufferedWriter instead, which is efficient -// regardless of the frequency and shape of the writes, and remember to Close -// that Writer when done. -func NewWriter(w io.Writer) *Writer { - return &Writer{ - w: w, - obuf: make([]byte, obufLen), - } -} - -// NewBufferedWriter returns a new Writer that compresses to w, using the -// framing format described at -// https://github.com/google/snappy/blob/master/framing_format.txt -// -// The Writer returned buffers writes. Users must call Close to guarantee all -// data has been forwarded to the underlying io.Writer. They may also call -// Flush zero or more times before calling Close. -func NewBufferedWriter(w io.Writer) *Writer { - return &Writer{ - w: w, - ibuf: make([]byte, 0, maxBlockSize), - obuf: make([]byte, obufLen), - } -} - -// Writer is an io.Writer that can write Snappy-compressed bytes. -// -// Writer handles the Snappy stream format, not the Snappy block format. -type Writer struct { - w io.Writer - err error - - // ibuf is a buffer for the incoming (uncompressed) bytes. - // - // Its use is optional. For backwards compatibility, Writers created by the - // NewWriter function have ibuf == nil, do not buffer incoming bytes, and - // therefore do not need to be Flush'ed or Close'd. - ibuf []byte - - // obuf is a buffer for the outgoing (compressed) bytes. - obuf []byte - - // wroteStreamHeader is whether we have written the stream header. - wroteStreamHeader bool -} - -// Reset discards the writer's state and switches the Snappy writer to write to -// w. This permits reusing a Writer rather than allocating a new one. -func (w *Writer) Reset(writer io.Writer) { - w.w = writer - w.err = nil - if w.ibuf != nil { - w.ibuf = w.ibuf[:0] - } - w.wroteStreamHeader = false -} - -// Write satisfies the io.Writer interface. -func (w *Writer) Write(p []byte) (nRet int, errRet error) { - if w.ibuf == nil { - // Do not buffer incoming bytes. This does not perform or compress well - // if the caller of Writer.Write writes many small slices. This - // behavior is therefore deprecated, but still supported for backwards - // compatibility with code that doesn't explicitly Flush or Close. - return w.write(p) - } - - // The remainder of this method is based on bufio.Writer.Write from the - // standard library. - - for len(p) > (cap(w.ibuf)-len(w.ibuf)) && w.err == nil { - var n int - if len(w.ibuf) == 0 { - // Large write, empty buffer. - // Write directly from p to avoid copy. - n, _ = w.write(p) - } else { - n = copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p) - w.ibuf = w.ibuf[:len(w.ibuf)+n] - w.Flush() - } - nRet += n - p = p[n:] - } - if w.err != nil { - return nRet, w.err - } - n := copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p) - w.ibuf = w.ibuf[:len(w.ibuf)+n] - nRet += n - return nRet, nil -} - -func (w *Writer) write(p []byte) (nRet int, errRet error) { - if w.err != nil { - return 0, w.err - } - for len(p) > 0 { - obufStart := len(magicChunk) - if !w.wroteStreamHeader { - w.wroteStreamHeader = true - copy(w.obuf, magicChunk) - obufStart = 0 - } - - var uncompressed []byte - if len(p) > maxBlockSize { - uncompressed, p = p[:maxBlockSize], p[maxBlockSize:] - } else { - uncompressed, p = p, nil - } - checksum := crc(uncompressed) - - // Compress the buffer, discarding the result if the improvement - // isn't at least 12.5%. - compressed := Encode(w.obuf[obufHeaderLen:], uncompressed) - chunkType := uint8(chunkTypeCompressedData) - chunkLen := 4 + len(compressed) - obufEnd := obufHeaderLen + len(compressed) - if len(compressed) >= len(uncompressed)-len(uncompressed)/8 { - chunkType = chunkTypeUncompressedData - chunkLen = 4 + len(uncompressed) - obufEnd = obufHeaderLen - } - - // Fill in the per-chunk header that comes before the body. - w.obuf[len(magicChunk)+0] = chunkType - w.obuf[len(magicChunk)+1] = uint8(chunkLen >> 0) - w.obuf[len(magicChunk)+2] = uint8(chunkLen >> 8) - w.obuf[len(magicChunk)+3] = uint8(chunkLen >> 16) - w.obuf[len(magicChunk)+4] = uint8(checksum >> 0) - w.obuf[len(magicChunk)+5] = uint8(checksum >> 8) - w.obuf[len(magicChunk)+6] = uint8(checksum >> 16) - w.obuf[len(magicChunk)+7] = uint8(checksum >> 24) - - if _, err := w.w.Write(w.obuf[obufStart:obufEnd]); err != nil { - w.err = err - return nRet, err - } - if chunkType == chunkTypeUncompressedData { - if _, err := w.w.Write(uncompressed); err != nil { - w.err = err - return nRet, err - } - } - nRet += len(uncompressed) - } - return nRet, nil -} - -// Flush flushes the Writer to its underlying io.Writer. -func (w *Writer) Flush() error { - if w.err != nil { - return w.err - } - if len(w.ibuf) == 0 { - return nil - } - w.write(w.ibuf) - w.ibuf = w.ibuf[:0] - return w.err -} - -// Close calls Flush and then closes the Writer. -func (w *Writer) Close() error { - w.Flush() - ret := w.err - if w.err == nil { - w.err = errClosed - } - return ret -} diff --git a/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go b/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go deleted file mode 100644 index 2aa6a95a..00000000 --- a/vendor/github.com/klauspost/compress/internal/snapref/encode_other.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2016 The Snappy-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 snapref - -func load32(b []byte, i int) uint32 { - b = b[i : i+4 : len(b)] // Help the compiler eliminate bounds checks on the next line. - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 -} - -func load64(b []byte, i int) uint64 { - b = b[i : i+8 : len(b)] // Help the compiler eliminate bounds checks on the next line. - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 -} - -// emitLiteral writes a literal chunk and returns the number of bytes written. -// -// It assumes that: -// -// dst is long enough to hold the encoded bytes -// 1 <= len(lit) && len(lit) <= 65536 -func emitLiteral(dst, lit []byte) int { - i, n := 0, uint(len(lit)-1) - switch { - case n < 60: - dst[0] = uint8(n)<<2 | tagLiteral - i = 1 - case n < 1<<8: - dst[0] = 60<<2 | tagLiteral - dst[1] = uint8(n) - i = 2 - default: - dst[0] = 61<<2 | tagLiteral - dst[1] = uint8(n) - dst[2] = uint8(n >> 8) - i = 3 - } - return i + copy(dst[i:], lit) -} - -// emitCopy writes a copy chunk and returns the number of bytes written. -// -// It assumes that: -// -// dst is long enough to hold the encoded bytes -// 1 <= offset && offset <= 65535 -// 4 <= length && length <= 65535 -func emitCopy(dst []byte, offset, length int) int { - i := 0 - // The maximum length for a single tagCopy1 or tagCopy2 op is 64 bytes. The - // threshold for this loop is a little higher (at 68 = 64 + 4), and the - // length emitted down below is is a little lower (at 60 = 64 - 4), because - // it's shorter to encode a length 67 copy as a length 60 tagCopy2 followed - // by a length 7 tagCopy1 (which encodes as 3+2 bytes) than to encode it as - // a length 64 tagCopy2 followed by a length 3 tagCopy2 (which encodes as - // 3+3 bytes). The magic 4 in the 64±4 is because the minimum length for a - // tagCopy1 op is 4 bytes, which is why a length 3 copy has to be an - // encodes-as-3-bytes tagCopy2 instead of an encodes-as-2-bytes tagCopy1. - for length >= 68 { - // Emit a length 64 copy, encoded as 3 bytes. - dst[i+0] = 63<<2 | tagCopy2 - dst[i+1] = uint8(offset) - dst[i+2] = uint8(offset >> 8) - i += 3 - length -= 64 - } - if length > 64 { - // Emit a length 60 copy, encoded as 3 bytes. - dst[i+0] = 59<<2 | tagCopy2 - dst[i+1] = uint8(offset) - dst[i+2] = uint8(offset >> 8) - i += 3 - length -= 60 - } - if length >= 12 || offset >= 2048 { - // Emit the remaining copy, encoded as 3 bytes. - dst[i+0] = uint8(length-1)<<2 | tagCopy2 - dst[i+1] = uint8(offset) - dst[i+2] = uint8(offset >> 8) - return i + 3 - } - // Emit the remaining copy, encoded as 2 bytes. - dst[i+0] = uint8(offset>>8)<<5 | uint8(length-4)<<2 | tagCopy1 - dst[i+1] = uint8(offset) - return i + 2 -} - -func hash(u, shift uint32) uint32 { - return (u * 0x1e35a7bd) >> shift -} - -// EncodeBlockInto exposes encodeBlock but checks dst size. -func EncodeBlockInto(dst, src []byte) (d int) { - if MaxEncodedLen(len(src)) > len(dst) { - return 0 - } - - // encodeBlock breaks on too big blocks, so split. - for len(src) > 0 { - p := src - src = nil - if len(p) > maxBlockSize { - p, src = p[:maxBlockSize], p[maxBlockSize:] - } - if len(p) < minNonLiteralBlockSize { - d += emitLiteral(dst[d:], p) - } else { - d += encodeBlock(dst[d:], p) - } - } - return d -} - -// encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It -// assumes that the varint-encoded length of the decompressed bytes has already -// been written. -// -// It also assumes that: -// -// len(dst) >= MaxEncodedLen(len(src)) && -// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize -func encodeBlock(dst, src []byte) (d int) { - // Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive. - // The table element type is uint16, as s < sLimit and sLimit < len(src) - // and len(src) <= maxBlockSize and maxBlockSize == 65536. - const ( - maxTableSize = 1 << 14 - // tableMask is redundant, but helps the compiler eliminate bounds - // checks. - tableMask = maxTableSize - 1 - ) - shift := uint32(32 - 8) - for tableSize := 1 << 8; tableSize < maxTableSize && tableSize < len(src); tableSize *= 2 { - shift-- - } - // In Go, all array elements are zero-initialized, so there is no advantage - // to a smaller tableSize per se. However, it matches the C++ algorithm, - // and in the asm versions of this code, we can get away with zeroing only - // the first tableSize elements. - var table [maxTableSize]uint16 - - // sLimit is when to stop looking for offset/length copies. The inputMargin - // lets us use a fast path for emitLiteral in the main loop, while we are - // looking for copies. - sLimit := len(src) - inputMargin - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := 0 - - // The encoded form must start with a literal, as there are no previous - // bytes to copy, so we start looking for hash matches at s == 1. - s := 1 - nextHash := hash(load32(src, s), shift) - - for { - // Copied from the C++ snappy implementation: - // - // Heuristic match skipping: If 32 bytes are scanned with no matches - // found, start looking only at every other byte. If 32 more bytes are - // scanned (or skipped), look at every third byte, etc.. When a match - // is found, immediately go back to looking at every byte. This is a - // small loss (~5% performance, ~0.1% density) for compressible data - // due to more bookkeeping, but for non-compressible data (such as - // JPEG) it's a huge win since the compressor quickly "realizes" the - // data is incompressible and doesn't bother looking for matches - // everywhere. - // - // The "skip" variable keeps track of how many bytes there are since - // the last match; dividing it by 32 (ie. right-shifting by five) gives - // the number of bytes to move ahead for each iteration. - skip := 32 - - nextS := s - candidate := 0 - for { - s = nextS - bytesBetweenHashLookups := skip >> 5 - nextS = s + bytesBetweenHashLookups - skip += bytesBetweenHashLookups - if nextS > sLimit { - goto emitRemainder - } - candidate = int(table[nextHash&tableMask]) - table[nextHash&tableMask] = uint16(s) - nextHash = hash(load32(src, nextS), shift) - if load32(src, s) == load32(src, candidate) { - break - } - } - - // A 4-byte match has been found. We'll later see if more than 4 bytes - // match. But, prior to the match, src[nextEmit:s] are unmatched. Emit - // them as literal bytes. - d += emitLiteral(dst[d:], src[nextEmit:s]) - - // Call emitCopy, and then see if another emitCopy could be our next - // move. Repeat until we find no match for the input immediately after - // what was consumed by the last emitCopy call. - // - // If we exit this loop normally then we need to call emitLiteral next, - // though we don't yet know how big the literal will be. We handle that - // by proceeding to the next iteration of the main loop. We also can - // exit this loop via goto if we get close to exhausting the input. - for { - // Invariant: we have a 4-byte match at s, and no need to emit any - // literal bytes prior to s. - base := s - - // Extend the 4-byte match as long as possible. - // - // This is an inlined version of: - // s = extendMatch(src, candidate+4, s+4) - s += 4 - for i := candidate + 4; s < len(src) && src[i] == src[s]; i, s = i+1, s+1 { - } - - d += emitCopy(dst[d:], base-candidate, s-base) - nextEmit = s - if s >= sLimit { - goto emitRemainder - } - - // We could immediately start working at s now, but to improve - // compression we first update the hash table at s-1 and at s. If - // another emitCopy is not our next move, also calculate nextHash - // at s+1. At least on GOARCH=amd64, these three hash calculations - // are faster as one load64 call (with some shifts) instead of - // three load32 calls. - x := load64(src, s-1) - prevHash := hash(uint32(x>>0), shift) - table[prevHash&tableMask] = uint16(s - 1) - currHash := hash(uint32(x>>8), shift) - candidate = int(table[currHash&tableMask]) - table[currHash&tableMask] = uint16(s) - if uint32(x>>8) != load32(src, candidate) { - nextHash = hash(uint32(x>>16), shift) - s++ - break - } - } - } - -emitRemainder: - if nextEmit < len(src) { - d += emitLiteral(dst[d:], src[nextEmit:]) - } - return d -} diff --git a/vendor/github.com/klauspost/compress/internal/snapref/snappy.go b/vendor/github.com/klauspost/compress/internal/snapref/snappy.go deleted file mode 100644 index 34d01f4a..00000000 --- a/vendor/github.com/klauspost/compress/internal/snapref/snappy.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2011 The Snappy-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 snapref implements the Snappy compression format. It aims for very -// high speeds and reasonable compression. -// -// There are actually two Snappy formats: block and stream. They are related, -// but different: trying to decompress block-compressed data as a Snappy stream -// will fail, and vice versa. The block format is the Decode and Encode -// functions and the stream format is the Reader and Writer types. -// -// The block format, the more common case, is used when the complete size (the -// number of bytes) of the original data is known upfront, at the time -// compression starts. The stream format, also known as the framing format, is -// for when that isn't always true. -// -// The canonical, C++ implementation is at https://github.com/google/snappy and -// it only implements the block format. -package snapref - -import ( - "hash/crc32" -) - -/* -Each encoded block begins with the varint-encoded length of the decoded data, -followed by a sequence of chunks. Chunks begin and end on byte boundaries. The -first byte of each chunk is broken into its 2 least and 6 most significant bits -called l and m: l ranges in [0, 4) and m ranges in [0, 64). l is the chunk tag. -Zero means a literal tag. All other values mean a copy tag. - -For literal tags: - - If m < 60, the next 1 + m bytes are literal bytes. - - Otherwise, let n be the little-endian unsigned integer denoted by the next - m - 59 bytes. The next 1 + n bytes after that are literal bytes. - -For copy tags, length bytes are copied from offset bytes ago, in the style of -Lempel-Ziv compression algorithms. In particular: - - For l == 1, the offset ranges in [0, 1<<11) and the length in [4, 12). - The length is 4 + the low 3 bits of m. The high 3 bits of m form bits 8-10 - of the offset. The next byte is bits 0-7 of the offset. - - For l == 2, the offset ranges in [0, 1<<16) and the length in [1, 65). - The length is 1 + m. The offset is the little-endian unsigned integer - denoted by the next 2 bytes. - - For l == 3, this tag is a legacy format that is no longer issued by most - encoders. Nonetheless, the offset ranges in [0, 1<<32) and the length in - [1, 65). The length is 1 + m. The offset is the little-endian unsigned - integer denoted by the next 4 bytes. -*/ -const ( - tagLiteral = 0x00 - tagCopy1 = 0x01 - tagCopy2 = 0x02 - tagCopy4 = 0x03 -) - -const ( - checksumSize = 4 - chunkHeaderSize = 4 - magicChunk = "\xff\x06\x00\x00" + magicBody - magicBody = "sNaPpY" - - // maxBlockSize is the maximum size of the input to encodeBlock. It is not - // part of the wire format per se, but some parts of the encoder assume - // that an offset fits into a uint16. - // - // Also, for the framing format (Writer type instead of Encode function), - // https://github.com/google/snappy/blob/master/framing_format.txt says - // that "the uncompressed data in a chunk must be no longer than 65536 - // bytes". - maxBlockSize = 65536 - - // maxEncodedLenOfMaxBlockSize equals MaxEncodedLen(maxBlockSize), but is - // hard coded to be a const instead of a variable, so that obufLen can also - // be a const. Their equivalence is confirmed by - // TestMaxEncodedLenOfMaxBlockSize. - maxEncodedLenOfMaxBlockSize = 76490 - - obufHeaderLen = len(magicChunk) + checksumSize + chunkHeaderSize - obufLen = obufHeaderLen + maxEncodedLenOfMaxBlockSize -) - -const ( - chunkTypeCompressedData = 0x00 - chunkTypeUncompressedData = 0x01 - chunkTypePadding = 0xfe - chunkTypeStreamIdentifier = 0xff -) - -var crcTable = crc32.MakeTable(crc32.Castagnoli) - -// crc implements the checksum specified in section 3 of -// https://github.com/google/snappy/blob/master/framing_format.txt -func crc(b []byte) uint32 { - c := crc32.Update(0, crcTable, b) - return uint32(c>>15|c<<17) + 0xa282ead8 -} diff --git a/vendor/github.com/klauspost/compress/s2sx.mod b/vendor/github.com/klauspost/compress/s2sx.mod deleted file mode 100644 index 2263853f..00000000 --- a/vendor/github.com/klauspost/compress/s2sx.mod +++ /dev/null @@ -1,4 +0,0 @@ -module github.com/klauspost/compress - -go 1.16 - diff --git a/vendor/github.com/klauspost/compress/s2sx.sum b/vendor/github.com/klauspost/compress/s2sx.sum deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/github.com/klauspost/compress/zstd/README.md b/vendor/github.com/klauspost/compress/zstd/README.md deleted file mode 100644 index bdd49c8b..00000000 --- a/vendor/github.com/klauspost/compress/zstd/README.md +++ /dev/null @@ -1,441 +0,0 @@ -# zstd - -[Zstandard](https://facebook.github.io/zstd/) is a real-time compression algorithm, providing high compression ratios. -It offers a very wide range of compression / speed trade-off, while being backed by a very fast decoder. -A high performance compression algorithm is implemented. For now focused on speed. - -This package provides [compression](#Compressor) to and [decompression](#Decompressor) of Zstandard content. - -This package is pure Go and without use of "unsafe". - -The `zstd` package is provided as open source software using a Go standard license. - -Currently the package is heavily optimized for 64 bit processors and will be significantly slower on 32 bit processors. - -For seekable zstd streams, see [this excellent package](https://github.com/SaveTheRbtz/zstd-seekable-format-go). - -## Installation - -Install using `go get -u github.com/klauspost/compress`. The package is located in `github.com/klauspost/compress/zstd`. - -[![Go Reference](https://pkg.go.dev/badge/github.com/klauspost/compress/zstd.svg)](https://pkg.go.dev/github.com/klauspost/compress/zstd) - -## Compressor - -### Status: - -STABLE - there may always be subtle bugs, a wide variety of content has been tested and the library is actively -used by several projects. This library is being [fuzz-tested](https://github.com/klauspost/compress-fuzz) for all updates. - -There may still be specific combinations of data types/size/settings that could lead to edge cases, -so as always, testing is recommended. - -For now, a high speed (fastest) and medium-fast (default) compressor has been implemented. - -* The "Fastest" compression ratio is roughly equivalent to zstd level 1. -* The "Default" compression ratio is roughly equivalent to zstd level 3 (default). -* The "Better" compression ratio is roughly equivalent to zstd level 7. -* The "Best" compression ratio is roughly equivalent to zstd level 11. - -In terms of speed, it is typically 2x as fast as the stdlib deflate/gzip in its fastest mode. -The compression ratio compared to stdlib is around level 3, but usually 3x as fast. - - -### Usage - -An Encoder can be used for either compressing a stream via the -`io.WriteCloser` interface supported by the Encoder or as multiple independent -tasks via the `EncodeAll` function. -Smaller encodes are encouraged to use the EncodeAll function. -Use `NewWriter` to create a new instance that can be used for both. - -To create a writer with default options, do like this: - -```Go -// Compress input to output. -func Compress(in io.Reader, out io.Writer) error { - enc, err := zstd.NewWriter(out) - if err != nil { - return err - } - _, err = io.Copy(enc, in) - if err != nil { - enc.Close() - return err - } - return enc.Close() -} -``` - -Now you can encode by writing data to `enc`. The output will be finished writing when `Close()` is called. -Even if your encode fails, you should still call `Close()` to release any resources that may be held up. - -The above is fine for big encodes. However, whenever possible try to *reuse* the writer. - -To reuse the encoder, you can use the `Reset(io.Writer)` function to change to another output. -This will allow the encoder to reuse all resources and avoid wasteful allocations. - -Currently stream encoding has 'light' concurrency, meaning up to 2 goroutines can be working on part -of a stream. This is independent of the `WithEncoderConcurrency(n)`, but that is likely to change -in the future. So if you want to limit concurrency for future updates, specify the concurrency -you would like. - -If you would like stream encoding to be done without spawning async goroutines, use `WithEncoderConcurrency(1)` -which will compress input as each block is completed, blocking on writes until each has completed. - -You can specify your desired compression level using `WithEncoderLevel()` option. Currently only pre-defined -compression settings can be specified. - -#### Future Compatibility Guarantees - -This will be an evolving project. When using this package it is important to note that both the compression efficiency and speed may change. - -The goal will be to keep the default efficiency at the default zstd (level 3). -However the encoding should never be assumed to remain the same, -and you should not use hashes of compressed output for similarity checks. - -The Encoder can be assumed to produce the same output from the exact same code version. -However, the may be modes in the future that break this, -although they will not be enabled without an explicit option. - -This encoder is not designed to (and will probably never) output the exact same bitstream as the reference encoder. - -Also note, that the cgo decompressor currently does not [report all errors on invalid input](https://github.com/DataDog/zstd/issues/59), -[omits error checks](https://github.com/DataDog/zstd/issues/61), [ignores checksums](https://github.com/DataDog/zstd/issues/43) -and seems to ignore concatenated streams, even though [it is part of the spec](https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frames). - -#### Blocks - -For compressing small blocks, the returned encoder has a function called `EncodeAll(src, dst []byte) []byte`. - -`EncodeAll` will encode all input in src and append it to dst. -This function can be called concurrently. -Each call will only run on a same goroutine as the caller. - -Encoded blocks can be concatenated and the result will be the combined input stream. -Data compressed with EncodeAll can be decoded with the Decoder, using either a stream or `DecodeAll`. - -Especially when encoding blocks you should take special care to reuse the encoder. -This will effectively make it run without allocations after a warmup period. -To make it run completely without allocations, supply a destination buffer with space for all content. - -```Go -import "github.com/klauspost/compress/zstd" - -// Create a writer that caches compressors. -// For this operation type we supply a nil Reader. -var encoder, _ = zstd.NewWriter(nil) - -// Compress a buffer. -// If you have a destination buffer, the allocation in the call can also be eliminated. -func Compress(src []byte) []byte { - return encoder.EncodeAll(src, make([]byte, 0, len(src))) -} -``` - -You can control the maximum number of concurrent encodes using the `WithEncoderConcurrency(n)` -option when creating the writer. - -Using the Encoder for both a stream and individual blocks concurrently is safe. - -### Performance - -I have collected some speed examples to compare speed and compression against other compressors. - -* `file` is the input file. -* `out` is the compressor used. `zskp` is this package. `zstd` is the Datadog cgo library. `gzstd/gzkp` is gzip standard and this library. -* `level` is the compression level used. For `zskp` level 1 is "fastest", level 2 is "default"; 3 is "better", 4 is "best". -* `insize`/`outsize` is the input/output size. -* `millis` is the number of milliseconds used for compression. -* `mb/s` is megabytes (2^20 bytes) per second. - -``` -Silesia Corpus: -http://sun.aei.polsl.pl/~sdeor/corpus/silesia.zip - -This package: -file out level insize outsize millis mb/s -silesia.tar zskp 1 211947520 73821326 634 318.47 -silesia.tar zskp 2 211947520 67655404 1508 133.96 -silesia.tar zskp 3 211947520 64746933 3000 67.37 -silesia.tar zskp 4 211947520 60073508 16926 11.94 - -cgo zstd: -silesia.tar zstd 1 211947520 73605392 543 371.56 -silesia.tar zstd 3 211947520 66793289 864 233.68 -silesia.tar zstd 6 211947520 62916450 1913 105.66 -silesia.tar zstd 9 211947520 60212393 5063 39.92 - -gzip, stdlib/this package: -silesia.tar gzstd 1 211947520 80007735 1498 134.87 -silesia.tar gzkp 1 211947520 80088272 1009 200.31 - -GOB stream of binary data. Highly compressible. -https://files.klauspost.com/compress/gob-stream.7z - -file out level insize outsize millis mb/s -gob-stream zskp 1 1911399616 233948096 3230 564.34 -gob-stream zskp 2 1911399616 203997694 4997 364.73 -gob-stream zskp 3 1911399616 173526523 13435 135.68 -gob-stream zskp 4 1911399616 162195235 47559 38.33 - -gob-stream zstd 1 1911399616 249810424 2637 691.26 -gob-stream zstd 3 1911399616 208192146 3490 522.31 -gob-stream zstd 6 1911399616 193632038 6687 272.56 -gob-stream zstd 9 1911399616 177620386 16175 112.70 - -gob-stream gzstd 1 1911399616 357382013 9046 201.49 -gob-stream gzkp 1 1911399616 359136669 4885 373.08 - -The test data for the Large Text Compression Benchmark is the first -10^9 bytes of the English Wikipedia dump on Mar. 3, 2006. -http://mattmahoney.net/dc/textdata.html - -file out level insize outsize millis mb/s -enwik9 zskp 1 1000000000 343833605 3687 258.64 -enwik9 zskp 2 1000000000 317001237 7672 124.29 -enwik9 zskp 3 1000000000 291915823 15923 59.89 -enwik9 zskp 4 1000000000 261710291 77697 12.27 - -enwik9 zstd 1 1000000000 358072021 3110 306.65 -enwik9 zstd 3 1000000000 313734672 4784 199.35 -enwik9 zstd 6 1000000000 295138875 10290 92.68 -enwik9 zstd 9 1000000000 278348700 28549 33.40 - -enwik9 gzstd 1 1000000000 382578136 8608 110.78 -enwik9 gzkp 1 1000000000 382781160 5628 169.45 - -Highly compressible JSON file. -https://files.klauspost.com/compress/github-june-2days-2019.json.zst - -file out level insize outsize millis mb/s -github-june-2days-2019.json zskp 1 6273951764 697439532 9789 611.17 -github-june-2days-2019.json zskp 2 6273951764 610876538 18553 322.49 -github-june-2days-2019.json zskp 3 6273951764 517662858 44186 135.41 -github-june-2days-2019.json zskp 4 6273951764 464617114 165373 36.18 - -github-june-2days-2019.json zstd 1 6273951764 766284037 8450 708.00 -github-june-2days-2019.json zstd 3 6273951764 661889476 10927 547.57 -github-june-2days-2019.json zstd 6 6273951764 642756859 22996 260.18 -github-june-2days-2019.json zstd 9 6273951764 601974523 52413 114.16 - -github-june-2days-2019.json gzstd 1 6273951764 1164397768 26793 223.32 -github-june-2days-2019.json gzkp 1 6273951764 1120631856 17693 338.16 - -VM Image, Linux mint with a few installed applications: -https://files.klauspost.com/compress/rawstudio-mint14.7z - -file out level insize outsize millis mb/s -rawstudio-mint14.tar zskp 1 8558382592 3718400221 18206 448.29 -rawstudio-mint14.tar zskp 2 8558382592 3326118337 37074 220.15 -rawstudio-mint14.tar zskp 3 8558382592 3163842361 87306 93.49 -rawstudio-mint14.tar zskp 4 8558382592 2970480650 783862 10.41 - -rawstudio-mint14.tar zstd 1 8558382592 3609250104 17136 476.27 -rawstudio-mint14.tar zstd 3 8558382592 3341679997 29262 278.92 -rawstudio-mint14.tar zstd 6 8558382592 3235846406 77904 104.77 -rawstudio-mint14.tar zstd 9 8558382592 3160778861 140946 57.91 - -rawstudio-mint14.tar gzstd 1 8558382592 3926234992 51345 158.96 -rawstudio-mint14.tar gzkp 1 8558382592 3960117298 36722 222.26 - -CSV data: -https://files.klauspost.com/compress/nyc-taxi-data-10M.csv.zst - -file out level insize outsize millis mb/s -nyc-taxi-data-10M.csv zskp 1 3325605752 641319332 9462 335.17 -nyc-taxi-data-10M.csv zskp 2 3325605752 588976126 17570 180.50 -nyc-taxi-data-10M.csv zskp 3 3325605752 529329260 32432 97.79 -nyc-taxi-data-10M.csv zskp 4 3325605752 474949772 138025 22.98 - -nyc-taxi-data-10M.csv zstd 1 3325605752 687399637 8233 385.18 -nyc-taxi-data-10M.csv zstd 3 3325605752 598514411 10065 315.07 -nyc-taxi-data-10M.csv zstd 6 3325605752 570522953 20038 158.27 -nyc-taxi-data-10M.csv zstd 9 3325605752 517554797 64565 49.12 - -nyc-taxi-data-10M.csv gzstd 1 3325605752 928654908 21270 149.11 -nyc-taxi-data-10M.csv gzkp 1 3325605752 922273214 13929 227.68 -``` - -## Decompressor - -Staus: STABLE - there may still be subtle bugs, but a wide variety of content has been tested. - -This library is being continuously [fuzz-tested](https://github.com/klauspost/compress-fuzz), -kindly supplied by [fuzzit.dev](https://fuzzit.dev/). -The main purpose of the fuzz testing is to ensure that it is not possible to crash the decoder, -or run it past its limits with ANY input provided. - -### Usage - -The package has been designed for two main usages, big streams of data and smaller in-memory buffers. -There are two main usages of the package for these. Both of them are accessed by creating a `Decoder`. - -For streaming use a simple setup could look like this: - -```Go -import "github.com/klauspost/compress/zstd" - -func Decompress(in io.Reader, out io.Writer) error { - d, err := zstd.NewReader(in) - if err != nil { - return err - } - defer d.Close() - - // Copy content... - _, err = io.Copy(out, d) - return err -} -``` - -It is important to use the "Close" function when you no longer need the Reader to stop running goroutines, -when running with default settings. -Goroutines will exit once an error has been returned, including `io.EOF` at the end of a stream. - -Streams are decoded concurrently in 4 asynchronous stages to give the best possible throughput. -However, if you prefer synchronous decompression, use `WithDecoderConcurrency(1)` which will decompress data -as it is being requested only. - -For decoding buffers, it could look something like this: - -```Go -import "github.com/klauspost/compress/zstd" - -// Create a reader that caches decompressors. -// For this operation type we supply a nil Reader. -var decoder, _ = zstd.NewReader(nil, zstd.WithDecoderConcurrency(0)) - -// Decompress a buffer. We don't supply a destination buffer, -// so it will be allocated by the decoder. -func Decompress(src []byte) ([]byte, error) { - return decoder.DecodeAll(src, nil) -} -``` - -Both of these cases should provide the functionality needed. -The decoder can be used for *concurrent* decompression of multiple buffers. -By default 4 decompressors will be created. - -It will only allow a certain number of concurrent operations to run. -To tweak that yourself use the `WithDecoderConcurrency(n)` option when creating the decoder. -It is possible to use `WithDecoderConcurrency(0)` to create GOMAXPROCS decoders. - -### Dictionaries - -Data compressed with [dictionaries](https://github.com/facebook/zstd#the-case-for-small-data-compression) can be decompressed. - -Dictionaries are added individually to Decoders. -Dictionaries are generated by the `zstd --train` command and contains an initial state for the decoder. -To add a dictionary use the `WithDecoderDicts(dicts ...[]byte)` option with the dictionary data. -Several dictionaries can be added at once. - -The dictionary will be used automatically for the data that specifies them. -A re-used Decoder will still contain the dictionaries registered. - -When registering multiple dictionaries with the same ID, the last one will be used. - -It is possible to use dictionaries when compressing data. - -To enable a dictionary use `WithEncoderDict(dict []byte)`. Here only one dictionary will be used -and it will likely be used even if it doesn't improve compression. - -The used dictionary must be used to decompress the content. - -For any real gains, the dictionary should be built with similar data. -If an unsuitable dictionary is used the output may be slightly larger than using no dictionary. -Use the [zstd commandline tool](https://github.com/facebook/zstd/releases) to build a dictionary from sample data. -For information see [zstd dictionary information](https://github.com/facebook/zstd#the-case-for-small-data-compression). - -For now there is a fixed startup performance penalty for compressing content with dictionaries. -This will likely be improved over time. Just be aware to test performance when implementing. - -### Allocation-less operation - -The decoder has been designed to operate without allocations after a warmup. - -This means that you should *store* the decoder for best performance. -To re-use a stream decoder, use the `Reset(r io.Reader) error` to switch to another stream. -A decoder can safely be re-used even if the previous stream failed. - -To release the resources, you must call the `Close()` function on a decoder. -After this it can *no longer be reused*, but all running goroutines will be stopped. -So you *must* use this if you will no longer need the Reader. - -For decompressing smaller buffers a single decoder can be used. -When decoding buffers, you can supply a destination slice with length 0 and your expected capacity. -In this case no unneeded allocations should be made. - -### Concurrency - -The buffer decoder does everything on the same goroutine and does nothing concurrently. -It can however decode several buffers concurrently. Use `WithDecoderConcurrency(n)` to limit that. - -The stream decoder will create goroutines that: - -1) Reads input and splits the input into blocks. -2) Decompression of literals. -3) Decompression of sequences. -4) Reconstruction of output stream. - -So effectively this also means the decoder will "read ahead" and prepare data to always be available for output. - -The concurrency level will, for streams, determine how many blocks ahead the compression will start. - -Since "blocks" are quite dependent on the output of the previous block stream decoding will only have limited concurrency. - -In practice this means that concurrency is often limited to utilizing about 3 cores effectively. - -### Benchmarks - -The first two are streaming decodes and the last are smaller inputs. - -Running on AMD Ryzen 9 3950X 16-Core Processor. AMD64 assembly used. - -``` -BenchmarkDecoderSilesia-32 5 206878840 ns/op 1024.50 MB/s 49808 B/op 43 allocs/op -BenchmarkDecoderEnwik9-32 1 1271809000 ns/op 786.28 MB/s 72048 B/op 52 allocs/op - -Concurrent blocks, performance: - -BenchmarkDecoder_DecodeAllParallel/kppkn.gtb.zst-32 67356 17857 ns/op 10321.96 MB/s 22.48 pct 102 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/geo.protodata.zst-32 266656 4421 ns/op 26823.21 MB/s 11.89 pct 19 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/plrabn12.txt.zst-32 20992 56842 ns/op 8477.17 MB/s 39.90 pct 754 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/lcet10.txt.zst-32 27456 43932 ns/op 9714.01 MB/s 33.27 pct 524 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/asyoulik.txt.zst-32 78432 15047 ns/op 8319.15 MB/s 40.34 pct 66 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/alice29.txt.zst-32 65800 18436 ns/op 8249.63 MB/s 37.75 pct 88 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/html_x_4.zst-32 102993 11523 ns/op 35546.09 MB/s 3.637 pct 143 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/paper-100k.pdf.zst-32 1000000 1070 ns/op 95720.98 MB/s 80.53 pct 3 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/fireworks.jpeg.zst-32 749802 1752 ns/op 70272.35 MB/s 100.0 pct 5 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/urls.10K.zst-32 22640 52934 ns/op 13263.37 MB/s 26.25 pct 1014 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/html.zst-32 226412 5232 ns/op 19572.27 MB/s 14.49 pct 20 B/op 0 allocs/op -BenchmarkDecoder_DecodeAllParallel/comp-data.bin.zst-32 923041 1276 ns/op 3194.71 MB/s 31.26 pct 0 B/op 0 allocs/op -``` - -This reflects the performance around May 2022, but this may be out of date. - -## Zstd inside ZIP files - -It is possible to use zstandard to compress individual files inside zip archives. -While this isn't widely supported it can be useful for internal files. - -To support the compression and decompression of these files you must register a compressor and decompressor. - -It is highly recommended registering the (de)compressors on individual zip Reader/Writer and NOT -use the global registration functions. The main reason for this is that 2 registrations from -different packages will result in a panic. - -It is a good idea to only have a single compressor and decompressor, since they can be used for multiple zip -files concurrently, and using a single instance will allow reusing some resources. - -See [this example](https://pkg.go.dev/github.com/klauspost/compress/zstd#example-ZipCompressor) for -how to compress and decompress files inside zip archives. - -# Contributions - -Contributions are always welcome. -For new features/fixes, remember to add tests and for performance enhancements include benchmarks. - -For general feedback and experience reports, feel free to open an issue or write me on [Twitter](https://twitter.com/sh0dan). - -This package includes the excellent [`github.com/cespare/xxhash`](https://github.com/cespare/xxhash) package Copyright (c) 2016 Caleb Spare. diff --git a/vendor/github.com/klauspost/compress/zstd/bitreader.go b/vendor/github.com/klauspost/compress/zstd/bitreader.go deleted file mode 100644 index 25ca9839..00000000 --- a/vendor/github.com/klauspost/compress/zstd/bitreader.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "encoding/binary" - "errors" - "fmt" - "io" - "math/bits" -) - -// bitReader reads a bitstream in reverse. -// The last set bit indicates the start of the stream and is used -// for aligning the input. -type bitReader struct { - in []byte - value uint64 // Maybe use [16]byte, but shifting is awkward. - bitsRead uint8 -} - -// init initializes and resets the bit reader. -func (b *bitReader) init(in []byte) error { - if len(in) < 1 { - return errors.New("corrupt stream: too short") - } - b.in = in - // The highest bit of the last byte indicates where to start - v := in[len(in)-1] - if v == 0 { - return errors.New("corrupt stream, did not find end of stream") - } - b.bitsRead = 64 - b.value = 0 - if len(in) >= 8 { - b.fillFastStart() - } else { - b.fill() - b.fill() - } - b.bitsRead += 8 - uint8(highBits(uint32(v))) - return nil -} - -// getBits will return n bits. n can be 0. -func (b *bitReader) getBits(n uint8) int { - if n == 0 /*|| b.bitsRead >= 64 */ { - return 0 - } - return int(b.get32BitsFast(n)) -} - -// get32BitsFast requires that at least one bit is requested every time. -// There are no checks if the buffer is filled. -func (b *bitReader) get32BitsFast(n uint8) uint32 { - const regMask = 64 - 1 - v := uint32((b.value << (b.bitsRead & regMask)) >> ((regMask + 1 - n) & regMask)) - b.bitsRead += n - return v -} - -// fillFast() will make sure at least 32 bits are available. -// There must be at least 4 bytes available. -func (b *bitReader) fillFast() { - if b.bitsRead < 32 { - return - } - v := b.in[len(b.in)-4:] - b.in = b.in[:len(b.in)-4] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value = (b.value << 32) | uint64(low) - b.bitsRead -= 32 -} - -// fillFastStart() assumes the bitreader is empty and there is at least 8 bytes to read. -func (b *bitReader) fillFastStart() { - v := b.in[len(b.in)-8:] - b.in = b.in[:len(b.in)-8] - b.value = binary.LittleEndian.Uint64(v) - b.bitsRead = 0 -} - -// fill() will make sure at least 32 bits are available. -func (b *bitReader) fill() { - if b.bitsRead < 32 { - return - } - if len(b.in) >= 4 { - v := b.in[len(b.in)-4:] - b.in = b.in[:len(b.in)-4] - low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) - b.value = (b.value << 32) | uint64(low) - b.bitsRead -= 32 - return - } - - b.bitsRead -= uint8(8 * len(b.in)) - for len(b.in) > 0 { - b.value = (b.value << 8) | uint64(b.in[len(b.in)-1]) - b.in = b.in[:len(b.in)-1] - } -} - -// finished returns true if all bits have been read from the bit stream. -func (b *bitReader) finished() bool { - return len(b.in) == 0 && b.bitsRead >= 64 -} - -// overread returns true if more bits have been requested than is on the stream. -func (b *bitReader) overread() bool { - return b.bitsRead > 64 -} - -// remain returns the number of bits remaining. -func (b *bitReader) remain() uint { - return 8*uint(len(b.in)) + 64 - uint(b.bitsRead) -} - -// close the bitstream and returns an error if out-of-buffer reads occurred. -func (b *bitReader) close() error { - // Release reference. - b.in = nil - if !b.finished() { - return fmt.Errorf("%d extra bits on block, should be 0", b.remain()) - } - if b.bitsRead > 64 { - return io.ErrUnexpectedEOF - } - return nil -} - -func highBits(val uint32) (n uint32) { - return uint32(bits.Len32(val) - 1) -} diff --git a/vendor/github.com/klauspost/compress/zstd/bitwriter.go b/vendor/github.com/klauspost/compress/zstd/bitwriter.go deleted file mode 100644 index 1952f175..00000000 --- a/vendor/github.com/klauspost/compress/zstd/bitwriter.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2018 Klaus Post. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// Based on work Copyright (c) 2013, Yann Collet, released under BSD License. - -package zstd - -// bitWriter will write bits. -// First bit will be LSB of the first byte of output. -type bitWriter struct { - bitContainer uint64 - nBits uint8 - out []byte -} - -// bitMask16 is bitmasks. Has extra to avoid bounds check. -var bitMask16 = [32]uint16{ - 0, 1, 3, 7, 0xF, 0x1F, - 0x3F, 0x7F, 0xFF, 0x1FF, 0x3FF, 0x7FF, - 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, 0xFFFF, - 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, - 0xFFFF, 0xFFFF} /* up to 16 bits */ - -var bitMask32 = [32]uint32{ - 0, 1, 3, 7, 0xF, 0x1F, 0x3F, 0x7F, 0xFF, - 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF, - 0x1ffff, 0x3ffff, 0x7FFFF, 0xfFFFF, 0x1fFFFF, 0x3fFFFF, 0x7fFFFF, 0xffFFFF, - 0x1ffFFFF, 0x3ffFFFF, 0x7ffFFFF, 0xfffFFFF, 0x1fffFFFF, 0x3fffFFFF, 0x7fffFFFF, -} // up to 32 bits - -// addBits16NC will add up to 16 bits. -// It will not check if there is space for them, -// so the caller must ensure that it has flushed recently. -func (b *bitWriter) addBits16NC(value uint16, bits uint8) { - b.bitContainer |= uint64(value&bitMask16[bits&31]) << (b.nBits & 63) - b.nBits += bits -} - -// addBits32NC will add up to 31 bits. -// It will not check if there is space for them, -// so the caller must ensure that it has flushed recently. -func (b *bitWriter) addBits32NC(value uint32, bits uint8) { - b.bitContainer |= uint64(value&bitMask32[bits&31]) << (b.nBits & 63) - b.nBits += bits -} - -// addBits64NC will add up to 64 bits. -// There must be space for 32 bits. -func (b *bitWriter) addBits64NC(value uint64, bits uint8) { - if bits <= 31 { - b.addBits32Clean(uint32(value), bits) - return - } - b.addBits32Clean(uint32(value), 32) - b.flush32() - b.addBits32Clean(uint32(value>>32), bits-32) -} - -// addBits32Clean will add up to 32 bits. -// It will not check if there is space for them. -// The input must not contain more bits than specified. -func (b *bitWriter) addBits32Clean(value uint32, bits uint8) { - b.bitContainer |= uint64(value) << (b.nBits & 63) - b.nBits += bits -} - -// addBits16Clean will add up to 16 bits. value may not contain more set bits than indicated. -// It will not check if there is space for them, so the caller must ensure that it has flushed recently. -func (b *bitWriter) addBits16Clean(value uint16, bits uint8) { - b.bitContainer |= uint64(value) << (b.nBits & 63) - b.nBits += bits -} - -// flush32 will flush out, so there are at least 32 bits available for writing. -func (b *bitWriter) flush32() { - if b.nBits < 32 { - return - } - b.out = append(b.out, - byte(b.bitContainer), - byte(b.bitContainer>>8), - byte(b.bitContainer>>16), - byte(b.bitContainer>>24)) - b.nBits -= 32 - b.bitContainer >>= 32 -} - -// flushAlign will flush remaining full bytes and align to next byte boundary. -func (b *bitWriter) flushAlign() { - nbBytes := (b.nBits + 7) >> 3 - for i := uint8(0); i < nbBytes; i++ { - b.out = append(b.out, byte(b.bitContainer>>(i*8))) - } - b.nBits = 0 - b.bitContainer = 0 -} - -// close will write the alignment bit and write the final byte(s) -// to the output. -func (b *bitWriter) close() { - // End mark - b.addBits16Clean(1, 1) - // flush until next byte. - b.flushAlign() -} - -// reset and continue writing by appending to out. -func (b *bitWriter) reset(out []byte) { - b.bitContainer = 0 - b.nBits = 0 - b.out = out -} diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go deleted file mode 100644 index 9f17ce60..00000000 --- a/vendor/github.com/klauspost/compress/zstd/blockdec.go +++ /dev/null @@ -1,726 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "hash/crc32" - "io" - "os" - "path/filepath" - "sync" - - "github.com/klauspost/compress/huff0" - "github.com/klauspost/compress/zstd/internal/xxhash" -) - -type blockType uint8 - -//go:generate stringer -type=blockType,literalsBlockType,seqCompMode,tableIndex - -const ( - blockTypeRaw blockType = iota - blockTypeRLE - blockTypeCompressed - blockTypeReserved -) - -type literalsBlockType uint8 - -const ( - literalsBlockRaw literalsBlockType = iota - literalsBlockRLE - literalsBlockCompressed - literalsBlockTreeless -) - -const ( - // maxCompressedBlockSize is the biggest allowed compressed block size (128KB) - maxCompressedBlockSize = 128 << 10 - - compressedBlockOverAlloc = 16 - maxCompressedBlockSizeAlloc = 128<<10 + compressedBlockOverAlloc - - // Maximum possible block size (all Raw+Uncompressed). - maxBlockSize = (1 << 21) - 1 - - maxMatchLen = 131074 - maxSequences = 0x7f00 + 0xffff - - // We support slightly less than the reference decoder to be able to - // use ints on 32 bit archs. - maxOffsetBits = 30 -) - -var ( - huffDecoderPool = sync.Pool{New: func() interface{} { - return &huff0.Scratch{} - }} - - fseDecoderPool = sync.Pool{New: func() interface{} { - return &fseDecoder{} - }} -) - -type blockDec struct { - // Raw source data of the block. - data []byte - dataStorage []byte - - // Destination of the decoded data. - dst []byte - - // Buffer for literals data. - literalBuf []byte - - // Window size of the block. - WindowSize uint64 - - err error - - // Check against this crc, if hasCRC is true. - checkCRC uint32 - hasCRC bool - - // Frame to use for singlethreaded decoding. - // Should not be used by the decoder itself since parent may be another frame. - localFrame *frameDec - - sequence []seqVals - - async struct { - newHist *history - literals []byte - seqData []byte - seqSize int // Size of uncompressed sequences - fcs uint64 - } - - // Block is RLE, this is the size. - RLESize uint32 - - Type blockType - - // Is this the last block of a frame? - Last bool - - // Use less memory - lowMem bool -} - -func (b *blockDec) String() string { - if b == nil { - return "" - } - return fmt.Sprintf("Steam Size: %d, Type: %v, Last: %t, Window: %d", len(b.data), b.Type, b.Last, b.WindowSize) -} - -func newBlockDec(lowMem bool) *blockDec { - b := blockDec{ - lowMem: lowMem, - } - return &b -} - -// reset will reset the block. -// Input must be a start of a block and will be at the end of the block when returned. -func (b *blockDec) reset(br byteBuffer, windowSize uint64) error { - b.WindowSize = windowSize - tmp, err := br.readSmall(3) - if err != nil { - println("Reading block header:", err) - return err - } - bh := uint32(tmp[0]) | (uint32(tmp[1]) << 8) | (uint32(tmp[2]) << 16) - b.Last = bh&1 != 0 - b.Type = blockType((bh >> 1) & 3) - // find size. - cSize := int(bh >> 3) - maxSize := maxCompressedBlockSizeAlloc - switch b.Type { - case blockTypeReserved: - return ErrReservedBlockType - case blockTypeRLE: - if cSize > maxCompressedBlockSize || cSize > int(b.WindowSize) { - if debugDecoder { - printf("rle block too big: csize:%d block: %+v\n", uint64(cSize), b) - } - return ErrWindowSizeExceeded - } - b.RLESize = uint32(cSize) - if b.lowMem { - maxSize = cSize - } - cSize = 1 - case blockTypeCompressed: - if debugDecoder { - println("Data size on stream:", cSize) - } - b.RLESize = 0 - maxSize = maxCompressedBlockSizeAlloc - if windowSize < maxCompressedBlockSize && b.lowMem { - maxSize = int(windowSize) + compressedBlockOverAlloc - } - if cSize > maxCompressedBlockSize || uint64(cSize) > b.WindowSize { - if debugDecoder { - printf("compressed block too big: csize:%d block: %+v\n", uint64(cSize), b) - } - return ErrCompressedSizeTooBig - } - // Empty compressed blocks must at least be 2 bytes - // for Literals_Block_Type and one for Sequences_Section_Header. - if cSize < 2 { - return ErrBlockTooSmall - } - case blockTypeRaw: - if cSize > maxCompressedBlockSize || cSize > int(b.WindowSize) { - if debugDecoder { - printf("rle block too big: csize:%d block: %+v\n", uint64(cSize), b) - } - return ErrWindowSizeExceeded - } - - b.RLESize = 0 - // We do not need a destination for raw blocks. - maxSize = -1 - default: - panic("Invalid block type") - } - - // Read block data. - if _, ok := br.(*byteBuf); !ok && cap(b.dataStorage) < cSize { - // byteBuf doesn't need a destination buffer. - if b.lowMem || cSize > maxCompressedBlockSize { - b.dataStorage = make([]byte, 0, cSize+compressedBlockOverAlloc) - } else { - b.dataStorage = make([]byte, 0, maxCompressedBlockSizeAlloc) - } - } - b.data, err = br.readBig(cSize, b.dataStorage) - if err != nil { - if debugDecoder { - println("Reading block:", err, "(", cSize, ")", len(b.data)) - printf("%T", br) - } - return err - } - if cap(b.dst) <= maxSize { - b.dst = make([]byte, 0, maxSize+1) - } - return nil -} - -// sendEOF will make the decoder send EOF on this frame. -func (b *blockDec) sendErr(err error) { - b.Last = true - b.Type = blockTypeReserved - b.err = err -} - -// Close will release resources. -// Closed blockDec cannot be reset. -func (b *blockDec) Close() { -} - -// decodeBuf -func (b *blockDec) decodeBuf(hist *history) error { - switch b.Type { - case blockTypeRLE: - if cap(b.dst) < int(b.RLESize) { - if b.lowMem { - b.dst = make([]byte, b.RLESize) - } else { - b.dst = make([]byte, maxCompressedBlockSize) - } - } - b.dst = b.dst[:b.RLESize] - v := b.data[0] - for i := range b.dst { - b.dst[i] = v - } - hist.appendKeep(b.dst) - return nil - case blockTypeRaw: - hist.appendKeep(b.data) - return nil - case blockTypeCompressed: - saved := b.dst - // Append directly to history - if hist.ignoreBuffer == 0 { - b.dst = hist.b - hist.b = nil - } else { - b.dst = b.dst[:0] - } - err := b.decodeCompressed(hist) - if debugDecoder { - println("Decompressed to total", len(b.dst), "bytes, hash:", xxhash.Sum64(b.dst), "error:", err) - } - if hist.ignoreBuffer == 0 { - hist.b = b.dst - b.dst = saved - } else { - hist.appendKeep(b.dst) - } - return err - case blockTypeReserved: - // Used for returning errors. - return b.err - default: - panic("Invalid block type") - } -} - -func (b *blockDec) decodeLiterals(in []byte, hist *history) (remain []byte, err error) { - // There must be at least one byte for Literals_Block_Type and one for Sequences_Section_Header - if len(in) < 2 { - return in, ErrBlockTooSmall - } - - litType := literalsBlockType(in[0] & 3) - var litRegenSize int - var litCompSize int - sizeFormat := (in[0] >> 2) & 3 - var fourStreams bool - var literals []byte - switch litType { - case literalsBlockRaw, literalsBlockRLE: - switch sizeFormat { - case 0, 2: - // Regenerated_Size uses 5 bits (0-31). Literals_Section_Header uses 1 byte. - litRegenSize = int(in[0] >> 3) - in = in[1:] - case 1: - // Regenerated_Size uses 12 bits (0-4095). Literals_Section_Header uses 2 bytes. - litRegenSize = int(in[0]>>4) + (int(in[1]) << 4) - in = in[2:] - case 3: - // Regenerated_Size uses 20 bits (0-1048575). Literals_Section_Header uses 3 bytes. - if len(in) < 3 { - println("too small: litType:", litType, " sizeFormat", sizeFormat, len(in)) - return in, ErrBlockTooSmall - } - litRegenSize = int(in[0]>>4) + (int(in[1]) << 4) + (int(in[2]) << 12) - in = in[3:] - } - case literalsBlockCompressed, literalsBlockTreeless: - switch sizeFormat { - case 0, 1: - // Both Regenerated_Size and Compressed_Size use 10 bits (0-1023). - if len(in) < 3 { - println("too small: litType:", litType, " sizeFormat", sizeFormat, len(in)) - return in, ErrBlockTooSmall - } - n := uint64(in[0]>>4) + (uint64(in[1]) << 4) + (uint64(in[2]) << 12) - litRegenSize = int(n & 1023) - litCompSize = int(n >> 10) - fourStreams = sizeFormat == 1 - in = in[3:] - case 2: - fourStreams = true - if len(in) < 4 { - println("too small: litType:", litType, " sizeFormat", sizeFormat, len(in)) - return in, ErrBlockTooSmall - } - n := uint64(in[0]>>4) + (uint64(in[1]) << 4) + (uint64(in[2]) << 12) + (uint64(in[3]) << 20) - litRegenSize = int(n & 16383) - litCompSize = int(n >> 14) - in = in[4:] - case 3: - fourStreams = true - if len(in) < 5 { - println("too small: litType:", litType, " sizeFormat", sizeFormat, len(in)) - return in, ErrBlockTooSmall - } - n := uint64(in[0]>>4) + (uint64(in[1]) << 4) + (uint64(in[2]) << 12) + (uint64(in[3]) << 20) + (uint64(in[4]) << 28) - litRegenSize = int(n & 262143) - litCompSize = int(n >> 18) - in = in[5:] - } - } - if debugDecoder { - println("literals type:", litType, "litRegenSize:", litRegenSize, "litCompSize:", litCompSize, "sizeFormat:", sizeFormat, "4X:", fourStreams) - } - if litRegenSize > int(b.WindowSize) || litRegenSize > maxCompressedBlockSize { - return in, ErrWindowSizeExceeded - } - - switch litType { - case literalsBlockRaw: - if len(in) < litRegenSize { - println("too small: litType:", litType, " sizeFormat", sizeFormat, "remain:", len(in), "want:", litRegenSize) - return in, ErrBlockTooSmall - } - literals = in[:litRegenSize] - in = in[litRegenSize:] - //printf("Found %d uncompressed literals\n", litRegenSize) - case literalsBlockRLE: - if len(in) < 1 { - println("too small: litType:", litType, " sizeFormat", sizeFormat, "remain:", len(in), "want:", 1) - return in, ErrBlockTooSmall - } - if cap(b.literalBuf) < litRegenSize { - if b.lowMem { - b.literalBuf = make([]byte, litRegenSize, litRegenSize+compressedBlockOverAlloc) - } else { - b.literalBuf = make([]byte, litRegenSize, maxCompressedBlockSize+compressedBlockOverAlloc) - } - } - literals = b.literalBuf[:litRegenSize] - v := in[0] - for i := range literals { - literals[i] = v - } - in = in[1:] - if debugDecoder { - printf("Found %d RLE compressed literals\n", litRegenSize) - } - case literalsBlockTreeless: - if len(in) < litCompSize { - println("too small: litType:", litType, " sizeFormat", sizeFormat, "remain:", len(in), "want:", litCompSize) - return in, ErrBlockTooSmall - } - // Store compressed literals, so we defer decoding until we get history. - literals = in[:litCompSize] - in = in[litCompSize:] - if debugDecoder { - printf("Found %d compressed literals\n", litCompSize) - } - huff := hist.huffTree - if huff == nil { - return in, errors.New("literal block was treeless, but no history was defined") - } - // Ensure we have space to store it. - if cap(b.literalBuf) < litRegenSize { - if b.lowMem { - b.literalBuf = make([]byte, 0, litRegenSize+compressedBlockOverAlloc) - } else { - b.literalBuf = make([]byte, 0, maxCompressedBlockSize+compressedBlockOverAlloc) - } - } - var err error - // Use our out buffer. - huff.MaxDecodedSize = litRegenSize - if fourStreams { - literals, err = huff.Decoder().Decompress4X(b.literalBuf[:0:litRegenSize], literals) - } else { - literals, err = huff.Decoder().Decompress1X(b.literalBuf[:0:litRegenSize], literals) - } - // Make sure we don't leak our literals buffer - if err != nil { - println("decompressing literals:", err) - return in, err - } - if len(literals) != litRegenSize { - return in, fmt.Errorf("literal output size mismatch want %d, got %d", litRegenSize, len(literals)) - } - - case literalsBlockCompressed: - if len(in) < litCompSize { - println("too small: litType:", litType, " sizeFormat", sizeFormat, "remain:", len(in), "want:", litCompSize) - return in, ErrBlockTooSmall - } - literals = in[:litCompSize] - in = in[litCompSize:] - // Ensure we have space to store it. - if cap(b.literalBuf) < litRegenSize { - if b.lowMem { - b.literalBuf = make([]byte, 0, litRegenSize+compressedBlockOverAlloc) - } else { - b.literalBuf = make([]byte, 0, maxCompressedBlockSize+compressedBlockOverAlloc) - } - } - huff := hist.huffTree - if huff == nil || (hist.dict != nil && huff == hist.dict.litEnc) { - huff = huffDecoderPool.Get().(*huff0.Scratch) - if huff == nil { - huff = &huff0.Scratch{} - } - } - var err error - if debugDecoder { - println("huff table input:", len(literals), "CRC:", crc32.ChecksumIEEE(literals)) - } - huff, literals, err = huff0.ReadTable(literals, huff) - if err != nil { - println("reading huffman table:", err) - return in, err - } - hist.huffTree = huff - huff.MaxDecodedSize = litRegenSize - // Use our out buffer. - if fourStreams { - literals, err = huff.Decoder().Decompress4X(b.literalBuf[:0:litRegenSize], literals) - } else { - literals, err = huff.Decoder().Decompress1X(b.literalBuf[:0:litRegenSize], literals) - } - if err != nil { - println("decoding compressed literals:", err) - return in, err - } - // Make sure we don't leak our literals buffer - if len(literals) != litRegenSize { - return in, fmt.Errorf("literal output size mismatch want %d, got %d", litRegenSize, len(literals)) - } - // Re-cap to get extra size. - literals = b.literalBuf[:len(literals)] - if debugDecoder { - printf("Decompressed %d literals into %d bytes\n", litCompSize, litRegenSize) - } - } - hist.decoders.literals = literals - return in, nil -} - -// decodeCompressed will start decompressing a block. -func (b *blockDec) decodeCompressed(hist *history) error { - in := b.data - in, err := b.decodeLiterals(in, hist) - if err != nil { - return err - } - err = b.prepareSequences(in, hist) - if err != nil { - return err - } - if hist.decoders.nSeqs == 0 { - b.dst = append(b.dst, hist.decoders.literals...) - return nil - } - before := len(hist.decoders.out) - err = hist.decoders.decodeSync(hist.b[hist.ignoreBuffer:]) - if err != nil { - return err - } - if hist.decoders.maxSyncLen > 0 { - hist.decoders.maxSyncLen += uint64(before) - hist.decoders.maxSyncLen -= uint64(len(hist.decoders.out)) - } - b.dst = hist.decoders.out - hist.recentOffsets = hist.decoders.prevOffset - return nil -} - -func (b *blockDec) prepareSequences(in []byte, hist *history) (err error) { - if debugDecoder { - printf("prepareSequences: %d byte(s) input\n", len(in)) - } - // Decode Sequences - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#sequences-section - if len(in) < 1 { - return ErrBlockTooSmall - } - var nSeqs int - seqHeader := in[0] - switch { - case seqHeader < 128: - nSeqs = int(seqHeader) - in = in[1:] - case seqHeader < 255: - if len(in) < 2 { - return ErrBlockTooSmall - } - nSeqs = int(seqHeader-128)<<8 | int(in[1]) - in = in[2:] - case seqHeader == 255: - if len(in) < 3 { - return ErrBlockTooSmall - } - nSeqs = 0x7f00 + int(in[1]) + (int(in[2]) << 8) - in = in[3:] - } - if nSeqs == 0 && len(in) != 0 { - // When no sequences, there should not be any more data... - if debugDecoder { - printf("prepareSequences: 0 sequences, but %d byte(s) left on stream\n", len(in)) - } - return ErrUnexpectedBlockSize - } - - var seqs = &hist.decoders - seqs.nSeqs = nSeqs - if nSeqs > 0 { - if len(in) < 1 { - return ErrBlockTooSmall - } - br := byteReader{b: in, off: 0} - compMode := br.Uint8() - br.advance(1) - if debugDecoder { - printf("Compression modes: 0b%b", compMode) - } - for i := uint(0); i < 3; i++ { - mode := seqCompMode((compMode >> (6 - i*2)) & 3) - if debugDecoder { - println("Table", tableIndex(i), "is", mode) - } - var seq *sequenceDec - switch tableIndex(i) { - case tableLiteralLengths: - seq = &seqs.litLengths - case tableOffsets: - seq = &seqs.offsets - case tableMatchLengths: - seq = &seqs.matchLengths - default: - panic("unknown table") - } - switch mode { - case compModePredefined: - if seq.fse != nil && !seq.fse.preDefined { - fseDecoderPool.Put(seq.fse) - } - seq.fse = &fsePredef[i] - case compModeRLE: - if br.remain() < 1 { - return ErrBlockTooSmall - } - v := br.Uint8() - br.advance(1) - if seq.fse == nil || seq.fse.preDefined { - seq.fse = fseDecoderPool.Get().(*fseDecoder) - } - symb, err := decSymbolValue(v, symbolTableX[i]) - if err != nil { - printf("RLE Transform table (%v) error: %v", tableIndex(i), err) - return err - } - seq.fse.setRLE(symb) - if debugDecoder { - printf("RLE set to 0x%x, code: %v", symb, v) - } - case compModeFSE: - println("Reading table for", tableIndex(i)) - if seq.fse == nil || seq.fse.preDefined { - seq.fse = fseDecoderPool.Get().(*fseDecoder) - } - err := seq.fse.readNCount(&br, uint16(maxTableSymbol[i])) - if err != nil { - println("Read table error:", err) - return err - } - err = seq.fse.transform(symbolTableX[i]) - if err != nil { - println("Transform table error:", err) - return err - } - if debugDecoder { - println("Read table ok", "symbolLen:", seq.fse.symbolLen) - } - case compModeRepeat: - seq.repeat = true - } - if br.overread() { - return io.ErrUnexpectedEOF - } - } - in = br.unread() - } - if debugDecoder { - println("Literals:", len(seqs.literals), "hash:", xxhash.Sum64(seqs.literals), "and", seqs.nSeqs, "sequences.") - } - - if nSeqs == 0 { - if len(b.sequence) > 0 { - b.sequence = b.sequence[:0] - } - return nil - } - br := seqs.br - if br == nil { - br = &bitReader{} - } - if err := br.init(in); err != nil { - return err - } - - if err := seqs.initialize(br, hist, b.dst); err != nil { - println("initializing sequences:", err) - return err - } - // Extract blocks... - if false && hist.dict == nil { - fatalErr := func(err error) { - if err != nil { - panic(err) - } - } - fn := fmt.Sprintf("n-%d-lits-%d-prev-%d-%d-%d-win-%d.blk", hist.decoders.nSeqs, len(hist.decoders.literals), hist.recentOffsets[0], hist.recentOffsets[1], hist.recentOffsets[2], hist.windowSize) - var buf bytes.Buffer - fatalErr(binary.Write(&buf, binary.LittleEndian, hist.decoders.litLengths.fse)) - fatalErr(binary.Write(&buf, binary.LittleEndian, hist.decoders.matchLengths.fse)) - fatalErr(binary.Write(&buf, binary.LittleEndian, hist.decoders.offsets.fse)) - buf.Write(in) - os.WriteFile(filepath.Join("testdata", "seqs", fn), buf.Bytes(), os.ModePerm) - } - - return nil -} - -func (b *blockDec) decodeSequences(hist *history) error { - if cap(b.sequence) < hist.decoders.nSeqs { - if b.lowMem { - b.sequence = make([]seqVals, 0, hist.decoders.nSeqs) - } else { - b.sequence = make([]seqVals, 0, 0x7F00+0xffff) - } - } - b.sequence = b.sequence[:hist.decoders.nSeqs] - if hist.decoders.nSeqs == 0 { - hist.decoders.seqSize = len(hist.decoders.literals) - return nil - } - hist.decoders.windowSize = hist.windowSize - hist.decoders.prevOffset = hist.recentOffsets - - err := hist.decoders.decode(b.sequence) - hist.recentOffsets = hist.decoders.prevOffset - return err -} - -func (b *blockDec) executeSequences(hist *history) error { - hbytes := hist.b - if len(hbytes) > hist.windowSize { - hbytes = hbytes[len(hbytes)-hist.windowSize:] - // We do not need history anymore. - if hist.dict != nil { - hist.dict.content = nil - } - } - hist.decoders.windowSize = hist.windowSize - hist.decoders.out = b.dst[:0] - err := hist.decoders.execute(b.sequence, hbytes) - if err != nil { - return err - } - return b.updateHistory(hist) -} - -func (b *blockDec) updateHistory(hist *history) error { - if len(b.data) > maxCompressedBlockSize { - return fmt.Errorf("compressed block size too large (%d)", len(b.data)) - } - // Set output and release references. - b.dst = hist.decoders.out - hist.recentOffsets = hist.decoders.prevOffset - - if b.Last { - // if last block we don't care about history. - println("Last block, no history returned") - hist.b = hist.b[:0] - return nil - } else { - hist.append(b.dst) - if debugDecoder { - println("Finished block with ", len(b.sequence), "sequences. Added", len(b.dst), "to history, now length", len(hist.b)) - } - } - hist.decoders.out, hist.decoders.literals = nil, nil - - return nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/blockenc.go b/vendor/github.com/klauspost/compress/zstd/blockenc.go deleted file mode 100644 index 2cfe925a..00000000 --- a/vendor/github.com/klauspost/compress/zstd/blockenc.go +++ /dev/null @@ -1,889 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "errors" - "fmt" - "math" - "math/bits" - - "github.com/klauspost/compress/huff0" -) - -type blockEnc struct { - size int - literals []byte - sequences []seq - coders seqCoders - litEnc *huff0.Scratch - dictLitEnc *huff0.Scratch - wr bitWriter - - extraLits int - output []byte - recentOffsets [3]uint32 - prevRecentOffsets [3]uint32 - - last bool - lowMem bool -} - -// init should be used once the block has been created. -// If called more than once, the effect is the same as calling reset. -func (b *blockEnc) init() { - if b.lowMem { - // 1K literals - if cap(b.literals) < 1<<10 { - b.literals = make([]byte, 0, 1<<10) - } - const defSeqs = 20 - if cap(b.sequences) < defSeqs { - b.sequences = make([]seq, 0, defSeqs) - } - // 1K - if cap(b.output) < 1<<10 { - b.output = make([]byte, 0, 1<<10) - } - } else { - if cap(b.literals) < maxCompressedBlockSize { - b.literals = make([]byte, 0, maxCompressedBlockSize) - } - const defSeqs = 2000 - if cap(b.sequences) < defSeqs { - b.sequences = make([]seq, 0, defSeqs) - } - if cap(b.output) < maxCompressedBlockSize { - b.output = make([]byte, 0, maxCompressedBlockSize) - } - } - - if b.coders.mlEnc == nil { - b.coders.mlEnc = &fseEncoder{} - b.coders.mlPrev = &fseEncoder{} - b.coders.ofEnc = &fseEncoder{} - b.coders.ofPrev = &fseEncoder{} - b.coders.llEnc = &fseEncoder{} - b.coders.llPrev = &fseEncoder{} - } - b.litEnc = &huff0.Scratch{WantLogLess: 4} - b.reset(nil) -} - -// initNewEncode can be used to reset offsets and encoders to the initial state. -func (b *blockEnc) initNewEncode() { - b.recentOffsets = [3]uint32{1, 4, 8} - b.litEnc.Reuse = huff0.ReusePolicyNone - b.coders.setPrev(nil, nil, nil) -} - -// reset will reset the block for a new encode, but in the same stream, -// meaning that state will be carried over, but the block content is reset. -// If a previous block is provided, the recent offsets are carried over. -func (b *blockEnc) reset(prev *blockEnc) { - b.extraLits = 0 - b.literals = b.literals[:0] - b.size = 0 - b.sequences = b.sequences[:0] - b.output = b.output[:0] - b.last = false - if prev != nil { - b.recentOffsets = prev.prevRecentOffsets - } - b.dictLitEnc = nil -} - -// reset will reset the block for a new encode, but in the same stream, -// meaning that state will be carried over, but the block content is reset. -// If a previous block is provided, the recent offsets are carried over. -func (b *blockEnc) swapEncoders(prev *blockEnc) { - b.coders.swap(&prev.coders) - b.litEnc, prev.litEnc = prev.litEnc, b.litEnc -} - -// blockHeader contains the information for a block header. -type blockHeader uint32 - -// setLast sets the 'last' indicator on a block. -func (h *blockHeader) setLast(b bool) { - if b { - *h = *h | 1 - } else { - const mask = (1 << 24) - 2 - *h = *h & mask - } -} - -// setSize will store the compressed size of a block. -func (h *blockHeader) setSize(v uint32) { - const mask = 7 - *h = (*h)&mask | blockHeader(v<<3) -} - -// setType sets the block type. -func (h *blockHeader) setType(t blockType) { - const mask = 1 | (((1 << 24) - 1) ^ 7) - *h = (*h & mask) | blockHeader(t<<1) -} - -// appendTo will append the block header to a slice. -func (h blockHeader) appendTo(b []byte) []byte { - return append(b, uint8(h), uint8(h>>8), uint8(h>>16)) -} - -// String returns a string representation of the block. -func (h blockHeader) String() string { - return fmt.Sprintf("Type: %d, Size: %d, Last:%t", (h>>1)&3, h>>3, h&1 == 1) -} - -// literalsHeader contains literals header information. -type literalsHeader uint64 - -// setType can be used to set the type of literal block. -func (h *literalsHeader) setType(t literalsBlockType) { - const mask = math.MaxUint64 - 3 - *h = (*h & mask) | literalsHeader(t) -} - -// setSize can be used to set a single size, for uncompressed and RLE content. -func (h *literalsHeader) setSize(regenLen int) { - inBits := bits.Len32(uint32(regenLen)) - // Only retain 2 bits - const mask = 3 - lh := uint64(*h & mask) - switch { - case inBits < 5: - lh |= (uint64(regenLen) << 3) | (1 << 60) - if debugEncoder { - got := int(lh>>3) & 0xff - if got != regenLen { - panic(fmt.Sprint("litRegenSize = ", regenLen, "(want) != ", got, "(got)")) - } - } - case inBits < 12: - lh |= (1 << 2) | (uint64(regenLen) << 4) | (2 << 60) - case inBits < 20: - lh |= (3 << 2) | (uint64(regenLen) << 4) | (3 << 60) - default: - panic(fmt.Errorf("internal error: block too big (%d)", regenLen)) - } - *h = literalsHeader(lh) -} - -// setSizes will set the size of a compressed literals section and the input length. -func (h *literalsHeader) setSizes(compLen, inLen int, single bool) { - compBits, inBits := bits.Len32(uint32(compLen)), bits.Len32(uint32(inLen)) - // Only retain 2 bits - const mask = 3 - lh := uint64(*h & mask) - switch { - case compBits <= 10 && inBits <= 10: - if !single { - lh |= 1 << 2 - } - lh |= (uint64(inLen) << 4) | (uint64(compLen) << (10 + 4)) | (3 << 60) - if debugEncoder { - const mmask = (1 << 24) - 1 - n := (lh >> 4) & mmask - if int(n&1023) != inLen { - panic(fmt.Sprint("regensize:", int(n&1023), "!=", inLen, inBits)) - } - if int(n>>10) != compLen { - panic(fmt.Sprint("compsize:", int(n>>10), "!=", compLen, compBits)) - } - } - case compBits <= 14 && inBits <= 14: - lh |= (2 << 2) | (uint64(inLen) << 4) | (uint64(compLen) << (14 + 4)) | (4 << 60) - if single { - panic("single stream used with more than 10 bits length.") - } - case compBits <= 18 && inBits <= 18: - lh |= (3 << 2) | (uint64(inLen) << 4) | (uint64(compLen) << (18 + 4)) | (5 << 60) - if single { - panic("single stream used with more than 10 bits length.") - } - default: - panic("internal error: block too big") - } - *h = literalsHeader(lh) -} - -// appendTo will append the literals header to a byte slice. -func (h literalsHeader) appendTo(b []byte) []byte { - size := uint8(h >> 60) - switch size { - case 1: - b = append(b, uint8(h)) - case 2: - b = append(b, uint8(h), uint8(h>>8)) - case 3: - b = append(b, uint8(h), uint8(h>>8), uint8(h>>16)) - case 4: - b = append(b, uint8(h), uint8(h>>8), uint8(h>>16), uint8(h>>24)) - case 5: - b = append(b, uint8(h), uint8(h>>8), uint8(h>>16), uint8(h>>24), uint8(h>>32)) - default: - panic(fmt.Errorf("internal error: literalsHeader has invalid size (%d)", size)) - } - return b -} - -// size returns the output size with currently set values. -func (h literalsHeader) size() int { - return int(h >> 60) -} - -func (h literalsHeader) String() string { - return fmt.Sprintf("Type: %d, SizeFormat: %d, Size: 0x%d, Bytes:%d", literalsBlockType(h&3), (h>>2)&3, h&((1<<60)-1)>>4, h>>60) -} - -// pushOffsets will push the recent offsets to the backup store. -func (b *blockEnc) pushOffsets() { - b.prevRecentOffsets = b.recentOffsets -} - -// pushOffsets will push the recent offsets to the backup store. -func (b *blockEnc) popOffsets() { - b.recentOffsets = b.prevRecentOffsets -} - -// matchOffset will adjust recent offsets and return the adjusted one, -// if it matches a previous offset. -func (b *blockEnc) matchOffset(offset, lits uint32) uint32 { - // Check if offset is one of the recent offsets. - // Adjusts the output offset accordingly. - // Gives a tiny bit of compression, typically around 1%. - if true { - if lits > 0 { - switch offset { - case b.recentOffsets[0]: - offset = 1 - case b.recentOffsets[1]: - b.recentOffsets[1] = b.recentOffsets[0] - b.recentOffsets[0] = offset - offset = 2 - case b.recentOffsets[2]: - b.recentOffsets[2] = b.recentOffsets[1] - b.recentOffsets[1] = b.recentOffsets[0] - b.recentOffsets[0] = offset - offset = 3 - default: - b.recentOffsets[2] = b.recentOffsets[1] - b.recentOffsets[1] = b.recentOffsets[0] - b.recentOffsets[0] = offset - offset += 3 - } - } else { - switch offset { - case b.recentOffsets[1]: - b.recentOffsets[1] = b.recentOffsets[0] - b.recentOffsets[0] = offset - offset = 1 - case b.recentOffsets[2]: - b.recentOffsets[2] = b.recentOffsets[1] - b.recentOffsets[1] = b.recentOffsets[0] - b.recentOffsets[0] = offset - offset = 2 - case b.recentOffsets[0] - 1: - b.recentOffsets[2] = b.recentOffsets[1] - b.recentOffsets[1] = b.recentOffsets[0] - b.recentOffsets[0] = offset - offset = 3 - default: - b.recentOffsets[2] = b.recentOffsets[1] - b.recentOffsets[1] = b.recentOffsets[0] - b.recentOffsets[0] = offset - offset += 3 - } - } - } else { - offset += 3 - } - return offset -} - -// encodeRaw can be used to set the output to a raw representation of supplied bytes. -func (b *blockEnc) encodeRaw(a []byte) { - var bh blockHeader - bh.setLast(b.last) - bh.setSize(uint32(len(a))) - bh.setType(blockTypeRaw) - b.output = bh.appendTo(b.output[:0]) - b.output = append(b.output, a...) - if debugEncoder { - println("Adding RAW block, length", len(a), "last:", b.last) - } -} - -// encodeRaw can be used to set the output to a raw representation of supplied bytes. -func (b *blockEnc) encodeRawTo(dst, src []byte) []byte { - var bh blockHeader - bh.setLast(b.last) - bh.setSize(uint32(len(src))) - bh.setType(blockTypeRaw) - dst = bh.appendTo(dst) - dst = append(dst, src...) - if debugEncoder { - println("Adding RAW block, length", len(src), "last:", b.last) - } - return dst -} - -// encodeLits can be used if the block is only litLen. -func (b *blockEnc) encodeLits(lits []byte, raw bool) error { - var bh blockHeader - bh.setLast(b.last) - bh.setSize(uint32(len(lits))) - - // Don't compress extremely small blocks - if len(lits) < 8 || (len(lits) < 32 && b.dictLitEnc == nil) || raw { - if debugEncoder { - println("Adding RAW block, length", len(lits), "last:", b.last) - } - bh.setType(blockTypeRaw) - b.output = bh.appendTo(b.output) - b.output = append(b.output, lits...) - return nil - } - - var ( - out []byte - reUsed, single bool - err error - ) - if b.dictLitEnc != nil { - b.litEnc.TransferCTable(b.dictLitEnc) - b.litEnc.Reuse = huff0.ReusePolicyAllow - b.dictLitEnc = nil - } - if len(lits) >= 1024 { - // Use 4 Streams. - out, reUsed, err = huff0.Compress4X(lits, b.litEnc) - } else if len(lits) > 16 { - // Use 1 stream - single = true - out, reUsed, err = huff0.Compress1X(lits, b.litEnc) - } else { - err = huff0.ErrIncompressible - } - if err == nil && len(out)+5 > len(lits) { - // If we are close, we may still be worse or equal to raw. - var lh literalsHeader - lh.setSizes(len(out), len(lits), single) - if len(out)+lh.size() >= len(lits) { - err = huff0.ErrIncompressible - } - } - switch err { - case huff0.ErrIncompressible: - if debugEncoder { - println("Adding RAW block, length", len(lits), "last:", b.last) - } - bh.setType(blockTypeRaw) - b.output = bh.appendTo(b.output) - b.output = append(b.output, lits...) - return nil - case huff0.ErrUseRLE: - if debugEncoder { - println("Adding RLE block, length", len(lits)) - } - bh.setType(blockTypeRLE) - b.output = bh.appendTo(b.output) - b.output = append(b.output, lits[0]) - return nil - case nil: - default: - return err - } - // Compressed... - // Now, allow reuse - b.litEnc.Reuse = huff0.ReusePolicyAllow - bh.setType(blockTypeCompressed) - var lh literalsHeader - if reUsed { - if debugEncoder { - println("Reused tree, compressed to", len(out)) - } - lh.setType(literalsBlockTreeless) - } else { - if debugEncoder { - println("New tree, compressed to", len(out), "tree size:", len(b.litEnc.OutTable)) - } - lh.setType(literalsBlockCompressed) - } - // Set sizes - lh.setSizes(len(out), len(lits), single) - bh.setSize(uint32(len(out) + lh.size() + 1)) - - // Write block headers. - b.output = bh.appendTo(b.output) - b.output = lh.appendTo(b.output) - // Add compressed data. - b.output = append(b.output, out...) - // No sequences. - b.output = append(b.output, 0) - return nil -} - -// fuzzFseEncoder can be used to fuzz the FSE encoder. -func fuzzFseEncoder(data []byte) int { - if len(data) > maxSequences || len(data) < 2 { - return 0 - } - enc := fseEncoder{} - hist := enc.Histogram() - maxSym := uint8(0) - for i, v := range data { - v = v & 63 - data[i] = v - hist[v]++ - if v > maxSym { - maxSym = v - } - } - if maxSym == 0 { - // All 0 - return 0 - } - maxCount := func(a []uint32) int { - var max uint32 - for _, v := range a { - if v > max { - max = v - } - } - return int(max) - } - cnt := maxCount(hist[:maxSym]) - if cnt == len(data) { - // RLE - return 0 - } - enc.HistogramFinished(maxSym, cnt) - err := enc.normalizeCount(len(data)) - if err != nil { - return 0 - } - _, err = enc.writeCount(nil) - if err != nil { - panic(err) - } - return 1 -} - -// encode will encode the block and append the output in b.output. -// Previous offset codes must be pushed if more blocks are expected. -func (b *blockEnc) encode(org []byte, raw, rawAllLits bool) error { - if len(b.sequences) == 0 { - return b.encodeLits(b.literals, rawAllLits) - } - // We want some difference to at least account for the headers. - saved := b.size - len(b.literals) - (b.size >> 6) - if saved < 16 { - if org == nil { - return errIncompressible - } - b.popOffsets() - return b.encodeLits(org, rawAllLits) - } - - var bh blockHeader - var lh literalsHeader - bh.setLast(b.last) - bh.setType(blockTypeCompressed) - // Store offset of the block header. Needed when we know the size. - bhOffset := len(b.output) - b.output = bh.appendTo(b.output) - - var ( - out []byte - reUsed, single bool - err error - ) - if b.dictLitEnc != nil { - b.litEnc.TransferCTable(b.dictLitEnc) - b.litEnc.Reuse = huff0.ReusePolicyAllow - b.dictLitEnc = nil - } - if len(b.literals) >= 1024 && !raw { - // Use 4 Streams. - out, reUsed, err = huff0.Compress4X(b.literals, b.litEnc) - } else if len(b.literals) > 16 && !raw { - // Use 1 stream - single = true - out, reUsed, err = huff0.Compress1X(b.literals, b.litEnc) - } else { - err = huff0.ErrIncompressible - } - - if err == nil && len(out)+5 > len(b.literals) { - // If we are close, we may still be worse or equal to raw. - var lh literalsHeader - lh.setSize(len(b.literals)) - szRaw := lh.size() - lh.setSizes(len(out), len(b.literals), single) - szComp := lh.size() - if len(out)+szComp >= len(b.literals)+szRaw { - err = huff0.ErrIncompressible - } - } - switch err { - case huff0.ErrIncompressible: - lh.setType(literalsBlockRaw) - lh.setSize(len(b.literals)) - b.output = lh.appendTo(b.output) - b.output = append(b.output, b.literals...) - if debugEncoder { - println("Adding literals RAW, length", len(b.literals)) - } - case huff0.ErrUseRLE: - lh.setType(literalsBlockRLE) - lh.setSize(len(b.literals)) - b.output = lh.appendTo(b.output) - b.output = append(b.output, b.literals[0]) - if debugEncoder { - println("Adding literals RLE") - } - case nil: - // Compressed litLen... - if reUsed { - if debugEncoder { - println("reused tree") - } - lh.setType(literalsBlockTreeless) - } else { - if debugEncoder { - println("new tree, size:", len(b.litEnc.OutTable)) - } - lh.setType(literalsBlockCompressed) - if debugEncoder { - _, _, err := huff0.ReadTable(out, nil) - if err != nil { - panic(err) - } - } - } - lh.setSizes(len(out), len(b.literals), single) - if debugEncoder { - printf("Compressed %d literals to %d bytes", len(b.literals), len(out)) - println("Adding literal header:", lh) - } - b.output = lh.appendTo(b.output) - b.output = append(b.output, out...) - b.litEnc.Reuse = huff0.ReusePolicyAllow - if debugEncoder { - println("Adding literals compressed") - } - default: - if debugEncoder { - println("Adding literals ERROR:", err) - } - return err - } - // Sequence compression - - // Write the number of sequences - switch { - case len(b.sequences) < 128: - b.output = append(b.output, uint8(len(b.sequences))) - case len(b.sequences) < 0x7f00: // TODO: this could be wrong - n := len(b.sequences) - b.output = append(b.output, 128+uint8(n>>8), uint8(n)) - default: - n := len(b.sequences) - 0x7f00 - b.output = append(b.output, 255, uint8(n), uint8(n>>8)) - } - if debugEncoder { - println("Encoding", len(b.sequences), "sequences") - } - b.genCodes() - llEnc := b.coders.llEnc - ofEnc := b.coders.ofEnc - mlEnc := b.coders.mlEnc - err = llEnc.normalizeCount(len(b.sequences)) - if err != nil { - return err - } - err = ofEnc.normalizeCount(len(b.sequences)) - if err != nil { - return err - } - err = mlEnc.normalizeCount(len(b.sequences)) - if err != nil { - return err - } - - // Choose the best compression mode for each type. - // Will evaluate the new vs predefined and previous. - chooseComp := func(cur, prev, preDef *fseEncoder) (*fseEncoder, seqCompMode) { - // See if predefined/previous is better - hist := cur.count[:cur.symbolLen] - nSize := cur.approxSize(hist) + cur.maxHeaderSize() - predefSize := preDef.approxSize(hist) - prevSize := prev.approxSize(hist) - - // Add a small penalty for new encoders. - // Don't bother with extremely small (<2 byte gains). - nSize = nSize + (nSize+2*8*16)>>4 - switch { - case predefSize <= prevSize && predefSize <= nSize || forcePreDef: - if debugEncoder { - println("Using predefined", predefSize>>3, "<=", nSize>>3) - } - return preDef, compModePredefined - case prevSize <= nSize: - if debugEncoder { - println("Using previous", prevSize>>3, "<=", nSize>>3) - } - return prev, compModeRepeat - default: - if debugEncoder { - println("Using new, predef", predefSize>>3, ". previous:", prevSize>>3, ">", nSize>>3, "header max:", cur.maxHeaderSize()>>3, "bytes") - println("tl:", cur.actualTableLog, "symbolLen:", cur.symbolLen, "norm:", cur.norm[:cur.symbolLen], "hist", cur.count[:cur.symbolLen]) - } - return cur, compModeFSE - } - } - - // Write compression mode - var mode uint8 - if llEnc.useRLE { - mode |= uint8(compModeRLE) << 6 - llEnc.setRLE(b.sequences[0].llCode) - if debugEncoder { - println("llEnc.useRLE") - } - } else { - var m seqCompMode - llEnc, m = chooseComp(llEnc, b.coders.llPrev, &fsePredefEnc[tableLiteralLengths]) - mode |= uint8(m) << 6 - } - if ofEnc.useRLE { - mode |= uint8(compModeRLE) << 4 - ofEnc.setRLE(b.sequences[0].ofCode) - if debugEncoder { - println("ofEnc.useRLE") - } - } else { - var m seqCompMode - ofEnc, m = chooseComp(ofEnc, b.coders.ofPrev, &fsePredefEnc[tableOffsets]) - mode |= uint8(m) << 4 - } - - if mlEnc.useRLE { - mode |= uint8(compModeRLE) << 2 - mlEnc.setRLE(b.sequences[0].mlCode) - if debugEncoder { - println("mlEnc.useRLE, code: ", b.sequences[0].mlCode, "value", b.sequences[0].matchLen) - } - } else { - var m seqCompMode - mlEnc, m = chooseComp(mlEnc, b.coders.mlPrev, &fsePredefEnc[tableMatchLengths]) - mode |= uint8(m) << 2 - } - b.output = append(b.output, mode) - if debugEncoder { - printf("Compression modes: 0b%b", mode) - } - b.output, err = llEnc.writeCount(b.output) - if err != nil { - return err - } - start := len(b.output) - b.output, err = ofEnc.writeCount(b.output) - if err != nil { - return err - } - if false { - println("block:", b.output[start:], "tablelog", ofEnc.actualTableLog, "maxcount:", ofEnc.maxCount) - fmt.Printf("selected TableLog: %d, Symbol length: %d\n", ofEnc.actualTableLog, ofEnc.symbolLen) - for i, v := range ofEnc.norm[:ofEnc.symbolLen] { - fmt.Printf("%3d: %5d -> %4d \n", i, ofEnc.count[i], v) - } - } - b.output, err = mlEnc.writeCount(b.output) - if err != nil { - return err - } - - // Maybe in block? - wr := &b.wr - wr.reset(b.output) - - var ll, of, ml cState - - // Current sequence - seq := len(b.sequences) - 1 - s := b.sequences[seq] - llEnc.setBits(llBitsTable[:]) - mlEnc.setBits(mlBitsTable[:]) - ofEnc.setBits(nil) - - llTT, ofTT, mlTT := llEnc.ct.symbolTT[:256], ofEnc.ct.symbolTT[:256], mlEnc.ct.symbolTT[:256] - - // We have 3 bounds checks here (and in the loop). - // Since we are iterating backwards it is kinda hard to avoid. - llB, ofB, mlB := llTT[s.llCode], ofTT[s.ofCode], mlTT[s.mlCode] - ll.init(wr, &llEnc.ct, llB) - of.init(wr, &ofEnc.ct, ofB) - wr.flush32() - ml.init(wr, &mlEnc.ct, mlB) - - // Each of these lookups also generates a bounds check. - wr.addBits32NC(s.litLen, llB.outBits) - wr.addBits32NC(s.matchLen, mlB.outBits) - wr.flush32() - wr.addBits32NC(s.offset, ofB.outBits) - if debugSequences { - println("Encoded seq", seq, s, "codes:", s.llCode, s.mlCode, s.ofCode, "states:", ll.state, ml.state, of.state, "bits:", llB, mlB, ofB) - } - seq-- - // Store sequences in reverse... - for seq >= 0 { - s = b.sequences[seq] - - ofB := ofTT[s.ofCode] - wr.flush32() // tablelog max is below 8 for each, so it will fill max 24 bits. - //of.encode(ofB) - nbBitsOut := (uint32(of.state) + ofB.deltaNbBits) >> 16 - dstState := int32(of.state>>(nbBitsOut&15)) + int32(ofB.deltaFindState) - wr.addBits16NC(of.state, uint8(nbBitsOut)) - of.state = of.stateTable[dstState] - - // Accumulate extra bits. - outBits := ofB.outBits & 31 - extraBits := uint64(s.offset & bitMask32[outBits]) - extraBitsN := outBits - - mlB := mlTT[s.mlCode] - //ml.encode(mlB) - nbBitsOut = (uint32(ml.state) + mlB.deltaNbBits) >> 16 - dstState = int32(ml.state>>(nbBitsOut&15)) + int32(mlB.deltaFindState) - wr.addBits16NC(ml.state, uint8(nbBitsOut)) - ml.state = ml.stateTable[dstState] - - outBits = mlB.outBits & 31 - extraBits = extraBits<> 16 - dstState = int32(ll.state>>(nbBitsOut&15)) + int32(llB.deltaFindState) - wr.addBits16NC(ll.state, uint8(nbBitsOut)) - ll.state = ll.stateTable[dstState] - - outBits = llB.outBits & 31 - extraBits = extraBits<= b.size { - // Discard and encode as raw block. - b.output = b.encodeRawTo(b.output[:bhOffset], org) - b.popOffsets() - b.litEnc.Reuse = huff0.ReusePolicyNone - return nil - } - - // Size is output minus block header. - bh.setSize(uint32(len(b.output)-bhOffset) - 3) - if debugEncoder { - println("Rewriting block header", bh) - } - _ = bh.appendTo(b.output[bhOffset:bhOffset]) - b.coders.setPrev(llEnc, mlEnc, ofEnc) - return nil -} - -var errIncompressible = errors.New("incompressible") - -func (b *blockEnc) genCodes() { - if len(b.sequences) == 0 { - // nothing to do - return - } - if len(b.sequences) > math.MaxUint16 { - panic("can only encode up to 64K sequences") - } - // No bounds checks after here: - llH := b.coders.llEnc.Histogram() - ofH := b.coders.ofEnc.Histogram() - mlH := b.coders.mlEnc.Histogram() - for i := range llH { - llH[i] = 0 - } - for i := range ofH { - ofH[i] = 0 - } - for i := range mlH { - mlH[i] = 0 - } - - var llMax, ofMax, mlMax uint8 - for i := range b.sequences { - seq := &b.sequences[i] - v := llCode(seq.litLen) - seq.llCode = v - llH[v]++ - if v > llMax { - llMax = v - } - - v = ofCode(seq.offset) - seq.ofCode = v - ofH[v]++ - if v > ofMax { - ofMax = v - } - - v = mlCode(seq.matchLen) - seq.mlCode = v - mlH[v]++ - if v > mlMax { - mlMax = v - if debugAsserts && mlMax > maxMatchLengthSymbol { - panic(fmt.Errorf("mlMax > maxMatchLengthSymbol (%d), matchlen: %d", mlMax, seq.matchLen)) - } - } - } - maxCount := func(a []uint32) int { - var max uint32 - for _, v := range a { - if v > max { - max = v - } - } - return int(max) - } - if debugAsserts && mlMax > maxMatchLengthSymbol { - panic(fmt.Errorf("mlMax > maxMatchLengthSymbol (%d)", mlMax)) - } - if debugAsserts && ofMax > maxOffsetBits { - panic(fmt.Errorf("ofMax > maxOffsetBits (%d)", ofMax)) - } - if debugAsserts && llMax > maxLiteralLengthSymbol { - panic(fmt.Errorf("llMax > maxLiteralLengthSymbol (%d)", llMax)) - } - - b.coders.mlEnc.HistogramFinished(mlMax, maxCount(mlH[:mlMax+1])) - b.coders.ofEnc.HistogramFinished(ofMax, maxCount(ofH[:ofMax+1])) - b.coders.llEnc.HistogramFinished(llMax, maxCount(llH[:llMax+1])) -} diff --git a/vendor/github.com/klauspost/compress/zstd/blocktype_string.go b/vendor/github.com/klauspost/compress/zstd/blocktype_string.go deleted file mode 100644 index 01a01e48..00000000 --- a/vendor/github.com/klauspost/compress/zstd/blocktype_string.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by "stringer -type=blockType,literalsBlockType,seqCompMode,tableIndex"; DO NOT EDIT. - -package zstd - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[blockTypeRaw-0] - _ = x[blockTypeRLE-1] - _ = x[blockTypeCompressed-2] - _ = x[blockTypeReserved-3] -} - -const _blockType_name = "blockTypeRawblockTypeRLEblockTypeCompressedblockTypeReserved" - -var _blockType_index = [...]uint8{0, 12, 24, 43, 60} - -func (i blockType) String() string { - if i >= blockType(len(_blockType_index)-1) { - return "blockType(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _blockType_name[_blockType_index[i]:_blockType_index[i+1]] -} -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[literalsBlockRaw-0] - _ = x[literalsBlockRLE-1] - _ = x[literalsBlockCompressed-2] - _ = x[literalsBlockTreeless-3] -} - -const _literalsBlockType_name = "literalsBlockRawliteralsBlockRLEliteralsBlockCompressedliteralsBlockTreeless" - -var _literalsBlockType_index = [...]uint8{0, 16, 32, 55, 76} - -func (i literalsBlockType) String() string { - if i >= literalsBlockType(len(_literalsBlockType_index)-1) { - return "literalsBlockType(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _literalsBlockType_name[_literalsBlockType_index[i]:_literalsBlockType_index[i+1]] -} -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[compModePredefined-0] - _ = x[compModeRLE-1] - _ = x[compModeFSE-2] - _ = x[compModeRepeat-3] -} - -const _seqCompMode_name = "compModePredefinedcompModeRLEcompModeFSEcompModeRepeat" - -var _seqCompMode_index = [...]uint8{0, 18, 29, 40, 54} - -func (i seqCompMode) String() string { - if i >= seqCompMode(len(_seqCompMode_index)-1) { - return "seqCompMode(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _seqCompMode_name[_seqCompMode_index[i]:_seqCompMode_index[i+1]] -} -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[tableLiteralLengths-0] - _ = x[tableOffsets-1] - _ = x[tableMatchLengths-2] -} - -const _tableIndex_name = "tableLiteralLengthstableOffsetstableMatchLengths" - -var _tableIndex_index = [...]uint8{0, 19, 31, 48} - -func (i tableIndex) String() string { - if i >= tableIndex(len(_tableIndex_index)-1) { - return "tableIndex(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _tableIndex_name[_tableIndex_index[i]:_tableIndex_index[i+1]] -} diff --git a/vendor/github.com/klauspost/compress/zstd/bytebuf.go b/vendor/github.com/klauspost/compress/zstd/bytebuf.go deleted file mode 100644 index 55a38855..00000000 --- a/vendor/github.com/klauspost/compress/zstd/bytebuf.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "fmt" - "io" -) - -type byteBuffer interface { - // Read up to 8 bytes. - // Returns io.ErrUnexpectedEOF if this cannot be satisfied. - readSmall(n int) ([]byte, error) - - // Read >8 bytes. - // MAY use the destination slice. - readBig(n int, dst []byte) ([]byte, error) - - // Read a single byte. - readByte() (byte, error) - - // Skip n bytes. - skipN(n int64) error -} - -// in-memory buffer -type byteBuf []byte - -func (b *byteBuf) readSmall(n int) ([]byte, error) { - if debugAsserts && n > 8 { - panic(fmt.Errorf("small read > 8 (%d). use readBig", n)) - } - bb := *b - if len(bb) < n { - return nil, io.ErrUnexpectedEOF - } - r := bb[:n] - *b = bb[n:] - return r, nil -} - -func (b *byteBuf) readBig(n int, dst []byte) ([]byte, error) { - bb := *b - if len(bb) < n { - return nil, io.ErrUnexpectedEOF - } - r := bb[:n] - *b = bb[n:] - return r, nil -} - -func (b *byteBuf) readByte() (byte, error) { - bb := *b - if len(bb) < 1 { - return 0, io.ErrUnexpectedEOF - } - r := bb[0] - *b = bb[1:] - return r, nil -} - -func (b *byteBuf) skipN(n int64) error { - bb := *b - if n < 0 { - return fmt.Errorf("negative skip (%d) requested", n) - } - if int64(len(bb)) < n { - return io.ErrUnexpectedEOF - } - *b = bb[n:] - return nil -} - -// wrapper around a reader. -type readerWrapper struct { - r io.Reader - tmp [8]byte -} - -func (r *readerWrapper) readSmall(n int) ([]byte, error) { - if debugAsserts && n > 8 { - panic(fmt.Errorf("small read > 8 (%d). use readBig", n)) - } - n2, err := io.ReadFull(r.r, r.tmp[:n]) - // We only really care about the actual bytes read. - if err != nil { - if err == io.EOF { - return nil, io.ErrUnexpectedEOF - } - if debugDecoder { - println("readSmall: got", n2, "want", n, "err", err) - } - return nil, err - } - return r.tmp[:n], nil -} - -func (r *readerWrapper) readBig(n int, dst []byte) ([]byte, error) { - if cap(dst) < n { - dst = make([]byte, n) - } - n2, err := io.ReadFull(r.r, dst[:n]) - if err == io.EOF && n > 0 { - err = io.ErrUnexpectedEOF - } - return dst[:n2], err -} - -func (r *readerWrapper) readByte() (byte, error) { - n2, err := io.ReadFull(r.r, r.tmp[:1]) - if err != nil { - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return 0, err - } - if n2 != 1 { - return 0, io.ErrUnexpectedEOF - } - return r.tmp[0], nil -} - -func (r *readerWrapper) skipN(n int64) error { - n2, err := io.CopyN(io.Discard, r.r, n) - if n2 != n { - err = io.ErrUnexpectedEOF - } - return err -} diff --git a/vendor/github.com/klauspost/compress/zstd/bytereader.go b/vendor/github.com/klauspost/compress/zstd/bytereader.go deleted file mode 100644 index 0e59a242..00000000 --- a/vendor/github.com/klauspost/compress/zstd/bytereader.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -// byteReader provides a byte reader that reads -// little endian values from a byte stream. -// The input stream is manually advanced. -// The reader performs no bounds checks. -type byteReader struct { - b []byte - off int -} - -// advance the stream b n bytes. -func (b *byteReader) advance(n uint) { - b.off += int(n) -} - -// overread returns whether we have advanced too far. -func (b *byteReader) overread() bool { - return b.off > len(b.b) -} - -// Int32 returns a little endian int32 starting at current offset. -func (b byteReader) Int32() int32 { - b2 := b.b[b.off:] - b2 = b2[:4] - v3 := int32(b2[3]) - v2 := int32(b2[2]) - v1 := int32(b2[1]) - v0 := int32(b2[0]) - return v0 | (v1 << 8) | (v2 << 16) | (v3 << 24) -} - -// Uint8 returns the next byte -func (b *byteReader) Uint8() uint8 { - v := b.b[b.off] - return v -} - -// Uint32 returns a little endian uint32 starting at current offset. -func (b byteReader) Uint32() uint32 { - if r := b.remain(); r < 4 { - // Very rare - v := uint32(0) - for i := 1; i <= r; i++ { - v = (v << 8) | uint32(b.b[len(b.b)-i]) - } - return v - } - b2 := b.b[b.off:] - b2 = b2[:4] - v3 := uint32(b2[3]) - v2 := uint32(b2[2]) - v1 := uint32(b2[1]) - v0 := uint32(b2[0]) - return v0 | (v1 << 8) | (v2 << 16) | (v3 << 24) -} - -// Uint32NC returns a little endian uint32 starting at current offset. -// The caller must be sure if there are at least 4 bytes left. -func (b byteReader) Uint32NC() uint32 { - b2 := b.b[b.off:] - b2 = b2[:4] - v3 := uint32(b2[3]) - v2 := uint32(b2[2]) - v1 := uint32(b2[1]) - v0 := uint32(b2[0]) - return v0 | (v1 << 8) | (v2 << 16) | (v3 << 24) -} - -// unread returns the unread portion of the input. -func (b byteReader) unread() []byte { - return b.b[b.off:] -} - -// remain will return the number of bytes remaining. -func (b byteReader) remain() int { - return len(b.b) - b.off -} diff --git a/vendor/github.com/klauspost/compress/zstd/decodeheader.go b/vendor/github.com/klauspost/compress/zstd/decodeheader.go deleted file mode 100644 index f6a24097..00000000 --- a/vendor/github.com/klauspost/compress/zstd/decodeheader.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2020+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. - -package zstd - -import ( - "encoding/binary" - "errors" - "io" -) - -// HeaderMaxSize is the maximum size of a Frame and Block Header. -// If less is sent to Header.Decode it *may* still contain enough information. -const HeaderMaxSize = 14 + 3 - -// Header contains information about the first frame and block within that. -type Header struct { - // SingleSegment specifies whether the data is to be decompressed into a - // single contiguous memory segment. - // It implies that WindowSize is invalid and that FrameContentSize is valid. - SingleSegment bool - - // WindowSize is the window of data to keep while decoding. - // Will only be set if SingleSegment is false. - WindowSize uint64 - - // Dictionary ID. - // If 0, no dictionary. - DictionaryID uint32 - - // HasFCS specifies whether FrameContentSize has a valid value. - HasFCS bool - - // FrameContentSize is the expected uncompressed size of the entire frame. - FrameContentSize uint64 - - // Skippable will be true if the frame is meant to be skipped. - // This implies that FirstBlock.OK is false. - Skippable bool - - // SkippableID is the user-specific ID for the skippable frame. - // Valid values are between 0 to 15, inclusive. - SkippableID int - - // SkippableSize is the length of the user data to skip following - // the header. - SkippableSize uint32 - - // HeaderSize is the raw size of the frame header. - // - // For normal frames, it includes the size of the magic number and - // the size of the header (per section 3.1.1.1). - // It does not include the size for any data blocks (section 3.1.1.2) nor - // the size for the trailing content checksum. - // - // For skippable frames, this counts the size of the magic number - // along with the size of the size field of the payload. - // It does not include the size of the skippable payload itself. - // The total frame size is the HeaderSize plus the SkippableSize. - HeaderSize int - - // First block information. - FirstBlock struct { - // OK will be set if first block could be decoded. - OK bool - - // Is this the last block of a frame? - Last bool - - // Is the data compressed? - // If true CompressedSize will be populated. - // Unfortunately DecompressedSize cannot be determined - // without decoding the blocks. - Compressed bool - - // DecompressedSize is the expected decompressed size of the block. - // Will be 0 if it cannot be determined. - DecompressedSize int - - // CompressedSize of the data in the block. - // Does not include the block header. - // Will be equal to DecompressedSize if not Compressed. - CompressedSize int - } - - // If set there is a checksum present for the block content. - // The checksum field at the end is always 4 bytes long. - HasCheckSum bool -} - -// Decode the header from the beginning of the stream. -// This will decode the frame header and the first block header if enough bytes are provided. -// It is recommended to provide at least HeaderMaxSize bytes. -// If the frame header cannot be read an error will be returned. -// If there isn't enough input, io.ErrUnexpectedEOF is returned. -// The FirstBlock.OK will indicate if enough information was available to decode the first block header. -func (h *Header) Decode(in []byte) error { - *h = Header{} - if len(in) < 4 { - return io.ErrUnexpectedEOF - } - h.HeaderSize += 4 - b, in := in[:4], in[4:] - if string(b) != frameMagic { - if string(b[1:4]) != skippableFrameMagic || b[0]&0xf0 != 0x50 { - return ErrMagicMismatch - } - if len(in) < 4 { - return io.ErrUnexpectedEOF - } - h.HeaderSize += 4 - h.Skippable = true - h.SkippableID = int(b[0] & 0xf) - h.SkippableSize = binary.LittleEndian.Uint32(in) - return nil - } - - // Read Window_Descriptor - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor - if len(in) < 1 { - return io.ErrUnexpectedEOF - } - fhd, in := in[0], in[1:] - h.HeaderSize++ - h.SingleSegment = fhd&(1<<5) != 0 - h.HasCheckSum = fhd&(1<<2) != 0 - if fhd&(1<<3) != 0 { - return errors.New("reserved bit set on frame header") - } - - if !h.SingleSegment { - if len(in) < 1 { - return io.ErrUnexpectedEOF - } - var wd byte - wd, in = in[0], in[1:] - h.HeaderSize++ - windowLog := 10 + (wd >> 3) - windowBase := uint64(1) << windowLog - windowAdd := (windowBase / 8) * uint64(wd&0x7) - h.WindowSize = windowBase + windowAdd - } - - // Read Dictionary_ID - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary_id - if size := fhd & 3; size != 0 { - if size == 3 { - size = 4 - } - if len(in) < int(size) { - return io.ErrUnexpectedEOF - } - b, in = in[:size], in[size:] - h.HeaderSize += int(size) - switch len(b) { - case 1: - h.DictionaryID = uint32(b[0]) - case 2: - h.DictionaryID = uint32(b[0]) | (uint32(b[1]) << 8) - case 4: - h.DictionaryID = uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24) - } - } - - // Read Frame_Content_Size - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frame_content_size - var fcsSize int - v := fhd >> 6 - switch v { - case 0: - if h.SingleSegment { - fcsSize = 1 - } - default: - fcsSize = 1 << v - } - - if fcsSize > 0 { - h.HasFCS = true - if len(in) < fcsSize { - return io.ErrUnexpectedEOF - } - b, in = in[:fcsSize], in[fcsSize:] - h.HeaderSize += int(fcsSize) - switch len(b) { - case 1: - h.FrameContentSize = uint64(b[0]) - case 2: - // When FCS_Field_Size is 2, the offset of 256 is added. - h.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) + 256 - case 4: - h.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) | (uint64(b[2]) << 16) | (uint64(b[3]) << 24) - case 8: - d1 := uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24) - d2 := uint32(b[4]) | (uint32(b[5]) << 8) | (uint32(b[6]) << 16) | (uint32(b[7]) << 24) - h.FrameContentSize = uint64(d1) | (uint64(d2) << 32) - } - } - - // Frame Header done, we will not fail from now on. - if len(in) < 3 { - return nil - } - tmp := in[:3] - bh := uint32(tmp[0]) | (uint32(tmp[1]) << 8) | (uint32(tmp[2]) << 16) - h.FirstBlock.Last = bh&1 != 0 - blockType := blockType((bh >> 1) & 3) - // find size. - cSize := int(bh >> 3) - switch blockType { - case blockTypeReserved: - return nil - case blockTypeRLE: - h.FirstBlock.Compressed = true - h.FirstBlock.DecompressedSize = cSize - h.FirstBlock.CompressedSize = 1 - case blockTypeCompressed: - h.FirstBlock.Compressed = true - h.FirstBlock.CompressedSize = cSize - case blockTypeRaw: - h.FirstBlock.DecompressedSize = cSize - h.FirstBlock.CompressedSize = cSize - default: - panic("Invalid block type") - } - - h.FirstBlock.OK = true - return nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/decoder.go b/vendor/github.com/klauspost/compress/zstd/decoder.go deleted file mode 100644 index f04aaa21..00000000 --- a/vendor/github.com/klauspost/compress/zstd/decoder.go +++ /dev/null @@ -1,948 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "context" - "encoding/binary" - "io" - "sync" - - "github.com/klauspost/compress/zstd/internal/xxhash" -) - -// Decoder provides decoding of zstandard streams. -// The decoder has been designed to operate without allocations after a warmup. -// This means that you should store the decoder for best performance. -// To re-use a stream decoder, use the Reset(r io.Reader) error to switch to another stream. -// A decoder can safely be re-used even if the previous stream failed. -// To release the resources, you must call the Close() function on a decoder. -type Decoder struct { - o decoderOptions - - // Unreferenced decoders, ready for use. - decoders chan *blockDec - - // Current read position used for Reader functionality. - current decoderState - - // sync stream decoding - syncStream struct { - decodedFrame uint64 - br readerWrapper - enabled bool - inFrame bool - dstBuf []byte - } - - frame *frameDec - - // Custom dictionaries. - dicts map[uint32]*dict - - // streamWg is the waitgroup for all streams - streamWg sync.WaitGroup -} - -// decoderState is used for maintaining state when the decoder -// is used for streaming. -type decoderState struct { - // current block being written to stream. - decodeOutput - - // output in order to be written to stream. - output chan decodeOutput - - // cancel remaining output. - cancel context.CancelFunc - - // crc of current frame - crc *xxhash.Digest - - flushed bool -} - -var ( - // Check the interfaces we want to support. - _ = io.WriterTo(&Decoder{}) - _ = io.Reader(&Decoder{}) -) - -// NewReader creates a new decoder. -// A nil Reader can be provided in which case Reset can be used to start a decode. -// -// A Decoder can be used in two modes: -// -// 1) As a stream, or -// 2) For stateless decoding using DecodeAll. -// -// Only a single stream can be decoded concurrently, but the same decoder -// can run multiple concurrent stateless decodes. It is even possible to -// use stateless decodes while a stream is being decoded. -// -// The Reset function can be used to initiate a new stream, which is will considerably -// reduce the allocations normally caused by NewReader. -func NewReader(r io.Reader, opts ...DOption) (*Decoder, error) { - initPredefined() - var d Decoder - d.o.setDefault() - for _, o := range opts { - err := o(&d.o) - if err != nil { - return nil, err - } - } - d.current.crc = xxhash.New() - d.current.flushed = true - - if r == nil { - d.current.err = ErrDecoderNilInput - } - - // Transfer option dicts. - d.dicts = make(map[uint32]*dict, len(d.o.dicts)) - for _, dc := range d.o.dicts { - d.dicts[dc.id] = dc - } - d.o.dicts = nil - - // Create decoders - d.decoders = make(chan *blockDec, d.o.concurrent) - for i := 0; i < d.o.concurrent; i++ { - dec := newBlockDec(d.o.lowMem) - dec.localFrame = newFrameDec(d.o) - d.decoders <- dec - } - - if r == nil { - return &d, nil - } - return &d, d.Reset(r) -} - -// Read bytes from the decompressed stream into p. -// Returns the number of bytes written and any error that occurred. -// When the stream is done, io.EOF will be returned. -func (d *Decoder) Read(p []byte) (int, error) { - var n int - for { - if len(d.current.b) > 0 { - filled := copy(p, d.current.b) - p = p[filled:] - d.current.b = d.current.b[filled:] - n += filled - } - if len(p) == 0 { - break - } - if len(d.current.b) == 0 { - // We have an error and no more data - if d.current.err != nil { - break - } - if !d.nextBlock(n == 0) { - return n, d.current.err - } - } - } - if len(d.current.b) > 0 { - if debugDecoder { - println("returning", n, "still bytes left:", len(d.current.b)) - } - // Only return error at end of block - return n, nil - } - if d.current.err != nil { - d.drainOutput() - } - if debugDecoder { - println("returning", n, d.current.err, len(d.decoders)) - } - return n, d.current.err -} - -// Reset will reset the decoder the supplied stream after the current has finished processing. -// Note that this functionality cannot be used after Close has been called. -// Reset can be called with a nil reader to release references to the previous reader. -// After being called with a nil reader, no other operations than Reset or DecodeAll or Close -// should be used. -func (d *Decoder) Reset(r io.Reader) error { - if d.current.err == ErrDecoderClosed { - return d.current.err - } - - d.drainOutput() - - d.syncStream.br.r = nil - if r == nil { - d.current.err = ErrDecoderNilInput - if len(d.current.b) > 0 { - d.current.b = d.current.b[:0] - } - d.current.flushed = true - return nil - } - - // If bytes buffer and < 5MB, do sync decoding anyway. - if bb, ok := r.(byter); ok && bb.Len() < d.o.decodeBufsBelow && !d.o.limitToCap { - bb2 := bb - if debugDecoder { - println("*bytes.Buffer detected, doing sync decode, len:", bb.Len()) - } - b := bb2.Bytes() - var dst []byte - if cap(d.syncStream.dstBuf) > 0 { - dst = d.syncStream.dstBuf[:0] - } - - dst, err := d.DecodeAll(b, dst) - if err == nil { - err = io.EOF - } - // Save output buffer - d.syncStream.dstBuf = dst - d.current.b = dst - d.current.err = err - d.current.flushed = true - if debugDecoder { - println("sync decode to", len(dst), "bytes, err:", err) - } - return nil - } - // Remove current block. - d.stashDecoder() - d.current.decodeOutput = decodeOutput{} - d.current.err = nil - d.current.flushed = false - d.current.d = nil - d.syncStream.dstBuf = nil - - // Ensure no-one else is still running... - d.streamWg.Wait() - if d.frame == nil { - d.frame = newFrameDec(d.o) - } - - if d.o.concurrent == 1 { - return d.startSyncDecoder(r) - } - - d.current.output = make(chan decodeOutput, d.o.concurrent) - ctx, cancel := context.WithCancel(context.Background()) - d.current.cancel = cancel - d.streamWg.Add(1) - go d.startStreamDecoder(ctx, r, d.current.output) - - return nil -} - -// drainOutput will drain the output until errEndOfStream is sent. -func (d *Decoder) drainOutput() { - if d.current.cancel != nil { - if debugDecoder { - println("cancelling current") - } - d.current.cancel() - d.current.cancel = nil - } - if d.current.d != nil { - if debugDecoder { - printf("re-adding current decoder %p, decoders: %d", d.current.d, len(d.decoders)) - } - d.decoders <- d.current.d - d.current.d = nil - d.current.b = nil - } - if d.current.output == nil || d.current.flushed { - println("current already flushed") - return - } - for v := range d.current.output { - if v.d != nil { - if debugDecoder { - printf("re-adding decoder %p", v.d) - } - d.decoders <- v.d - } - } - d.current.output = nil - d.current.flushed = true -} - -// WriteTo writes data to w until there's no more data to write or when an error occurs. -// The return value n is the number of bytes written. -// Any error encountered during the write is also returned. -func (d *Decoder) WriteTo(w io.Writer) (int64, error) { - var n int64 - for { - if len(d.current.b) > 0 { - n2, err2 := w.Write(d.current.b) - n += int64(n2) - if err2 != nil && (d.current.err == nil || d.current.err == io.EOF) { - d.current.err = err2 - } else if n2 != len(d.current.b) { - d.current.err = io.ErrShortWrite - } - } - if d.current.err != nil { - break - } - d.nextBlock(true) - } - err := d.current.err - if err != nil { - d.drainOutput() - } - if err == io.EOF { - err = nil - } - return n, err -} - -// DecodeAll allows stateless decoding of a blob of bytes. -// Output will be appended to dst, so if the destination size is known -// you can pre-allocate the destination slice to avoid allocations. -// DecodeAll can be used concurrently. -// The Decoder concurrency limits will be respected. -func (d *Decoder) DecodeAll(input, dst []byte) ([]byte, error) { - if d.decoders == nil { - return dst, ErrDecoderClosed - } - - // Grab a block decoder and frame decoder. - block := <-d.decoders - frame := block.localFrame - initialSize := len(dst) - defer func() { - if debugDecoder { - printf("re-adding decoder: %p", block) - } - frame.rawInput = nil - frame.bBuf = nil - if frame.history.decoders.br != nil { - frame.history.decoders.br.in = nil - } - d.decoders <- block - }() - frame.bBuf = input - - for { - frame.history.reset() - err := frame.reset(&frame.bBuf) - if err != nil { - if err == io.EOF { - if debugDecoder { - println("frame reset return EOF") - } - return dst, nil - } - return dst, err - } - if err = d.setDict(frame); err != nil { - return nil, err - } - if frame.WindowSize > d.o.maxWindowSize { - if debugDecoder { - println("window size exceeded:", frame.WindowSize, ">", d.o.maxWindowSize) - } - return dst, ErrWindowSizeExceeded - } - if frame.FrameContentSize != fcsUnknown { - if frame.FrameContentSize > d.o.maxDecodedSize-uint64(len(dst)-initialSize) { - if debugDecoder { - println("decoder size exceeded; fcs:", frame.FrameContentSize, "> mcs:", d.o.maxDecodedSize-uint64(len(dst)-initialSize), "len:", len(dst)) - } - return dst, ErrDecoderSizeExceeded - } - if d.o.limitToCap && frame.FrameContentSize > uint64(cap(dst)-len(dst)) { - if debugDecoder { - println("decoder size exceeded; fcs:", frame.FrameContentSize, "> (cap-len)", cap(dst)-len(dst)) - } - return dst, ErrDecoderSizeExceeded - } - if cap(dst)-len(dst) < int(frame.FrameContentSize) { - dst2 := make([]byte, len(dst), len(dst)+int(frame.FrameContentSize)+compressedBlockOverAlloc) - copy(dst2, dst) - dst = dst2 - } - } - - if cap(dst) == 0 && !d.o.limitToCap { - // Allocate len(input) * 2 by default if nothing is provided - // and we didn't get frame content size. - size := len(input) * 2 - // Cap to 1 MB. - if size > 1<<20 { - size = 1 << 20 - } - if uint64(size) > d.o.maxDecodedSize { - size = int(d.o.maxDecodedSize) - } - dst = make([]byte, 0, size) - } - - dst, err = frame.runDecoder(dst, block) - if err != nil { - return dst, err - } - if uint64(len(dst)-initialSize) > d.o.maxDecodedSize { - return dst, ErrDecoderSizeExceeded - } - if len(frame.bBuf) == 0 { - if debugDecoder { - println("frame dbuf empty") - } - break - } - } - return dst, nil -} - -// nextBlock returns the next block. -// If an error occurs d.err will be set. -// Optionally the function can block for new output. -// If non-blocking mode is used the returned boolean will be false -// if no data was available without blocking. -func (d *Decoder) nextBlock(blocking bool) (ok bool) { - if d.current.err != nil { - // Keep error state. - return false - } - d.current.b = d.current.b[:0] - - // SYNC: - if d.syncStream.enabled { - if !blocking { - return false - } - ok = d.nextBlockSync() - if !ok { - d.stashDecoder() - } - return ok - } - - //ASYNC: - d.stashDecoder() - if blocking { - d.current.decodeOutput, ok = <-d.current.output - } else { - select { - case d.current.decodeOutput, ok = <-d.current.output: - default: - return false - } - } - if !ok { - // This should not happen, so signal error state... - d.current.err = io.ErrUnexpectedEOF - return false - } - next := d.current.decodeOutput - if next.d != nil && next.d.async.newHist != nil { - d.current.crc.Reset() - } - if debugDecoder { - var tmp [4]byte - binary.LittleEndian.PutUint32(tmp[:], uint32(xxhash.Sum64(next.b))) - println("got", len(d.current.b), "bytes, error:", d.current.err, "data crc:", tmp) - } - - if d.o.ignoreChecksum { - return true - } - - if len(next.b) > 0 { - d.current.crc.Write(next.b) - } - if next.err == nil && next.d != nil && next.d.hasCRC { - got := uint32(d.current.crc.Sum64()) - if got != next.d.checkCRC { - if debugDecoder { - printf("CRC Check Failed: %08x (got) != %08x (on stream)\n", got, next.d.checkCRC) - } - d.current.err = ErrCRCMismatch - } else { - if debugDecoder { - printf("CRC ok %08x\n", got) - } - } - } - - return true -} - -func (d *Decoder) nextBlockSync() (ok bool) { - if d.current.d == nil { - d.current.d = <-d.decoders - } - for len(d.current.b) == 0 { - if !d.syncStream.inFrame { - d.frame.history.reset() - d.current.err = d.frame.reset(&d.syncStream.br) - if d.current.err == nil { - d.current.err = d.setDict(d.frame) - } - if d.current.err != nil { - return false - } - if d.frame.WindowSize > d.o.maxDecodedSize || d.frame.WindowSize > d.o.maxWindowSize { - d.current.err = ErrDecoderSizeExceeded - return false - } - - d.syncStream.decodedFrame = 0 - d.syncStream.inFrame = true - } - d.current.err = d.frame.next(d.current.d) - if d.current.err != nil { - return false - } - d.frame.history.ensureBlock() - if debugDecoder { - println("History trimmed:", len(d.frame.history.b), "decoded already:", d.syncStream.decodedFrame) - } - histBefore := len(d.frame.history.b) - d.current.err = d.current.d.decodeBuf(&d.frame.history) - - if d.current.err != nil { - println("error after:", d.current.err) - return false - } - d.current.b = d.frame.history.b[histBefore:] - if debugDecoder { - println("history after:", len(d.frame.history.b)) - } - - // Check frame size (before CRC) - d.syncStream.decodedFrame += uint64(len(d.current.b)) - if d.syncStream.decodedFrame > d.frame.FrameContentSize { - if debugDecoder { - printf("DecodedFrame (%d) > FrameContentSize (%d)\n", d.syncStream.decodedFrame, d.frame.FrameContentSize) - } - d.current.err = ErrFrameSizeExceeded - return false - } - - // Check FCS - if d.current.d.Last && d.frame.FrameContentSize != fcsUnknown && d.syncStream.decodedFrame != d.frame.FrameContentSize { - if debugDecoder { - printf("DecodedFrame (%d) != FrameContentSize (%d)\n", d.syncStream.decodedFrame, d.frame.FrameContentSize) - } - d.current.err = ErrFrameSizeMismatch - return false - } - - // Update/Check CRC - if d.frame.HasCheckSum { - if !d.o.ignoreChecksum { - d.frame.crc.Write(d.current.b) - } - if d.current.d.Last { - if !d.o.ignoreChecksum { - d.current.err = d.frame.checkCRC() - } else { - d.current.err = d.frame.consumeCRC() - } - if d.current.err != nil { - println("CRC error:", d.current.err) - return false - } - } - } - d.syncStream.inFrame = !d.current.d.Last - } - return true -} - -func (d *Decoder) stashDecoder() { - if d.current.d != nil { - if debugDecoder { - printf("re-adding current decoder %p", d.current.d) - } - d.decoders <- d.current.d - d.current.d = nil - } -} - -// Close will release all resources. -// It is NOT possible to reuse the decoder after this. -func (d *Decoder) Close() { - if d.current.err == ErrDecoderClosed { - return - } - d.drainOutput() - if d.current.cancel != nil { - d.current.cancel() - d.streamWg.Wait() - d.current.cancel = nil - } - if d.decoders != nil { - close(d.decoders) - for dec := range d.decoders { - dec.Close() - } - d.decoders = nil - } - if d.current.d != nil { - d.current.d.Close() - d.current.d = nil - } - d.current.err = ErrDecoderClosed -} - -// IOReadCloser returns the decoder as an io.ReadCloser for convenience. -// Any changes to the decoder will be reflected, so the returned ReadCloser -// can be reused along with the decoder. -// io.WriterTo is also supported by the returned ReadCloser. -func (d *Decoder) IOReadCloser() io.ReadCloser { - return closeWrapper{d: d} -} - -// closeWrapper wraps a function call as a closer. -type closeWrapper struct { - d *Decoder -} - -// WriteTo forwards WriteTo calls to the decoder. -func (c closeWrapper) WriteTo(w io.Writer) (n int64, err error) { - return c.d.WriteTo(w) -} - -// Read forwards read calls to the decoder. -func (c closeWrapper) Read(p []byte) (n int, err error) { - return c.d.Read(p) -} - -// Close closes the decoder. -func (c closeWrapper) Close() error { - c.d.Close() - return nil -} - -type decodeOutput struct { - d *blockDec - b []byte - err error -} - -func (d *Decoder) startSyncDecoder(r io.Reader) error { - d.frame.history.reset() - d.syncStream.br = readerWrapper{r: r} - d.syncStream.inFrame = false - d.syncStream.enabled = true - d.syncStream.decodedFrame = 0 - return nil -} - -// Create Decoder: -// ASYNC: -// Spawn 3 go routines. -// 0: Read frames and decode block literals. -// 1: Decode sequences. -// 2: Execute sequences, send to output. -func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output chan decodeOutput) { - defer d.streamWg.Done() - br := readerWrapper{r: r} - - var seqDecode = make(chan *blockDec, d.o.concurrent) - var seqExecute = make(chan *blockDec, d.o.concurrent) - - // Async 1: Decode sequences... - go func() { - var hist history - var hasErr bool - - for block := range seqDecode { - if hasErr { - if block != nil { - seqExecute <- block - } - continue - } - if block.async.newHist != nil { - if debugDecoder { - println("Async 1: new history, recent:", block.async.newHist.recentOffsets) - } - hist.reset() - hist.decoders = block.async.newHist.decoders - hist.recentOffsets = block.async.newHist.recentOffsets - hist.windowSize = block.async.newHist.windowSize - if block.async.newHist.dict != nil { - hist.setDict(block.async.newHist.dict) - } - } - if block.err != nil || block.Type != blockTypeCompressed { - hasErr = block.err != nil - seqExecute <- block - continue - } - - hist.decoders.literals = block.async.literals - block.err = block.prepareSequences(block.async.seqData, &hist) - if debugDecoder && block.err != nil { - println("prepareSequences returned:", block.err) - } - hasErr = block.err != nil - if block.err == nil { - block.err = block.decodeSequences(&hist) - if debugDecoder && block.err != nil { - println("decodeSequences returned:", block.err) - } - hasErr = block.err != nil - // block.async.sequence = hist.decoders.seq[:hist.decoders.nSeqs] - block.async.seqSize = hist.decoders.seqSize - } - seqExecute <- block - } - close(seqExecute) - hist.reset() - }() - - var wg sync.WaitGroup - wg.Add(1) - - // Async 3: Execute sequences... - frameHistCache := d.frame.history.b - go func() { - var hist history - var decodedFrame uint64 - var fcs uint64 - var hasErr bool - for block := range seqExecute { - out := decodeOutput{err: block.err, d: block} - if block.err != nil || hasErr { - hasErr = true - output <- out - continue - } - if block.async.newHist != nil { - if debugDecoder { - println("Async 2: new history") - } - hist.reset() - hist.windowSize = block.async.newHist.windowSize - hist.allocFrameBuffer = block.async.newHist.allocFrameBuffer - if block.async.newHist.dict != nil { - hist.setDict(block.async.newHist.dict) - } - - if cap(hist.b) < hist.allocFrameBuffer { - if cap(frameHistCache) >= hist.allocFrameBuffer { - hist.b = frameHistCache - } else { - hist.b = make([]byte, 0, hist.allocFrameBuffer) - println("Alloc history sized", hist.allocFrameBuffer) - } - } - hist.b = hist.b[:0] - fcs = block.async.fcs - decodedFrame = 0 - } - do := decodeOutput{err: block.err, d: block} - switch block.Type { - case blockTypeRLE: - if debugDecoder { - println("add rle block length:", block.RLESize) - } - - if cap(block.dst) < int(block.RLESize) { - if block.lowMem { - block.dst = make([]byte, block.RLESize) - } else { - block.dst = make([]byte, maxCompressedBlockSize) - } - } - block.dst = block.dst[:block.RLESize] - v := block.data[0] - for i := range block.dst { - block.dst[i] = v - } - hist.append(block.dst) - do.b = block.dst - case blockTypeRaw: - if debugDecoder { - println("add raw block length:", len(block.data)) - } - hist.append(block.data) - do.b = block.data - case blockTypeCompressed: - if debugDecoder { - println("execute with history length:", len(hist.b), "window:", hist.windowSize) - } - hist.decoders.seqSize = block.async.seqSize - hist.decoders.literals = block.async.literals - do.err = block.executeSequences(&hist) - hasErr = do.err != nil - if debugDecoder && hasErr { - println("executeSequences returned:", do.err) - } - do.b = block.dst - } - if !hasErr { - decodedFrame += uint64(len(do.b)) - if decodedFrame > fcs { - println("fcs exceeded", block.Last, fcs, decodedFrame) - do.err = ErrFrameSizeExceeded - hasErr = true - } else if block.Last && fcs != fcsUnknown && decodedFrame != fcs { - do.err = ErrFrameSizeMismatch - hasErr = true - } else { - if debugDecoder { - println("fcs ok", block.Last, fcs, decodedFrame) - } - } - } - output <- do - } - close(output) - frameHistCache = hist.b - wg.Done() - if debugDecoder { - println("decoder goroutines finished") - } - hist.reset() - }() - - var hist history -decodeStream: - for { - var hasErr bool - hist.reset() - decodeBlock := func(block *blockDec) { - if hasErr { - if block != nil { - seqDecode <- block - } - return - } - if block.err != nil || block.Type != blockTypeCompressed { - hasErr = block.err != nil - seqDecode <- block - return - } - - remain, err := block.decodeLiterals(block.data, &hist) - block.err = err - hasErr = block.err != nil - if err == nil { - block.async.literals = hist.decoders.literals - block.async.seqData = remain - } else if debugDecoder { - println("decodeLiterals error:", err) - } - seqDecode <- block - } - frame := d.frame - if debugDecoder { - println("New frame...") - } - var historySent bool - frame.history.reset() - err := frame.reset(&br) - if debugDecoder && err != nil { - println("Frame decoder returned", err) - } - if err == nil { - err = d.setDict(frame) - } - if err == nil && d.frame.WindowSize > d.o.maxWindowSize { - if debugDecoder { - println("decoder size exceeded, fws:", d.frame.WindowSize, "> mws:", d.o.maxWindowSize) - } - - err = ErrDecoderSizeExceeded - } - if err != nil { - select { - case <-ctx.Done(): - case dec := <-d.decoders: - dec.sendErr(err) - decodeBlock(dec) - } - break decodeStream - } - - // Go through all blocks of the frame. - for { - var dec *blockDec - select { - case <-ctx.Done(): - break decodeStream - case dec = <-d.decoders: - // Once we have a decoder, we MUST return it. - } - err := frame.next(dec) - if !historySent { - h := frame.history - if debugDecoder { - println("Alloc History:", h.allocFrameBuffer) - } - hist.reset() - if h.dict != nil { - hist.setDict(h.dict) - } - dec.async.newHist = &h - dec.async.fcs = frame.FrameContentSize - historySent = true - } else { - dec.async.newHist = nil - } - if debugDecoder && err != nil { - println("next block returned error:", err) - } - dec.err = err - dec.hasCRC = false - if dec.Last && frame.HasCheckSum && err == nil { - crc, err := frame.rawInput.readSmall(4) - if len(crc) < 4 { - if err == nil { - err = io.ErrUnexpectedEOF - - } - println("CRC missing?", err) - dec.err = err - } else { - dec.checkCRC = binary.LittleEndian.Uint32(crc) - dec.hasCRC = true - if debugDecoder { - printf("found crc to check: %08x\n", dec.checkCRC) - } - } - } - err = dec.err - last := dec.Last - decodeBlock(dec) - if err != nil { - break decodeStream - } - if last { - break - } - } - } - close(seqDecode) - wg.Wait() - hist.reset() - d.frame.history.b = frameHistCache -} - -func (d *Decoder) setDict(frame *frameDec) (err error) { - dict, ok := d.dicts[frame.DictionaryID] - if ok { - if debugDecoder { - println("setting dict", frame.DictionaryID) - } - frame.history.setDict(dict) - } else if frame.DictionaryID != 0 { - // A zero or missing dictionary id is ambiguous: - // either dictionary zero, or no dictionary. In particular, - // zstd --patch-from uses this id for the source file, - // so only return an error if the dictionary id is not zero. - err = ErrUnknownDictionary - } - return err -} diff --git a/vendor/github.com/klauspost/compress/zstd/decoder_options.go b/vendor/github.com/klauspost/compress/zstd/decoder_options.go deleted file mode 100644 index 774c5f00..00000000 --- a/vendor/github.com/klauspost/compress/zstd/decoder_options.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "errors" - "fmt" - "math/bits" - "runtime" -) - -// DOption is an option for creating a decoder. -type DOption func(*decoderOptions) error - -// options retains accumulated state of multiple options. -type decoderOptions struct { - lowMem bool - concurrent int - maxDecodedSize uint64 - maxWindowSize uint64 - dicts []*dict - ignoreChecksum bool - limitToCap bool - decodeBufsBelow int -} - -func (o *decoderOptions) setDefault() { - *o = decoderOptions{ - // use less ram: true for now, but may change. - lowMem: true, - concurrent: runtime.GOMAXPROCS(0), - maxWindowSize: MaxWindowSize, - decodeBufsBelow: 128 << 10, - } - if o.concurrent > 4 { - o.concurrent = 4 - } - o.maxDecodedSize = 64 << 30 -} - -// WithDecoderLowmem will set whether to use a lower amount of memory, -// but possibly have to allocate more while running. -func WithDecoderLowmem(b bool) DOption { - return func(o *decoderOptions) error { o.lowMem = b; return nil } -} - -// WithDecoderConcurrency sets the number of created decoders. -// When decoding block with DecodeAll, this will limit the number -// of possible concurrently running decodes. -// When decoding streams, this will limit the number of -// inflight blocks. -// When decoding streams and setting maximum to 1, -// no async decoding will be done. -// When a value of 0 is provided GOMAXPROCS will be used. -// By default this will be set to 4 or GOMAXPROCS, whatever is lower. -func WithDecoderConcurrency(n int) DOption { - return func(o *decoderOptions) error { - if n < 0 { - return errors.New("concurrency must be at least 1") - } - if n == 0 { - o.concurrent = runtime.GOMAXPROCS(0) - } else { - o.concurrent = n - } - return nil - } -} - -// WithDecoderMaxMemory allows to set a maximum decoded size for in-memory -// non-streaming operations or maximum window size for streaming operations. -// This can be used to control memory usage of potentially hostile content. -// Maximum is 1 << 63 bytes. Default is 64GiB. -func WithDecoderMaxMemory(n uint64) DOption { - return func(o *decoderOptions) error { - if n == 0 { - return errors.New("WithDecoderMaxMemory must be at least 1") - } - if n > 1<<63 { - return errors.New("WithDecoderMaxmemory must be less than 1 << 63") - } - o.maxDecodedSize = n - return nil - } -} - -// WithDecoderDicts allows to register one or more dictionaries for the decoder. -// -// Each slice in dict must be in the [dictionary format] produced by -// "zstd --train" from the Zstandard reference implementation. -// -// If several dictionaries with the same ID are provided, the last one will be used. -// -// [dictionary format]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary-format -func WithDecoderDicts(dicts ...[]byte) DOption { - return func(o *decoderOptions) error { - for _, b := range dicts { - d, err := loadDict(b) - if err != nil { - return err - } - o.dicts = append(o.dicts, d) - } - return nil - } -} - -// WithDecoderDictRaw registers a dictionary that may be used by the decoder. -// The slice content can be arbitrary data. -func WithDecoderDictRaw(id uint32, content []byte) DOption { - return func(o *decoderOptions) error { - if bits.UintSize > 32 && uint(len(content)) > dictMaxLength { - return fmt.Errorf("dictionary of size %d > 2GiB too large", len(content)) - } - o.dicts = append(o.dicts, &dict{id: id, content: content, offsets: [3]int{1, 4, 8}}) - return nil - } -} - -// WithDecoderMaxWindow allows to set a maximum window size for decodes. -// This allows rejecting packets that will cause big memory usage. -// The Decoder will likely allocate more memory based on the WithDecoderLowmem setting. -// If WithDecoderMaxMemory is set to a lower value, that will be used. -// Default is 512MB, Maximum is ~3.75 TB as per zstandard spec. -func WithDecoderMaxWindow(size uint64) DOption { - return func(o *decoderOptions) error { - if size < MinWindowSize { - return errors.New("WithMaxWindowSize must be at least 1KB, 1024 bytes") - } - if size > (1<<41)+7*(1<<38) { - return errors.New("WithMaxWindowSize must be less than (1<<41) + 7*(1<<38) ~ 3.75TB") - } - o.maxWindowSize = size - return nil - } -} - -// WithDecodeAllCapLimit will limit DecodeAll to decoding cap(dst)-len(dst) bytes, -// or any size set in WithDecoderMaxMemory. -// This can be used to limit decoding to a specific maximum output size. -// Disabled by default. -func WithDecodeAllCapLimit(b bool) DOption { - return func(o *decoderOptions) error { - o.limitToCap = b - return nil - } -} - -// WithDecodeBuffersBelow will fully decode readers that have a -// `Bytes() []byte` and `Len() int` interface similar to bytes.Buffer. -// This typically uses less allocations but will have the full decompressed object in memory. -// Note that DecodeAllCapLimit will disable this, as well as giving a size of 0 or less. -// Default is 128KiB. -func WithDecodeBuffersBelow(size int) DOption { - return func(o *decoderOptions) error { - o.decodeBufsBelow = size - return nil - } -} - -// IgnoreChecksum allows to forcibly ignore checksum checking. -func IgnoreChecksum(b bool) DOption { - return func(o *decoderOptions) error { - o.ignoreChecksum = b - return nil - } -} diff --git a/vendor/github.com/klauspost/compress/zstd/dict.go b/vendor/github.com/klauspost/compress/zstd/dict.go deleted file mode 100644 index 8d5567fe..00000000 --- a/vendor/github.com/klauspost/compress/zstd/dict.go +++ /dev/null @@ -1,534 +0,0 @@ -package zstd - -import ( - "bytes" - "encoding/binary" - "errors" - "fmt" - "io" - "math" - "sort" - - "github.com/klauspost/compress/huff0" -) - -type dict struct { - id uint32 - - litEnc *huff0.Scratch - llDec, ofDec, mlDec sequenceDec - offsets [3]int - content []byte -} - -const dictMagic = "\x37\xa4\x30\xec" - -// Maximum dictionary size for the reference implementation (1.5.3) is 2 GiB. -const dictMaxLength = 1 << 31 - -// ID returns the dictionary id or 0 if d is nil. -func (d *dict) ID() uint32 { - if d == nil { - return 0 - } - return d.id -} - -// ContentSize returns the dictionary content size or 0 if d is nil. -func (d *dict) ContentSize() int { - if d == nil { - return 0 - } - return len(d.content) -} - -// Content returns the dictionary content. -func (d *dict) Content() []byte { - if d == nil { - return nil - } - return d.content -} - -// Offsets returns the initial offsets. -func (d *dict) Offsets() [3]int { - if d == nil { - return [3]int{} - } - return d.offsets -} - -// LitEncoder returns the literal encoder. -func (d *dict) LitEncoder() *huff0.Scratch { - if d == nil { - return nil - } - return d.litEnc -} - -// Load a dictionary as described in -// https://github.com/facebook/zstd/blob/master/doc/zstd_compression_format.md#dictionary-format -func loadDict(b []byte) (*dict, error) { - // Check static field size. - if len(b) <= 8+(3*4) { - return nil, io.ErrUnexpectedEOF - } - d := dict{ - llDec: sequenceDec{fse: &fseDecoder{}}, - ofDec: sequenceDec{fse: &fseDecoder{}}, - mlDec: sequenceDec{fse: &fseDecoder{}}, - } - if string(b[:4]) != dictMagic { - return nil, ErrMagicMismatch - } - d.id = binary.LittleEndian.Uint32(b[4:8]) - if d.id == 0 { - return nil, errors.New("dictionaries cannot have ID 0") - } - - // Read literal table - var err error - d.litEnc, b, err = huff0.ReadTable(b[8:], nil) - if err != nil { - return nil, fmt.Errorf("loading literal table: %w", err) - } - d.litEnc.Reuse = huff0.ReusePolicyMust - - br := byteReader{ - b: b, - off: 0, - } - readDec := func(i tableIndex, dec *fseDecoder) error { - if err := dec.readNCount(&br, uint16(maxTableSymbol[i])); err != nil { - return err - } - if br.overread() { - return io.ErrUnexpectedEOF - } - err = dec.transform(symbolTableX[i]) - if err != nil { - println("Transform table error:", err) - return err - } - if debugDecoder || debugEncoder { - println("Read table ok", "symbolLen:", dec.symbolLen) - } - // Set decoders as predefined so they aren't reused. - dec.preDefined = true - return nil - } - - if err := readDec(tableOffsets, d.ofDec.fse); err != nil { - return nil, err - } - if err := readDec(tableMatchLengths, d.mlDec.fse); err != nil { - return nil, err - } - if err := readDec(tableLiteralLengths, d.llDec.fse); err != nil { - return nil, err - } - if br.remain() < 12 { - return nil, io.ErrUnexpectedEOF - } - - d.offsets[0] = int(br.Uint32()) - br.advance(4) - d.offsets[1] = int(br.Uint32()) - br.advance(4) - d.offsets[2] = int(br.Uint32()) - br.advance(4) - if d.offsets[0] <= 0 || d.offsets[1] <= 0 || d.offsets[2] <= 0 { - return nil, errors.New("invalid offset in dictionary") - } - d.content = make([]byte, br.remain()) - copy(d.content, br.unread()) - if d.offsets[0] > len(d.content) || d.offsets[1] > len(d.content) || d.offsets[2] > len(d.content) { - return nil, fmt.Errorf("initial offset bigger than dictionary content size %d, offsets: %v", len(d.content), d.offsets) - } - - return &d, nil -} - -// InspectDictionary loads a zstd dictionary and provides functions to inspect the content. -func InspectDictionary(b []byte) (interface { - ID() uint32 - ContentSize() int - Content() []byte - Offsets() [3]int - LitEncoder() *huff0.Scratch -}, error) { - initPredefined() - d, err := loadDict(b) - return d, err -} - -type BuildDictOptions struct { - // Dictionary ID. - ID uint32 - - // Content to use to create dictionary tables. - Contents [][]byte - - // History to use for all blocks. - History []byte - - // Offsets to use. - Offsets [3]int - - // CompatV155 will make the dictionary compatible with Zstd v1.5.5 and earlier. - // See https://github.com/facebook/zstd/issues/3724 - CompatV155 bool - - // Use the specified encoder level. - // The dictionary will be built using the specified encoder level, - // which will reflect speed and make the dictionary tailored for that level. - // If not set SpeedBestCompression will be used. - Level EncoderLevel - - // DebugOut will write stats and other details here if set. - DebugOut io.Writer -} - -func BuildDict(o BuildDictOptions) ([]byte, error) { - initPredefined() - hist := o.History - contents := o.Contents - debug := o.DebugOut != nil - println := func(args ...interface{}) { - if o.DebugOut != nil { - fmt.Fprintln(o.DebugOut, args...) - } - } - printf := func(s string, args ...interface{}) { - if o.DebugOut != nil { - fmt.Fprintf(o.DebugOut, s, args...) - } - } - print := func(args ...interface{}) { - if o.DebugOut != nil { - fmt.Fprint(o.DebugOut, args...) - } - } - - if int64(len(hist)) > dictMaxLength { - return nil, fmt.Errorf("dictionary of size %d > %d", len(hist), int64(dictMaxLength)) - } - if len(hist) < 8 { - return nil, fmt.Errorf("dictionary of size %d < %d", len(hist), 8) - } - if len(contents) == 0 { - return nil, errors.New("no content provided") - } - d := dict{ - id: o.ID, - litEnc: nil, - llDec: sequenceDec{}, - ofDec: sequenceDec{}, - mlDec: sequenceDec{}, - offsets: o.Offsets, - content: hist, - } - block := blockEnc{lowMem: false} - block.init() - enc := encoder(&bestFastEncoder{fastBase: fastBase{maxMatchOff: int32(maxMatchLen), bufferReset: math.MaxInt32 - int32(maxMatchLen*2), lowMem: false}}) - if o.Level != 0 { - eOpts := encoderOptions{ - level: o.Level, - blockSize: maxMatchLen, - windowSize: maxMatchLen, - dict: &d, - lowMem: false, - } - enc = eOpts.encoder() - } else { - o.Level = SpeedBestCompression - } - var ( - remain [256]int - ll [256]int - ml [256]int - of [256]int - ) - addValues := func(dst *[256]int, src []byte) { - for _, v := range src { - dst[v]++ - } - } - addHist := func(dst *[256]int, src *[256]uint32) { - for i, v := range src { - dst[i] += int(v) - } - } - seqs := 0 - nUsed := 0 - litTotal := 0 - newOffsets := make(map[uint32]int, 1000) - for _, b := range contents { - block.reset(nil) - if len(b) < 8 { - continue - } - nUsed++ - enc.Reset(&d, true) - enc.Encode(&block, b) - addValues(&remain, block.literals) - litTotal += len(block.literals) - seqs += len(block.sequences) - block.genCodes() - addHist(&ll, block.coders.llEnc.Histogram()) - addHist(&ml, block.coders.mlEnc.Histogram()) - addHist(&of, block.coders.ofEnc.Histogram()) - for i, seq := range block.sequences { - if i > 3 { - break - } - offset := seq.offset - if offset == 0 { - continue - } - if offset > 3 { - newOffsets[offset-3]++ - } else { - newOffsets[uint32(o.Offsets[offset-1])]++ - } - } - } - // Find most used offsets. - var sortedOffsets []uint32 - for k := range newOffsets { - sortedOffsets = append(sortedOffsets, k) - } - sort.Slice(sortedOffsets, func(i, j int) bool { - a, b := sortedOffsets[i], sortedOffsets[j] - if a == b { - // Prefer the longer offset - return sortedOffsets[i] > sortedOffsets[j] - } - return newOffsets[sortedOffsets[i]] > newOffsets[sortedOffsets[j]] - }) - if len(sortedOffsets) > 3 { - if debug { - print("Offsets:") - for i, v := range sortedOffsets { - if i > 20 { - break - } - printf("[%d: %d],", v, newOffsets[v]) - } - println("") - } - - sortedOffsets = sortedOffsets[:3] - } - for i, v := range sortedOffsets { - o.Offsets[i] = int(v) - } - if debug { - println("New repeat offsets", o.Offsets) - } - - if nUsed == 0 || seqs == 0 { - return nil, fmt.Errorf("%d blocks, %d sequences found", nUsed, seqs) - } - if debug { - println("Sequences:", seqs, "Blocks:", nUsed, "Literals:", litTotal) - } - if seqs/nUsed < 512 { - // Use 512 as minimum. - nUsed = seqs / 512 - } - copyHist := func(dst *fseEncoder, src *[256]int) ([]byte, error) { - hist := dst.Histogram() - var maxSym uint8 - var maxCount int - var fakeLength int - for i, v := range src { - if v > 0 { - v = v / nUsed - if v == 0 { - v = 1 - } - } - if v > maxCount { - maxCount = v - } - if v != 0 { - maxSym = uint8(i) - } - fakeLength += v - hist[i] = uint32(v) - } - dst.HistogramFinished(maxSym, maxCount) - dst.reUsed = false - dst.useRLE = false - err := dst.normalizeCount(fakeLength) - if err != nil { - return nil, err - } - if debug { - println("RAW:", dst.count[:maxSym+1], "NORM:", dst.norm[:maxSym+1], "LEN:", fakeLength) - } - return dst.writeCount(nil) - } - if debug { - print("Literal lengths: ") - } - llTable, err := copyHist(block.coders.llEnc, &ll) - if err != nil { - return nil, err - } - if debug { - print("Match lengths: ") - } - mlTable, err := copyHist(block.coders.mlEnc, &ml) - if err != nil { - return nil, err - } - if debug { - print("Offsets: ") - } - ofTable, err := copyHist(block.coders.ofEnc, &of) - if err != nil { - return nil, err - } - - // Literal table - avgSize := litTotal - if avgSize > huff0.BlockSizeMax/2 { - avgSize = huff0.BlockSizeMax / 2 - } - huffBuff := make([]byte, 0, avgSize) - // Target size - div := litTotal / avgSize - if div < 1 { - div = 1 - } - if debug { - println("Huffman weights:") - } - for i, n := range remain[:] { - if n > 0 { - n = n / div - // Allow all entries to be represented. - if n == 0 { - n = 1 - } - huffBuff = append(huffBuff, bytes.Repeat([]byte{byte(i)}, n)...) - if debug { - printf("[%d: %d], ", i, n) - } - } - } - if o.CompatV155 && remain[255]/div == 0 { - huffBuff = append(huffBuff, 255) - } - scratch := &huff0.Scratch{TableLog: 11} - for tries := 0; tries < 255; tries++ { - scratch = &huff0.Scratch{TableLog: 11} - _, _, err = huff0.Compress1X(huffBuff, scratch) - if err == nil { - break - } - if debug { - printf("Try %d: Huffman error: %v\n", tries+1, err) - } - huffBuff = huffBuff[:0] - if tries == 250 { - if debug { - println("Huffman: Bailing out with predefined table") - } - - // Bail out.... Just generate something - huffBuff = append(huffBuff, bytes.Repeat([]byte{255}, 10000)...) - for i := 0; i < 128; i++ { - huffBuff = append(huffBuff, byte(i)) - } - continue - } - if errors.Is(err, huff0.ErrIncompressible) { - // Try truncating least common. - for i, n := range remain[:] { - if n > 0 { - n = n / (div * (i + 1)) - if n > 0 { - huffBuff = append(huffBuff, bytes.Repeat([]byte{byte(i)}, n)...) - } - } - } - if o.CompatV155 && len(huffBuff) > 0 && huffBuff[len(huffBuff)-1] != 255 { - huffBuff = append(huffBuff, 255) - } - if len(huffBuff) == 0 { - huffBuff = append(huffBuff, 0, 255) - } - } - if errors.Is(err, huff0.ErrUseRLE) { - for i, n := range remain[:] { - n = n / (div * (i + 1)) - // Allow all entries to be represented. - if n == 0 { - n = 1 - } - huffBuff = append(huffBuff, bytes.Repeat([]byte{byte(i)}, n)...) - } - } - } - - var out bytes.Buffer - out.Write([]byte(dictMagic)) - out.Write(binary.LittleEndian.AppendUint32(nil, o.ID)) - out.Write(scratch.OutTable) - if debug { - println("huff table:", len(scratch.OutTable), "bytes") - println("of table:", len(ofTable), "bytes") - println("ml table:", len(mlTable), "bytes") - println("ll table:", len(llTable), "bytes") - } - out.Write(ofTable) - out.Write(mlTable) - out.Write(llTable) - out.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[0]))) - out.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[1]))) - out.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[2]))) - out.Write(hist) - if debug { - _, err := loadDict(out.Bytes()) - if err != nil { - panic(err) - } - i, err := InspectDictionary(out.Bytes()) - if err != nil { - panic(err) - } - println("ID:", i.ID()) - println("Content size:", i.ContentSize()) - println("Encoder:", i.LitEncoder() != nil) - println("Offsets:", i.Offsets()) - var totalSize int - for _, b := range contents { - totalSize += len(b) - } - - encWith := func(opts ...EOption) int { - enc, err := NewWriter(nil, opts...) - if err != nil { - panic(err) - } - defer enc.Close() - var dst []byte - var totalSize int - for _, b := range contents { - dst = enc.EncodeAll(b, dst[:0]) - totalSize += len(dst) - } - return totalSize - } - plain := encWith(WithEncoderLevel(o.Level)) - withDict := encWith(WithEncoderLevel(o.Level), WithEncoderDict(out.Bytes())) - println("Input size:", totalSize) - println("Plain Compressed:", plain) - println("Dict Compressed:", withDict) - println("Saved:", plain-withDict, (plain-withDict)/len(contents), "bytes per input (rounded down)") - } - return out.Bytes(), nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/enc_base.go b/vendor/github.com/klauspost/compress/zstd/enc_base.go deleted file mode 100644 index 5ca46038..00000000 --- a/vendor/github.com/klauspost/compress/zstd/enc_base.go +++ /dev/null @@ -1,173 +0,0 @@ -package zstd - -import ( - "fmt" - "math/bits" - - "github.com/klauspost/compress/zstd/internal/xxhash" -) - -const ( - dictShardBits = 6 -) - -type fastBase struct { - // cur is the offset at the start of hist - cur int32 - // maximum offset. Should be at least 2x block size. - maxMatchOff int32 - bufferReset int32 - hist []byte - crc *xxhash.Digest - tmp [8]byte - blk *blockEnc - lastDictID uint32 - lowMem bool -} - -// CRC returns the underlying CRC writer. -func (e *fastBase) CRC() *xxhash.Digest { - return e.crc -} - -// AppendCRC will append the CRC to the destination slice and return it. -func (e *fastBase) AppendCRC(dst []byte) []byte { - crc := e.crc.Sum(e.tmp[:0]) - dst = append(dst, crc[7], crc[6], crc[5], crc[4]) - return dst -} - -// WindowSize returns the window size of the encoder, -// or a window size small enough to contain the input size, if > 0. -func (e *fastBase) WindowSize(size int64) int32 { - if size > 0 && size < int64(e.maxMatchOff) { - b := int32(1) << uint(bits.Len(uint(size))) - // Keep minimum window. - if b < 1024 { - b = 1024 - } - return b - } - return e.maxMatchOff -} - -// Block returns the current block. -func (e *fastBase) Block() *blockEnc { - return e.blk -} - -func (e *fastBase) addBlock(src []byte) int32 { - if debugAsserts && e.cur > e.bufferReset { - panic(fmt.Sprintf("ecur (%d) > buffer reset (%d)", e.cur, e.bufferReset)) - } - // check if we have space already - if len(e.hist)+len(src) > cap(e.hist) { - if cap(e.hist) == 0 { - e.ensureHist(len(src)) - } else { - if cap(e.hist) < int(e.maxMatchOff+maxCompressedBlockSize) { - panic(fmt.Errorf("unexpected buffer cap %d, want at least %d with window %d", cap(e.hist), e.maxMatchOff+maxCompressedBlockSize, e.maxMatchOff)) - } - // Move down - offset := int32(len(e.hist)) - e.maxMatchOff - copy(e.hist[0:e.maxMatchOff], e.hist[offset:]) - e.cur += offset - e.hist = e.hist[:e.maxMatchOff] - } - } - s := int32(len(e.hist)) - e.hist = append(e.hist, src...) - return s -} - -// ensureHist will ensure that history can keep at least this many bytes. -func (e *fastBase) ensureHist(n int) { - if cap(e.hist) >= n { - return - } - l := e.maxMatchOff - if (e.lowMem && e.maxMatchOff > maxCompressedBlockSize) || e.maxMatchOff <= maxCompressedBlockSize { - l += maxCompressedBlockSize - } else { - l += e.maxMatchOff - } - // Make it at least 1MB. - if l < 1<<20 && !e.lowMem { - l = 1 << 20 - } - // Make it at least the requested size. - if l < int32(n) { - l = int32(n) - } - e.hist = make([]byte, 0, l) -} - -// useBlock will replace the block with the provided one, -// but transfer recent offsets from the previous. -func (e *fastBase) UseBlock(enc *blockEnc) { - enc.reset(e.blk) - e.blk = enc -} - -func (e *fastBase) matchlen(s, t int32, src []byte) int32 { - if debugAsserts { - if s < 0 { - err := fmt.Sprintf("s (%d) < 0", s) - panic(err) - } - if t < 0 { - err := fmt.Sprintf("s (%d) < 0", s) - panic(err) - } - if s-t > e.maxMatchOff { - err := fmt.Sprintf("s (%d) - t (%d) > maxMatchOff (%d)", s, t, e.maxMatchOff) - panic(err) - } - if len(src)-int(s) > maxCompressedBlockSize { - panic(fmt.Sprintf("len(src)-s (%d) > maxCompressedBlockSize (%d)", len(src)-int(s), maxCompressedBlockSize)) - } - } - return int32(matchLen(src[s:], src[t:])) -} - -// Reset the encoding table. -func (e *fastBase) resetBase(d *dict, singleBlock bool) { - if e.blk == nil { - e.blk = &blockEnc{lowMem: e.lowMem} - e.blk.init() - } else { - e.blk.reset(nil) - } - e.blk.initNewEncode() - if e.crc == nil { - e.crc = xxhash.New() - } else { - e.crc.Reset() - } - e.blk.dictLitEnc = nil - if d != nil { - low := e.lowMem - if singleBlock { - e.lowMem = true - } - e.ensureHist(d.ContentSize() + maxCompressedBlockSize) - e.lowMem = low - } - - // We offset current position so everything will be out of reach. - // If above reset line, history will be purged. - if e.cur < e.bufferReset { - e.cur += e.maxMatchOff + int32(len(e.hist)) - } - e.hist = e.hist[:0] - if d != nil { - // Set offsets (currently not used) - for i, off := range d.offsets { - e.blk.recentOffsets[i] = uint32(off) - e.blk.prevRecentOffsets[i] = e.blk.recentOffsets[i] - } - // Transfer litenc. - e.blk.dictLitEnc = d.litEnc - e.hist = append(e.hist, d.content...) - } -} diff --git a/vendor/github.com/klauspost/compress/zstd/enc_best.go b/vendor/github.com/klauspost/compress/zstd/enc_best.go deleted file mode 100644 index 9819d414..00000000 --- a/vendor/github.com/klauspost/compress/zstd/enc_best.go +++ /dev/null @@ -1,530 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "bytes" - "fmt" - - "github.com/klauspost/compress" -) - -const ( - bestLongTableBits = 22 // Bits used in the long match table - bestLongTableSize = 1 << bestLongTableBits // Size of the table - bestLongLen = 8 // Bytes used for table hash - - // Note: Increasing the short table bits or making the hash shorter - // can actually lead to compression degradation since it will 'steal' more from the - // long match table and match offsets are quite big. - // This greatly depends on the type of input. - bestShortTableBits = 18 // Bits used in the short match table - bestShortTableSize = 1 << bestShortTableBits // Size of the table - bestShortLen = 4 // Bytes used for table hash - -) - -type match struct { - offset int32 - s int32 - length int32 - rep int32 - est int32 -} - -const highScore = maxMatchLen * 8 - -// estBits will estimate output bits from predefined tables. -func (m *match) estBits(bitsPerByte int32) { - mlc := mlCode(uint32(m.length - zstdMinMatch)) - var ofc uint8 - if m.rep < 0 { - ofc = ofCode(uint32(m.s-m.offset) + 3) - } else { - ofc = ofCode(uint32(m.rep)) - } - // Cost, excluding - ofTT, mlTT := fsePredefEnc[tableOffsets].ct.symbolTT[ofc], fsePredefEnc[tableMatchLengths].ct.symbolTT[mlc] - - // Add cost of match encoding... - m.est = int32(ofTT.outBits + mlTT.outBits) - m.est += int32(ofTT.deltaNbBits>>16 + mlTT.deltaNbBits>>16) - // Subtract savings compared to literal encoding... - m.est -= (m.length * bitsPerByte) >> 10 - if m.est > 0 { - // Unlikely gain.. - m.length = 0 - m.est = highScore - } -} - -// bestFastEncoder uses 2 tables, one for short matches (5 bytes) and one for long matches. -// The long match table contains the previous entry with the same hash, -// effectively making it a "chain" of length 2. -// When we find a long match we choose between the two values and select the longest. -// When we find a short match, after checking the long, we check if we can find a long at n+1 -// and that it is longer (lazy matching). -type bestFastEncoder struct { - fastBase - table [bestShortTableSize]prevEntry - longTable [bestLongTableSize]prevEntry - dictTable []prevEntry - dictLongTable []prevEntry -} - -// Encode improves compression... -func (e *bestFastEncoder) Encode(blk *blockEnc, src []byte) { - const ( - // Input margin is the number of bytes we read (8) - // and the maximum we will read ahead (2) - inputMargin = 8 + 4 - minNonLiteralBlockSize = 16 - ) - - // Protect against e.cur wraparound. - for e.cur >= e.bufferReset-int32(len(e.hist)) { - if len(e.hist) == 0 { - e.table = [bestShortTableSize]prevEntry{} - e.longTable = [bestLongTableSize]prevEntry{} - e.cur = e.maxMatchOff - break - } - // Shift down everything in the table that isn't already too far away. - minOff := e.cur + int32(len(e.hist)) - e.maxMatchOff - for i := range e.table[:] { - v := e.table[i].offset - v2 := e.table[i].prev - if v < minOff { - v = 0 - v2 = 0 - } else { - v = v - e.cur + e.maxMatchOff - if v2 < minOff { - v2 = 0 - } else { - v2 = v2 - e.cur + e.maxMatchOff - } - } - e.table[i] = prevEntry{ - offset: v, - prev: v2, - } - } - for i := range e.longTable[:] { - v := e.longTable[i].offset - v2 := e.longTable[i].prev - if v < minOff { - v = 0 - v2 = 0 - } else { - v = v - e.cur + e.maxMatchOff - if v2 < minOff { - v2 = 0 - } else { - v2 = v2 - e.cur + e.maxMatchOff - } - } - e.longTable[i] = prevEntry{ - offset: v, - prev: v2, - } - } - e.cur = e.maxMatchOff - break - } - - s := e.addBlock(src) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Use this to estimate literal cost. - // Scaled by 10 bits. - bitsPerByte := int32((compress.ShannonEntropyBits(src) * 1024) / len(src)) - // Huffman can never go < 1 bit/byte - if bitsPerByte < 1024 { - bitsPerByte = 1024 - } - - // Override src - src = e.hist - sLimit := int32(len(src)) - inputMargin - const kSearchStrength = 10 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - offset3 := int32(blk.recentOffsets[2]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - // We allow the encoder to optionally turn off repeat offsets across blocks - canRepeat := len(blk.sequences) > 2 - - if debugAsserts && canRepeat && offset1 == 0 { - panic("offset0 was 0") - } - - const goodEnough = 250 - - cv := load6432(src, s) - - nextHashL := hashLen(cv, bestLongTableBits, bestLongLen) - nextHashS := hashLen(cv, bestShortTableBits, bestShortLen) - candidateL := e.longTable[nextHashL] - candidateS := e.table[nextHashS] - - // Set m to a match at offset if it looks like that will improve compression. - improve := func(m *match, offset int32, s int32, first uint32, rep int32) { - if s-offset >= e.maxMatchOff || load3232(src, offset) != first { - return - } - if debugAsserts { - if offset <= 0 { - panic(offset) - } - if !bytes.Equal(src[s:s+4], src[offset:offset+4]) { - panic(fmt.Sprintf("first match mismatch: %v != %v, first: %08x", src[s:s+4], src[offset:offset+4], first)) - } - } - // Try to quick reject if we already have a long match. - if m.length > 16 { - left := len(src) - int(m.s+m.length) - // If we are too close to the end, keep as is. - if left <= 0 { - return - } - checkLen := m.length - (s - m.s) - 8 - if left > 2 && checkLen > 4 { - // Check 4 bytes, 4 bytes from the end of the current match. - a := load3232(src, offset+checkLen) - b := load3232(src, s+checkLen) - if a != b { - return - } - } - } - l := 4 + e.matchlen(s+4, offset+4, src) - if rep < 0 { - // Extend candidate match backwards as far as possible. - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for offset > tMin && s > nextEmit && src[offset-1] == src[s-1] && l < maxMatchLength { - s-- - offset-- - l++ - } - } - - cand := match{offset: offset, s: s, length: l, rep: rep} - cand.estBits(bitsPerByte) - if m.est >= highScore || cand.est-m.est+(cand.s-m.s)*bitsPerByte>>10 < 0 { - *m = cand - } - } - - best := match{s: s, est: highScore} - improve(&best, candidateL.offset-e.cur, s, uint32(cv), -1) - improve(&best, candidateL.prev-e.cur, s, uint32(cv), -1) - improve(&best, candidateS.offset-e.cur, s, uint32(cv), -1) - improve(&best, candidateS.prev-e.cur, s, uint32(cv), -1) - - if canRepeat && best.length < goodEnough { - if s == nextEmit { - // Check repeats straight after a match. - improve(&best, s-offset2, s, uint32(cv), 1|4) - improve(&best, s-offset3, s, uint32(cv), 2|4) - if offset1 > 1 { - improve(&best, s-(offset1-1), s, uint32(cv), 3|4) - } - } - - // If either no match or a non-repeat match, check at + 1 - if best.rep <= 0 { - cv32 := uint32(cv >> 8) - spp := s + 1 - improve(&best, spp-offset1, spp, cv32, 1) - improve(&best, spp-offset2, spp, cv32, 2) - improve(&best, spp-offset3, spp, cv32, 3) - if best.rep < 0 { - cv32 = uint32(cv >> 24) - spp += 2 - improve(&best, spp-offset1, spp, cv32, 1) - improve(&best, spp-offset2, spp, cv32, 2) - improve(&best, spp-offset3, spp, cv32, 3) - } - } - } - // Load next and check... - e.longTable[nextHashL] = prevEntry{offset: s + e.cur, prev: candidateL.offset} - e.table[nextHashS] = prevEntry{offset: s + e.cur, prev: candidateS.offset} - - // Look far ahead, unless we have a really long match already... - if best.length < goodEnough { - // No match found, move forward on input, no need to check forward... - if best.length < 4 { - s += 1 + (s-nextEmit)>>(kSearchStrength-1) - if s >= sLimit { - break encodeLoop - } - continue - } - - candidateS = e.table[hashLen(cv>>8, bestShortTableBits, bestShortLen)] - cv = load6432(src, s+1) - cv2 := load6432(src, s+2) - candidateL = e.longTable[hashLen(cv, bestLongTableBits, bestLongLen)] - candidateL2 := e.longTable[hashLen(cv2, bestLongTableBits, bestLongLen)] - - // Short at s+1 - improve(&best, candidateS.offset-e.cur, s+1, uint32(cv), -1) - // Long at s+1, s+2 - improve(&best, candidateL.offset-e.cur, s+1, uint32(cv), -1) - improve(&best, candidateL.prev-e.cur, s+1, uint32(cv), -1) - improve(&best, candidateL2.offset-e.cur, s+2, uint32(cv2), -1) - improve(&best, candidateL2.prev-e.cur, s+2, uint32(cv2), -1) - if false { - // Short at s+3. - // Too often worse... - improve(&best, e.table[hashLen(cv2>>8, bestShortTableBits, bestShortLen)].offset-e.cur, s+3, uint32(cv2>>8), -1) - } - - // Start check at a fixed offset to allow for a few mismatches. - // For this compression level 2 yields the best results. - // We cannot do this if we have already indexed this position. - const skipBeginning = 2 - if best.s > s-skipBeginning { - // See if we can find a better match by checking where the current best ends. - // Use that offset to see if we can find a better full match. - if sAt := best.s + best.length; sAt < sLimit { - nextHashL := hashLen(load6432(src, sAt), bestLongTableBits, bestLongLen) - candidateEnd := e.longTable[nextHashL] - - if off := candidateEnd.offset - e.cur - best.length + skipBeginning; off >= 0 { - improve(&best, off, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1) - if off := candidateEnd.prev - e.cur - best.length + skipBeginning; off >= 0 { - improve(&best, off, best.s+skipBeginning, load3232(src, best.s+skipBeginning), -1) - } - } - } - } - } - - if debugAsserts { - if !bytes.Equal(src[best.s:best.s+best.length], src[best.offset:best.offset+best.length]) { - panic(fmt.Sprintf("match mismatch: %v != %v", src[best.s:best.s+best.length], src[best.offset:best.offset+best.length])) - } - } - - // We have a match, we can store the forward value - if best.rep > 0 { - var seq seq - seq.matchLen = uint32(best.length - zstdMinMatch) - if debugAsserts && s <= nextEmit { - panic("s <= nextEmit") - } - addLiterals(&seq, best.s) - - // Repeat. If bit 4 is set, this is a non-lit repeat. - seq.offset = uint32(best.rep & 3) - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Index old s + 1 -> s - 1 - index0 := s + 1 - s = best.s + best.length - - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, best.length) - } - break encodeLoop - } - // Index skipped... - off := index0 + e.cur - for index0 < s { - cv0 := load6432(src, index0) - h0 := hashLen(cv0, bestLongTableBits, bestLongLen) - h1 := hashLen(cv0, bestShortTableBits, bestShortLen) - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.table[h1] = prevEntry{offset: off, prev: e.table[h1].offset} - off++ - index0++ - } - switch best.rep { - case 2, 4 | 1: - offset1, offset2 = offset2, offset1 - case 3, 4 | 2: - offset1, offset2, offset3 = offset3, offset1, offset2 - case 4 | 3: - offset1, offset2, offset3 = offset1-1, offset1, offset2 - } - continue - } - - // A 4-byte match has been found. Update recent offsets. - // We'll later see if more than 4 bytes. - index0 := s + 1 - s = best.s - t := best.offset - offset1, offset2, offset3 = s-t, offset1, offset2 - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && int(offset1) > len(src) { - panic("invalid offset") - } - - // Write our sequence - var seq seq - l := best.length - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - - // Index old s + 1 -> s - 1 - for index0 < s { - cv0 := load6432(src, index0) - h0 := hashLen(cv0, bestLongTableBits, bestLongLen) - h1 := hashLen(cv0, bestShortTableBits, bestShortLen) - off := index0 + e.cur - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.table[h1] = prevEntry{offset: off, prev: e.table[h1].offset} - index0++ - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - blk.recentOffsets[0] = uint32(offset1) - blk.recentOffsets[1] = uint32(offset2) - blk.recentOffsets[2] = uint32(offset3) - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } -} - -// EncodeNoHist will encode a block with no history and no following blocks. -// Most notable difference is that src will not be copied for history and -// we do not need to check for max match length. -func (e *bestFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) { - e.ensureHist(len(src)) - e.Encode(blk, src) -} - -// Reset will reset and set a dictionary if not nil -func (e *bestFastEncoder) Reset(d *dict, singleBlock bool) { - e.resetBase(d, singleBlock) - if d == nil { - return - } - // Init or copy dict table - if len(e.dictTable) != len(e.table) || d.id != e.lastDictID { - if len(e.dictTable) != len(e.table) { - e.dictTable = make([]prevEntry, len(e.table)) - } - end := int32(len(d.content)) - 8 + e.maxMatchOff - for i := e.maxMatchOff; i < end; i += 4 { - const hashLog = bestShortTableBits - - cv := load6432(d.content, i-e.maxMatchOff) - nextHash := hashLen(cv, hashLog, bestShortLen) // 0 -> 4 - nextHash1 := hashLen(cv>>8, hashLog, bestShortLen) // 1 -> 5 - nextHash2 := hashLen(cv>>16, hashLog, bestShortLen) // 2 -> 6 - nextHash3 := hashLen(cv>>24, hashLog, bestShortLen) // 3 -> 7 - e.dictTable[nextHash] = prevEntry{ - prev: e.dictTable[nextHash].offset, - offset: i, - } - e.dictTable[nextHash1] = prevEntry{ - prev: e.dictTable[nextHash1].offset, - offset: i + 1, - } - e.dictTable[nextHash2] = prevEntry{ - prev: e.dictTable[nextHash2].offset, - offset: i + 2, - } - e.dictTable[nextHash3] = prevEntry{ - prev: e.dictTable[nextHash3].offset, - offset: i + 3, - } - } - e.lastDictID = d.id - } - - // Init or copy dict table - if len(e.dictLongTable) != len(e.longTable) || d.id != e.lastDictID { - if len(e.dictLongTable) != len(e.longTable) { - e.dictLongTable = make([]prevEntry, len(e.longTable)) - } - if len(d.content) >= 8 { - cv := load6432(d.content, 0) - h := hashLen(cv, bestLongTableBits, bestLongLen) - e.dictLongTable[h] = prevEntry{ - offset: e.maxMatchOff, - prev: e.dictLongTable[h].offset, - } - - end := int32(len(d.content)) - 8 + e.maxMatchOff - off := 8 // First to read - for i := e.maxMatchOff + 1; i < end; i++ { - cv = cv>>8 | (uint64(d.content[off]) << 56) - h := hashLen(cv, bestLongTableBits, bestLongLen) - e.dictLongTable[h] = prevEntry{ - offset: i, - prev: e.dictLongTable[h].offset, - } - off++ - } - } - e.lastDictID = d.id - } - // Reset table to initial state - copy(e.longTable[:], e.dictLongTable) - - e.cur = e.maxMatchOff - // Reset table to initial state - copy(e.table[:], e.dictTable) -} diff --git a/vendor/github.com/klauspost/compress/zstd/enc_better.go b/vendor/github.com/klauspost/compress/zstd/enc_better.go deleted file mode 100644 index 8582f31a..00000000 --- a/vendor/github.com/klauspost/compress/zstd/enc_better.go +++ /dev/null @@ -1,1242 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import "fmt" - -const ( - betterLongTableBits = 19 // Bits used in the long match table - betterLongTableSize = 1 << betterLongTableBits // Size of the table - betterLongLen = 8 // Bytes used for table hash - - // Note: Increasing the short table bits or making the hash shorter - // can actually lead to compression degradation since it will 'steal' more from the - // long match table and match offsets are quite big. - // This greatly depends on the type of input. - betterShortTableBits = 13 // Bits used in the short match table - betterShortTableSize = 1 << betterShortTableBits // Size of the table - betterShortLen = 5 // Bytes used for table hash - - betterLongTableShardCnt = 1 << (betterLongTableBits - dictShardBits) // Number of shards in the table - betterLongTableShardSize = betterLongTableSize / betterLongTableShardCnt // Size of an individual shard - - betterShortTableShardCnt = 1 << (betterShortTableBits - dictShardBits) // Number of shards in the table - betterShortTableShardSize = betterShortTableSize / betterShortTableShardCnt // Size of an individual shard -) - -type prevEntry struct { - offset int32 - prev int32 -} - -// betterFastEncoder uses 2 tables, one for short matches (5 bytes) and one for long matches. -// The long match table contains the previous entry with the same hash, -// effectively making it a "chain" of length 2. -// When we find a long match we choose between the two values and select the longest. -// When we find a short match, after checking the long, we check if we can find a long at n+1 -// and that it is longer (lazy matching). -type betterFastEncoder struct { - fastBase - table [betterShortTableSize]tableEntry - longTable [betterLongTableSize]prevEntry -} - -type betterFastEncoderDict struct { - betterFastEncoder - dictTable []tableEntry - dictLongTable []prevEntry - shortTableShardDirty [betterShortTableShardCnt]bool - longTableShardDirty [betterLongTableShardCnt]bool - allDirty bool -} - -// Encode improves compression... -func (e *betterFastEncoder) Encode(blk *blockEnc, src []byte) { - const ( - // Input margin is the number of bytes we read (8) - // and the maximum we will read ahead (2) - inputMargin = 8 + 2 - minNonLiteralBlockSize = 16 - ) - - // Protect against e.cur wraparound. - for e.cur >= e.bufferReset-int32(len(e.hist)) { - if len(e.hist) == 0 { - e.table = [betterShortTableSize]tableEntry{} - e.longTable = [betterLongTableSize]prevEntry{} - e.cur = e.maxMatchOff - break - } - // Shift down everything in the table that isn't already too far away. - minOff := e.cur + int32(len(e.hist)) - e.maxMatchOff - for i := range e.table[:] { - v := e.table[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.table[i].offset = v - } - for i := range e.longTable[:] { - v := e.longTable[i].offset - v2 := e.longTable[i].prev - if v < minOff { - v = 0 - v2 = 0 - } else { - v = v - e.cur + e.maxMatchOff - if v2 < minOff { - v2 = 0 - } else { - v2 = v2 - e.cur + e.maxMatchOff - } - } - e.longTable[i] = prevEntry{ - offset: v, - prev: v2, - } - } - e.cur = e.maxMatchOff - break - } - - s := e.addBlock(src) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Override src - src = e.hist - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 1. - const stepSize = 1 - - const kSearchStrength = 9 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - var t int32 - // We allow the encoder to optionally turn off repeat offsets across blocks - canRepeat := len(blk.sequences) > 2 - var matched int32 - - for { - if debugAsserts && canRepeat && offset1 == 0 { - panic("offset0 was 0") - } - - nextHashL := hashLen(cv, betterLongTableBits, betterLongLen) - nextHashS := hashLen(cv, betterShortTableBits, betterShortLen) - candidateL := e.longTable[nextHashL] - candidateS := e.table[nextHashS] - - const repOff = 1 - repIndex := s - offset1 + repOff - off := s + e.cur - e.longTable[nextHashL] = prevEntry{offset: off, prev: candidateL.offset} - e.table[nextHashS] = tableEntry{offset: off, val: uint32(cv)} - - if canRepeat { - if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { - // Consider history as well. - var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - - seq.matchLen = uint32(lenght - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + repOff - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Index match start+1 (long) -> s - 1 - index0 := s + repOff - s += lenght + repOff - - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, lenght) - - } - break encodeLoop - } - // Index skipped... - for index0 < s-1 { - cv0 := load6432(src, index0) - cv1 := cv0 >> 8 - h0 := hashLen(cv0, betterLongTableBits, betterLongLen) - off := index0 + e.cur - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.table[hashLen(cv1, betterShortTableBits, betterShortLen)] = tableEntry{offset: off + 1, val: uint32(cv1)} - index0 += 2 - } - cv = load6432(src, s) - continue - } - const repOff2 = 1 - - // We deviate from the reference encoder and also check offset 2. - // Still slower and not much better, so disabled. - // repIndex = s - offset2 + repOff2 - if false && repIndex >= 0 && load6432(src, repIndex) == load6432(src, s+repOff) { - // Consider history as well. - var seq seq - lenght := 8 + e.matchlen(s+8+repOff2, repIndex+8, src) - - seq.matchLen = uint32(lenght - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + repOff2 - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 2 - seq.offset = 2 - if debugSequences { - println("repeat sequence 2", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - index0 := s + repOff2 - s += lenght + repOff2 - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, lenght) - - } - break encodeLoop - } - - // Index skipped... - for index0 < s-1 { - cv0 := load6432(src, index0) - cv1 := cv0 >> 8 - h0 := hashLen(cv0, betterLongTableBits, betterLongLen) - off := index0 + e.cur - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.table[hashLen(cv1, betterShortTableBits, betterShortLen)] = tableEntry{offset: off + 1, val: uint32(cv1)} - index0 += 2 - } - cv = load6432(src, s) - // Swap offsets - offset1, offset2 = offset2, offset1 - continue - } - } - // Find the offsets of our two matches. - coffsetL := candidateL.offset - e.cur - coffsetLP := candidateL.prev - e.cur - - // Check if we have a long match. - if s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) { - // Found a long match, at least 8 bytes. - matched = e.matchlen(s+8, coffsetL+8, src) + 8 - t = coffsetL - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - - if s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) { - // Found a long match, at least 8 bytes. - prevMatch := e.matchlen(s+8, coffsetLP+8, src) + 8 - if prevMatch > matched { - matched = prevMatch - t = coffsetLP - } - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - } - break - } - - // Check if we have a long match on prev. - if s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) { - // Found a long match, at least 8 bytes. - matched = e.matchlen(s+8, coffsetLP+8, src) + 8 - t = coffsetLP - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - break - } - - coffsetS := candidateS.offset - e.cur - - // Check if we have a short match. - if s-coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val { - // found a regular match - matched = e.matchlen(s+4, coffsetS+4, src) + 4 - - // See if we can find a long match at s+1 - const checkAt = 1 - cv := load6432(src, s+checkAt) - nextHashL = hashLen(cv, betterLongTableBits, betterLongLen) - candidateL = e.longTable[nextHashL] - coffsetL = candidateL.offset - e.cur - - // We can store it, since we have at least a 4 byte match. - e.longTable[nextHashL] = prevEntry{offset: s + checkAt + e.cur, prev: candidateL.offset} - if s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) { - // Found a long match, at least 8 bytes. - matchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8 - if matchedNext > matched { - t = coffsetL - s += checkAt - matched = matchedNext - if debugMatches { - println("long match (after short)") - } - break - } - } - - // Check prev long... - coffsetL = candidateL.prev - e.cur - if s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) { - // Found a long match, at least 8 bytes. - matchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8 - if matchedNext > matched { - t = coffsetL - s += checkAt - matched = matchedNext - if debugMatches { - println("prev long match (after short)") - } - break - } - } - t = coffsetS - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - if debugMatches { - println("short match") - } - break - } - - // No match found, move forward in input. - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - - // Try to find a better match by searching for a long match at the end of the current best match - if s+matched < sLimit { - // Allow some bytes at the beginning to mismatch. - // Sweet spot is around 3 bytes, but depends on input. - // The skipped bytes are tested in Extend backwards, - // and still picked up as part of the match if they do. - const skipBeginning = 3 - - nextHashL := hashLen(load6432(src, s+matched), betterLongTableBits, betterLongLen) - s2 := s + skipBeginning - cv := load3232(src, s2) - candidateL := e.longTable[nextHashL] - coffsetL := candidateL.offset - e.cur - matched + skipBeginning - if coffsetL >= 0 && coffsetL < s2 && s2-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) { - // Found a long match, at least 4 bytes. - matchedNext := e.matchlen(s2+4, coffsetL+4, src) + 4 - if matchedNext > matched { - t = coffsetL - s = s2 - matched = matchedNext - if debugMatches { - println("long match at end-of-match") - } - } - } - - // Check prev long... - if true { - coffsetL = candidateL.prev - e.cur - matched + skipBeginning - if coffsetL >= 0 && coffsetL < s2 && s2-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) { - // Found a long match, at least 4 bytes. - matchedNext := e.matchlen(s2+4, coffsetL+4, src) + 4 - if matchedNext > matched { - t = coffsetL - s = s2 - matched = matchedNext - if debugMatches { - println("prev long match at end-of-match") - } - } - } - } - } - // A match has been found. Update recent offsets. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && canRepeat && int(offset1) > len(src) { - panic("invalid offset") - } - - // Extend the n-byte match as long as possible. - l := matched - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength { - s-- - t-- - l++ - } - - // Write our sequence - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - - // Index match start+1 (long) -> s - 1 - index0 := s - l + 1 - for index0 < s-1 { - cv0 := load6432(src, index0) - cv1 := cv0 >> 8 - h0 := hashLen(cv0, betterLongTableBits, betterLongLen) - off := index0 + e.cur - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.table[hashLen(cv1, betterShortTableBits, betterShortLen)] = tableEntry{offset: off + 1, val: uint32(cv1)} - index0 += 2 - } - - cv = load6432(src, s) - if !canRepeat { - continue - } - - // Check offset 2 - for { - o2 := s - offset2 - if load3232(src, o2) != uint32(cv) { - // Do regular search - break - } - - // Store this, since we have it. - nextHashL := hashLen(cv, betterLongTableBits, betterLongLen) - nextHashS := hashLen(cv, betterShortTableBits, betterShortLen) - - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - l := 4 + e.matchlen(s+4, o2+4, src) - - e.longTable[nextHashL] = prevEntry{offset: s + e.cur, prev: e.longTable[nextHashL].offset} - e.table[nextHashS] = tableEntry{offset: s + e.cur, val: uint32(cv)} - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - // Finished - break encodeLoop - } - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - blk.recentOffsets[0] = uint32(offset1) - blk.recentOffsets[1] = uint32(offset2) - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } -} - -// EncodeNoHist will encode a block with no history and no following blocks. -// Most notable difference is that src will not be copied for history and -// we do not need to check for max match length. -func (e *betterFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) { - e.ensureHist(len(src)) - e.Encode(blk, src) -} - -// Encode improves compression... -func (e *betterFastEncoderDict) Encode(blk *blockEnc, src []byte) { - const ( - // Input margin is the number of bytes we read (8) - // and the maximum we will read ahead (2) - inputMargin = 8 + 2 - minNonLiteralBlockSize = 16 - ) - - // Protect against e.cur wraparound. - for e.cur >= e.bufferReset-int32(len(e.hist)) { - if len(e.hist) == 0 { - for i := range e.table[:] { - e.table[i] = tableEntry{} - } - for i := range e.longTable[:] { - e.longTable[i] = prevEntry{} - } - e.cur = e.maxMatchOff - e.allDirty = true - break - } - // Shift down everything in the table that isn't already too far away. - minOff := e.cur + int32(len(e.hist)) - e.maxMatchOff - for i := range e.table[:] { - v := e.table[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.table[i].offset = v - } - for i := range e.longTable[:] { - v := e.longTable[i].offset - v2 := e.longTable[i].prev - if v < minOff { - v = 0 - v2 = 0 - } else { - v = v - e.cur + e.maxMatchOff - if v2 < minOff { - v2 = 0 - } else { - v2 = v2 - e.cur + e.maxMatchOff - } - } - e.longTable[i] = prevEntry{ - offset: v, - prev: v2, - } - } - e.allDirty = true - e.cur = e.maxMatchOff - break - } - - s := e.addBlock(src) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Override src - src = e.hist - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 1. - const stepSize = 1 - - const kSearchStrength = 9 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - var t int32 - // We allow the encoder to optionally turn off repeat offsets across blocks - canRepeat := len(blk.sequences) > 2 - var matched int32 - - for { - if debugAsserts && canRepeat && offset1 == 0 { - panic("offset0 was 0") - } - - nextHashL := hashLen(cv, betterLongTableBits, betterLongLen) - nextHashS := hashLen(cv, betterShortTableBits, betterShortLen) - candidateL := e.longTable[nextHashL] - candidateS := e.table[nextHashS] - - const repOff = 1 - repIndex := s - offset1 + repOff - off := s + e.cur - e.longTable[nextHashL] = prevEntry{offset: off, prev: candidateL.offset} - e.markLongShardDirty(nextHashL) - e.table[nextHashS] = tableEntry{offset: off, val: uint32(cv)} - e.markShortShardDirty(nextHashS) - - if canRepeat { - if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { - // Consider history as well. - var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - - seq.matchLen = uint32(lenght - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + repOff - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Index match start+1 (long) -> s - 1 - index0 := s + repOff - s += lenght + repOff - - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, lenght) - - } - break encodeLoop - } - // Index skipped... - for index0 < s-1 { - cv0 := load6432(src, index0) - cv1 := cv0 >> 8 - h0 := hashLen(cv0, betterLongTableBits, betterLongLen) - off := index0 + e.cur - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.markLongShardDirty(h0) - h1 := hashLen(cv1, betterShortTableBits, betterShortLen) - e.table[h1] = tableEntry{offset: off + 1, val: uint32(cv1)} - e.markShortShardDirty(h1) - index0 += 2 - } - cv = load6432(src, s) - continue - } - const repOff2 = 1 - - // We deviate from the reference encoder and also check offset 2. - // Still slower and not much better, so disabled. - // repIndex = s - offset2 + repOff2 - if false && repIndex >= 0 && load6432(src, repIndex) == load6432(src, s+repOff) { - // Consider history as well. - var seq seq - lenght := 8 + e.matchlen(s+8+repOff2, repIndex+8, src) - - seq.matchLen = uint32(lenght - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + repOff2 - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 2 - seq.offset = 2 - if debugSequences { - println("repeat sequence 2", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - index0 := s + repOff2 - s += lenght + repOff2 - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, lenght) - - } - break encodeLoop - } - - // Index skipped... - for index0 < s-1 { - cv0 := load6432(src, index0) - cv1 := cv0 >> 8 - h0 := hashLen(cv0, betterLongTableBits, betterLongLen) - off := index0 + e.cur - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.markLongShardDirty(h0) - h1 := hashLen(cv1, betterShortTableBits, betterShortLen) - e.table[h1] = tableEntry{offset: off + 1, val: uint32(cv1)} - e.markShortShardDirty(h1) - index0 += 2 - } - cv = load6432(src, s) - // Swap offsets - offset1, offset2 = offset2, offset1 - continue - } - } - // Find the offsets of our two matches. - coffsetL := candidateL.offset - e.cur - coffsetLP := candidateL.prev - e.cur - - // Check if we have a long match. - if s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) { - // Found a long match, at least 8 bytes. - matched = e.matchlen(s+8, coffsetL+8, src) + 8 - t = coffsetL - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - - if s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) { - // Found a long match, at least 8 bytes. - prevMatch := e.matchlen(s+8, coffsetLP+8, src) + 8 - if prevMatch > matched { - matched = prevMatch - t = coffsetLP - } - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - } - break - } - - // Check if we have a long match on prev. - if s-coffsetLP < e.maxMatchOff && cv == load6432(src, coffsetLP) { - // Found a long match, at least 8 bytes. - matched = e.matchlen(s+8, coffsetLP+8, src) + 8 - t = coffsetLP - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - break - } - - coffsetS := candidateS.offset - e.cur - - // Check if we have a short match. - if s-coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val { - // found a regular match - matched = e.matchlen(s+4, coffsetS+4, src) + 4 - - // See if we can find a long match at s+1 - const checkAt = 1 - cv := load6432(src, s+checkAt) - nextHashL = hashLen(cv, betterLongTableBits, betterLongLen) - candidateL = e.longTable[nextHashL] - coffsetL = candidateL.offset - e.cur - - // We can store it, since we have at least a 4 byte match. - e.longTable[nextHashL] = prevEntry{offset: s + checkAt + e.cur, prev: candidateL.offset} - e.markLongShardDirty(nextHashL) - if s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) { - // Found a long match, at least 8 bytes. - matchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8 - if matchedNext > matched { - t = coffsetL - s += checkAt - matched = matchedNext - if debugMatches { - println("long match (after short)") - } - break - } - } - - // Check prev long... - coffsetL = candidateL.prev - e.cur - if s-coffsetL < e.maxMatchOff && cv == load6432(src, coffsetL) { - // Found a long match, at least 8 bytes. - matchedNext := e.matchlen(s+8+checkAt, coffsetL+8, src) + 8 - if matchedNext > matched { - t = coffsetL - s += checkAt - matched = matchedNext - if debugMatches { - println("prev long match (after short)") - } - break - } - } - t = coffsetS - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - if debugMatches { - println("short match") - } - break - } - - // No match found, move forward in input. - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - // Try to find a better match by searching for a long match at the end of the current best match - if s+matched < sLimit { - nextHashL := hashLen(load6432(src, s+matched), betterLongTableBits, betterLongLen) - cv := load3232(src, s) - candidateL := e.longTable[nextHashL] - coffsetL := candidateL.offset - e.cur - matched - if coffsetL >= 0 && coffsetL < s && s-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) { - // Found a long match, at least 4 bytes. - matchedNext := e.matchlen(s+4, coffsetL+4, src) + 4 - if matchedNext > matched { - t = coffsetL - matched = matchedNext - if debugMatches { - println("long match at end-of-match") - } - } - } - - // Check prev long... - if true { - coffsetL = candidateL.prev - e.cur - matched - if coffsetL >= 0 && coffsetL < s && s-coffsetL < e.maxMatchOff && cv == load3232(src, coffsetL) { - // Found a long match, at least 4 bytes. - matchedNext := e.matchlen(s+4, coffsetL+4, src) + 4 - if matchedNext > matched { - t = coffsetL - matched = matchedNext - if debugMatches { - println("prev long match at end-of-match") - } - } - } - } - } - // A match has been found. Update recent offsets. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && canRepeat && int(offset1) > len(src) { - panic("invalid offset") - } - - // Extend the n-byte match as long as possible. - l := matched - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength { - s-- - t-- - l++ - } - - // Write our sequence - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - - // Index match start+1 (long) -> s - 1 - index0 := s - l + 1 - for index0 < s-1 { - cv0 := load6432(src, index0) - cv1 := cv0 >> 8 - h0 := hashLen(cv0, betterLongTableBits, betterLongLen) - off := index0 + e.cur - e.longTable[h0] = prevEntry{offset: off, prev: e.longTable[h0].offset} - e.markLongShardDirty(h0) - h1 := hashLen(cv1, betterShortTableBits, betterShortLen) - e.table[h1] = tableEntry{offset: off + 1, val: uint32(cv1)} - e.markShortShardDirty(h1) - index0 += 2 - } - - cv = load6432(src, s) - if !canRepeat { - continue - } - - // Check offset 2 - for { - o2 := s - offset2 - if load3232(src, o2) != uint32(cv) { - // Do regular search - break - } - - // Store this, since we have it. - nextHashL := hashLen(cv, betterLongTableBits, betterLongLen) - nextHashS := hashLen(cv, betterShortTableBits, betterShortLen) - - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - l := 4 + e.matchlen(s+4, o2+4, src) - - e.longTable[nextHashL] = prevEntry{offset: s + e.cur, prev: e.longTable[nextHashL].offset} - e.markLongShardDirty(nextHashL) - e.table[nextHashS] = tableEntry{offset: s + e.cur, val: uint32(cv)} - e.markShortShardDirty(nextHashS) - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - // Finished - break encodeLoop - } - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - blk.recentOffsets[0] = uint32(offset1) - blk.recentOffsets[1] = uint32(offset2) - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } -} - -// ResetDict will reset and set a dictionary if not nil -func (e *betterFastEncoder) Reset(d *dict, singleBlock bool) { - e.resetBase(d, singleBlock) - if d != nil { - panic("betterFastEncoder: Reset with dict") - } -} - -// ResetDict will reset and set a dictionary if not nil -func (e *betterFastEncoderDict) Reset(d *dict, singleBlock bool) { - e.resetBase(d, singleBlock) - if d == nil { - return - } - // Init or copy dict table - if len(e.dictTable) != len(e.table) || d.id != e.lastDictID { - if len(e.dictTable) != len(e.table) { - e.dictTable = make([]tableEntry, len(e.table)) - } - end := int32(len(d.content)) - 8 + e.maxMatchOff - for i := e.maxMatchOff; i < end; i += 4 { - const hashLog = betterShortTableBits - - cv := load6432(d.content, i-e.maxMatchOff) - nextHash := hashLen(cv, hashLog, betterShortLen) // 0 -> 4 - nextHash1 := hashLen(cv>>8, hashLog, betterShortLen) // 1 -> 5 - nextHash2 := hashLen(cv>>16, hashLog, betterShortLen) // 2 -> 6 - nextHash3 := hashLen(cv>>24, hashLog, betterShortLen) // 3 -> 7 - e.dictTable[nextHash] = tableEntry{ - val: uint32(cv), - offset: i, - } - e.dictTable[nextHash1] = tableEntry{ - val: uint32(cv >> 8), - offset: i + 1, - } - e.dictTable[nextHash2] = tableEntry{ - val: uint32(cv >> 16), - offset: i + 2, - } - e.dictTable[nextHash3] = tableEntry{ - val: uint32(cv >> 24), - offset: i + 3, - } - } - e.lastDictID = d.id - e.allDirty = true - } - - // Init or copy dict table - if len(e.dictLongTable) != len(e.longTable) || d.id != e.lastDictID { - if len(e.dictLongTable) != len(e.longTable) { - e.dictLongTable = make([]prevEntry, len(e.longTable)) - } - if len(d.content) >= 8 { - cv := load6432(d.content, 0) - h := hashLen(cv, betterLongTableBits, betterLongLen) - e.dictLongTable[h] = prevEntry{ - offset: e.maxMatchOff, - prev: e.dictLongTable[h].offset, - } - - end := int32(len(d.content)) - 8 + e.maxMatchOff - off := 8 // First to read - for i := e.maxMatchOff + 1; i < end; i++ { - cv = cv>>8 | (uint64(d.content[off]) << 56) - h := hashLen(cv, betterLongTableBits, betterLongLen) - e.dictLongTable[h] = prevEntry{ - offset: i, - prev: e.dictLongTable[h].offset, - } - off++ - } - } - e.lastDictID = d.id - e.allDirty = true - } - - // Reset table to initial state - { - dirtyShardCnt := 0 - if !e.allDirty { - for i := range e.shortTableShardDirty { - if e.shortTableShardDirty[i] { - dirtyShardCnt++ - } - } - } - const shardCnt = betterShortTableShardCnt - const shardSize = betterShortTableShardSize - if e.allDirty || dirtyShardCnt > shardCnt*4/6 { - copy(e.table[:], e.dictTable) - for i := range e.shortTableShardDirty { - e.shortTableShardDirty[i] = false - } - } else { - for i := range e.shortTableShardDirty { - if !e.shortTableShardDirty[i] { - continue - } - - copy(e.table[i*shardSize:(i+1)*shardSize], e.dictTable[i*shardSize:(i+1)*shardSize]) - e.shortTableShardDirty[i] = false - } - } - } - { - dirtyShardCnt := 0 - if !e.allDirty { - for i := range e.shortTableShardDirty { - if e.shortTableShardDirty[i] { - dirtyShardCnt++ - } - } - } - const shardCnt = betterLongTableShardCnt - const shardSize = betterLongTableShardSize - if e.allDirty || dirtyShardCnt > shardCnt*4/6 { - copy(e.longTable[:], e.dictLongTable) - for i := range e.longTableShardDirty { - e.longTableShardDirty[i] = false - } - } else { - for i := range e.longTableShardDirty { - if !e.longTableShardDirty[i] { - continue - } - - copy(e.longTable[i*shardSize:(i+1)*shardSize], e.dictLongTable[i*shardSize:(i+1)*shardSize]) - e.longTableShardDirty[i] = false - } - } - } - e.cur = e.maxMatchOff - e.allDirty = false -} - -func (e *betterFastEncoderDict) markLongShardDirty(entryNum uint32) { - e.longTableShardDirty[entryNum/betterLongTableShardSize] = true -} - -func (e *betterFastEncoderDict) markShortShardDirty(entryNum uint32) { - e.shortTableShardDirty[entryNum/betterShortTableShardSize] = true -} diff --git a/vendor/github.com/klauspost/compress/zstd/enc_dfast.go b/vendor/github.com/klauspost/compress/zstd/enc_dfast.go deleted file mode 100644 index a154c18f..00000000 --- a/vendor/github.com/klauspost/compress/zstd/enc_dfast.go +++ /dev/null @@ -1,1123 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import "fmt" - -const ( - dFastLongTableBits = 17 // Bits used in the long match table - dFastLongTableSize = 1 << dFastLongTableBits // Size of the table - dFastLongTableMask = dFastLongTableSize - 1 // Mask for table indices. Redundant, but can eliminate bounds checks. - dFastLongLen = 8 // Bytes used for table hash - - dLongTableShardCnt = 1 << (dFastLongTableBits - dictShardBits) // Number of shards in the table - dLongTableShardSize = dFastLongTableSize / tableShardCnt // Size of an individual shard - - dFastShortTableBits = tableBits // Bits used in the short match table - dFastShortTableSize = 1 << dFastShortTableBits // Size of the table - dFastShortTableMask = dFastShortTableSize - 1 // Mask for table indices. Redundant, but can eliminate bounds checks. - dFastShortLen = 5 // Bytes used for table hash - -) - -type doubleFastEncoder struct { - fastEncoder - longTable [dFastLongTableSize]tableEntry -} - -type doubleFastEncoderDict struct { - fastEncoderDict - longTable [dFastLongTableSize]tableEntry - dictLongTable []tableEntry - longTableShardDirty [dLongTableShardCnt]bool -} - -// Encode mimmics functionality in zstd_dfast.c -func (e *doubleFastEncoder) Encode(blk *blockEnc, src []byte) { - const ( - // Input margin is the number of bytes we read (8) - // and the maximum we will read ahead (2) - inputMargin = 8 + 2 - minNonLiteralBlockSize = 16 - ) - - // Protect against e.cur wraparound. - for e.cur >= e.bufferReset-int32(len(e.hist)) { - if len(e.hist) == 0 { - e.table = [dFastShortTableSize]tableEntry{} - e.longTable = [dFastLongTableSize]tableEntry{} - e.cur = e.maxMatchOff - break - } - // Shift down everything in the table that isn't already too far away. - minOff := e.cur + int32(len(e.hist)) - e.maxMatchOff - for i := range e.table[:] { - v := e.table[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.table[i].offset = v - } - for i := range e.longTable[:] { - v := e.longTable[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.longTable[i].offset = v - } - e.cur = e.maxMatchOff - break - } - - s := e.addBlock(src) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Override src - src = e.hist - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 1. - const stepSize = 1 - - const kSearchStrength = 8 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - var t int32 - // We allow the encoder to optionally turn off repeat offsets across blocks - canRepeat := len(blk.sequences) > 2 - - for { - if debugAsserts && canRepeat && offset1 == 0 { - panic("offset0 was 0") - } - - nextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen) - nextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen) - candidateL := e.longTable[nextHashL] - candidateS := e.table[nextHashS] - - const repOff = 1 - repIndex := s - offset1 + repOff - entry := tableEntry{offset: s + e.cur, val: uint32(cv)} - e.longTable[nextHashL] = entry - e.table[nextHashS] = entry - - if canRepeat { - if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { - // Consider history as well. - var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - - seq.matchLen = uint32(lenght - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + repOff - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - s += lenght + repOff - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, lenght) - - } - break encodeLoop - } - cv = load6432(src, s) - continue - } - } - // Find the offsets of our two matches. - coffsetL := s - (candidateL.offset - e.cur) - coffsetS := s - (candidateS.offset - e.cur) - - // Check if we have a long match. - if coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val { - // Found a long match, likely at least 8 bytes. - // Reference encoder checks all 8 bytes, we only check 4, - // but the likelihood of both the first 4 bytes and the hash matching should be enough. - t = candidateL.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - break - } - - // Check if we have a short match. - if coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val { - // found a regular match - // See if we can find a long match at s+1 - const checkAt = 1 - cv := load6432(src, s+checkAt) - nextHashL = hashLen(cv, dFastLongTableBits, dFastLongLen) - candidateL = e.longTable[nextHashL] - coffsetL = s - (candidateL.offset - e.cur) + checkAt - - // We can store it, since we have at least a 4 byte match. - e.longTable[nextHashL] = tableEntry{offset: s + checkAt + e.cur, val: uint32(cv)} - if coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val { - // Found a long match, likely at least 8 bytes. - // Reference encoder checks all 8 bytes, we only check 4, - // but the likelihood of both the first 4 bytes and the hash matching should be enough. - t = candidateL.offset - e.cur - s += checkAt - if debugMatches { - println("long match (after short)") - } - break - } - - t = candidateS.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - if debugMatches { - println("short match") - } - break - } - - // No match found, move forward in input. - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - - // A 4-byte match has been found. Update recent offsets. - // We'll later see if more than 4 bytes. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && canRepeat && int(offset1) > len(src) { - panic("invalid offset") - } - - // Extend the 4-byte match as long as possible. - l := e.matchlen(s+4, t+4, src) + 4 - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength { - s-- - t-- - l++ - } - - // Write our sequence - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - - // Index match start+1 (long) and start+2 (short) - index0 := s - l + 1 - // Index match end-2 (long) and end-1 (short) - index1 := s - 2 - - cv0 := load6432(src, index0) - cv1 := load6432(src, index1) - te0 := tableEntry{offset: index0 + e.cur, val: uint32(cv0)} - te1 := tableEntry{offset: index1 + e.cur, val: uint32(cv1)} - e.longTable[hashLen(cv0, dFastLongTableBits, dFastLongLen)] = te0 - e.longTable[hashLen(cv1, dFastLongTableBits, dFastLongLen)] = te1 - cv0 >>= 8 - cv1 >>= 8 - te0.offset++ - te1.offset++ - te0.val = uint32(cv0) - te1.val = uint32(cv1) - e.table[hashLen(cv0, dFastShortTableBits, dFastShortLen)] = te0 - e.table[hashLen(cv1, dFastShortTableBits, dFastShortLen)] = te1 - - cv = load6432(src, s) - - if !canRepeat { - continue - } - - // Check offset 2 - for { - o2 := s - offset2 - if load3232(src, o2) != uint32(cv) { - // Do regular search - break - } - - // Store this, since we have it. - nextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen) - nextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen) - - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - l := 4 + e.matchlen(s+4, o2+4, src) - - entry := tableEntry{offset: s + e.cur, val: uint32(cv)} - e.longTable[nextHashL] = entry - e.table[nextHashS] = entry - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - // Finished - break encodeLoop - } - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - blk.recentOffsets[0] = uint32(offset1) - blk.recentOffsets[1] = uint32(offset2) - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } -} - -// EncodeNoHist will encode a block with no history and no following blocks. -// Most notable difference is that src will not be copied for history and -// we do not need to check for max match length. -func (e *doubleFastEncoder) EncodeNoHist(blk *blockEnc, src []byte) { - const ( - // Input margin is the number of bytes we read (8) - // and the maximum we will read ahead (2) - inputMargin = 8 + 2 - minNonLiteralBlockSize = 16 - ) - - // Protect against e.cur wraparound. - if e.cur >= e.bufferReset { - for i := range e.table[:] { - e.table[i] = tableEntry{} - } - for i := range e.longTable[:] { - e.longTable[i] = tableEntry{} - } - e.cur = e.maxMatchOff - } - - s := int32(0) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Override src - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 1. - const stepSize = 1 - - const kSearchStrength = 8 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - var t int32 - for { - - nextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen) - nextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen) - candidateL := e.longTable[nextHashL] - candidateS := e.table[nextHashS] - - const repOff = 1 - repIndex := s - offset1 + repOff - entry := tableEntry{offset: s + e.cur, val: uint32(cv)} - e.longTable[nextHashL] = entry - e.table[nextHashS] = entry - - if len(blk.sequences) > 2 { - if load3232(src, repIndex) == uint32(cv>>(repOff*8)) { - // Consider history as well. - var seq seq - //length := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - length := 4 + int32(matchLen(src[s+4+repOff:], src[repIndex+4:])) - - seq.matchLen = uint32(length - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + repOff - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - s += length + repOff - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, length) - - } - break encodeLoop - } - cv = load6432(src, s) - continue - } - } - // Find the offsets of our two matches. - coffsetL := s - (candidateL.offset - e.cur) - coffsetS := s - (candidateS.offset - e.cur) - - // Check if we have a long match. - if coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val { - // Found a long match, likely at least 8 bytes. - // Reference encoder checks all 8 bytes, we only check 4, - // but the likelihood of both the first 4 bytes and the hash matching should be enough. - t = candidateL.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d). cur: %d", s, t, e.cur)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - break - } - - // Check if we have a short match. - if coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val { - // found a regular match - // See if we can find a long match at s+1 - const checkAt = 1 - cv := load6432(src, s+checkAt) - nextHashL = hashLen(cv, dFastLongTableBits, dFastLongLen) - candidateL = e.longTable[nextHashL] - coffsetL = s - (candidateL.offset - e.cur) + checkAt - - // We can store it, since we have at least a 4 byte match. - e.longTable[nextHashL] = tableEntry{offset: s + checkAt + e.cur, val: uint32(cv)} - if coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val { - // Found a long match, likely at least 8 bytes. - // Reference encoder checks all 8 bytes, we only check 4, - // but the likelihood of both the first 4 bytes and the hash matching should be enough. - t = candidateL.offset - e.cur - s += checkAt - if debugMatches { - println("long match (after short)") - } - break - } - - t = candidateS.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - if debugMatches { - println("short match") - } - break - } - - // No match found, move forward in input. - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - - // A 4-byte match has been found. Update recent offsets. - // We'll later see if more than 4 bytes. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - // Extend the 4-byte match as long as possible. - //l := e.matchlen(s+4, t+4, src) + 4 - l := int32(matchLen(src[s+4:], src[t+4:])) + 4 - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] { - s-- - t-- - l++ - } - - // Write our sequence - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - - // Index match start+1 (long) and start+2 (short) - index0 := s - l + 1 - // Index match end-2 (long) and end-1 (short) - index1 := s - 2 - - cv0 := load6432(src, index0) - cv1 := load6432(src, index1) - te0 := tableEntry{offset: index0 + e.cur, val: uint32(cv0)} - te1 := tableEntry{offset: index1 + e.cur, val: uint32(cv1)} - e.longTable[hashLen(cv0, dFastLongTableBits, dFastLongLen)] = te0 - e.longTable[hashLen(cv1, dFastLongTableBits, dFastLongLen)] = te1 - cv0 >>= 8 - cv1 >>= 8 - te0.offset++ - te1.offset++ - te0.val = uint32(cv0) - te1.val = uint32(cv1) - e.table[hashLen(cv0, dFastShortTableBits, dFastShortLen)] = te0 - e.table[hashLen(cv1, dFastShortTableBits, dFastShortLen)] = te1 - - cv = load6432(src, s) - - if len(blk.sequences) <= 2 { - continue - } - - // Check offset 2 - for { - o2 := s - offset2 - if load3232(src, o2) != uint32(cv) { - // Do regular search - break - } - - // Store this, since we have it. - nextHashS := hashLen(cv1>>8, dFastShortTableBits, dFastShortLen) - nextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen) - - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - //l := 4 + e.matchlen(s+4, o2+4, src) - l := 4 + int32(matchLen(src[s+4:], src[o2+4:])) - - entry := tableEntry{offset: s + e.cur, val: uint32(cv)} - e.longTable[nextHashL] = entry - e.table[nextHashS] = entry - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - // Finished - break encodeLoop - } - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } - - // We do not store history, so we must offset e.cur to avoid false matches for next user. - if e.cur < e.bufferReset { - e.cur += int32(len(src)) - } -} - -// Encode will encode the content, with a dictionary if initialized for it. -func (e *doubleFastEncoderDict) Encode(blk *blockEnc, src []byte) { - const ( - // Input margin is the number of bytes we read (8) - // and the maximum we will read ahead (2) - inputMargin = 8 + 2 - minNonLiteralBlockSize = 16 - ) - - // Protect against e.cur wraparound. - for e.cur >= e.bufferReset-int32(len(e.hist)) { - if len(e.hist) == 0 { - for i := range e.table[:] { - e.table[i] = tableEntry{} - } - for i := range e.longTable[:] { - e.longTable[i] = tableEntry{} - } - e.markAllShardsDirty() - e.cur = e.maxMatchOff - break - } - // Shift down everything in the table that isn't already too far away. - minOff := e.cur + int32(len(e.hist)) - e.maxMatchOff - for i := range e.table[:] { - v := e.table[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.table[i].offset = v - } - for i := range e.longTable[:] { - v := e.longTable[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.longTable[i].offset = v - } - e.markAllShardsDirty() - e.cur = e.maxMatchOff - break - } - - s := e.addBlock(src) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Override src - src = e.hist - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 1. - const stepSize = 1 - - const kSearchStrength = 8 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - var t int32 - // We allow the encoder to optionally turn off repeat offsets across blocks - canRepeat := len(blk.sequences) > 2 - - for { - if debugAsserts && canRepeat && offset1 == 0 { - panic("offset0 was 0") - } - - nextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen) - nextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen) - candidateL := e.longTable[nextHashL] - candidateS := e.table[nextHashS] - - const repOff = 1 - repIndex := s - offset1 + repOff - entry := tableEntry{offset: s + e.cur, val: uint32(cv)} - e.longTable[nextHashL] = entry - e.markLongShardDirty(nextHashL) - e.table[nextHashS] = entry - e.markShardDirty(nextHashS) - - if canRepeat { - if repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>(repOff*8)) { - // Consider history as well. - var seq seq - lenght := 4 + e.matchlen(s+4+repOff, repIndex+4, src) - - seq.matchLen = uint32(lenght - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + repOff - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for repIndex > tMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch-1 { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - s += lenght + repOff - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, lenght) - - } - break encodeLoop - } - cv = load6432(src, s) - continue - } - } - // Find the offsets of our two matches. - coffsetL := s - (candidateL.offset - e.cur) - coffsetS := s - (candidateS.offset - e.cur) - - // Check if we have a long match. - if coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val { - // Found a long match, likely at least 8 bytes. - // Reference encoder checks all 8 bytes, we only check 4, - // but the likelihood of both the first 4 bytes and the hash matching should be enough. - t = candidateL.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugMatches { - println("long match") - } - break - } - - // Check if we have a short match. - if coffsetS < e.maxMatchOff && uint32(cv) == candidateS.val { - // found a regular match - // See if we can find a long match at s+1 - const checkAt = 1 - cv := load6432(src, s+checkAt) - nextHashL = hashLen(cv, dFastLongTableBits, dFastLongLen) - candidateL = e.longTable[nextHashL] - coffsetL = s - (candidateL.offset - e.cur) + checkAt - - // We can store it, since we have at least a 4 byte match. - e.longTable[nextHashL] = tableEntry{offset: s + checkAt + e.cur, val: uint32(cv)} - e.markLongShardDirty(nextHashL) - if coffsetL < e.maxMatchOff && uint32(cv) == candidateL.val { - // Found a long match, likely at least 8 bytes. - // Reference encoder checks all 8 bytes, we only check 4, - // but the likelihood of both the first 4 bytes and the hash matching should be enough. - t = candidateL.offset - e.cur - s += checkAt - if debugMatches { - println("long match (after short)") - } - break - } - - t = candidateS.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - if debugMatches { - println("short match") - } - break - } - - // No match found, move forward in input. - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - - // A 4-byte match has been found. Update recent offsets. - // We'll later see if more than 4 bytes. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && canRepeat && int(offset1) > len(src) { - panic("invalid offset") - } - - // Extend the 4-byte match as long as possible. - l := e.matchlen(s+4, t+4, src) + 4 - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength { - s-- - t-- - l++ - } - - // Write our sequence - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - - // Index match start+1 (long) and start+2 (short) - index0 := s - l + 1 - // Index match end-2 (long) and end-1 (short) - index1 := s - 2 - - cv0 := load6432(src, index0) - cv1 := load6432(src, index1) - te0 := tableEntry{offset: index0 + e.cur, val: uint32(cv0)} - te1 := tableEntry{offset: index1 + e.cur, val: uint32(cv1)} - longHash1 := hashLen(cv0, dFastLongTableBits, dFastLongLen) - longHash2 := hashLen(cv1, dFastLongTableBits, dFastLongLen) - e.longTable[longHash1] = te0 - e.longTable[longHash2] = te1 - e.markLongShardDirty(longHash1) - e.markLongShardDirty(longHash2) - cv0 >>= 8 - cv1 >>= 8 - te0.offset++ - te1.offset++ - te0.val = uint32(cv0) - te1.val = uint32(cv1) - hashVal1 := hashLen(cv0, dFastShortTableBits, dFastShortLen) - hashVal2 := hashLen(cv1, dFastShortTableBits, dFastShortLen) - e.table[hashVal1] = te0 - e.markShardDirty(hashVal1) - e.table[hashVal2] = te1 - e.markShardDirty(hashVal2) - - cv = load6432(src, s) - - if !canRepeat { - continue - } - - // Check offset 2 - for { - o2 := s - offset2 - if load3232(src, o2) != uint32(cv) { - // Do regular search - break - } - - // Store this, since we have it. - nextHashL := hashLen(cv, dFastLongTableBits, dFastLongLen) - nextHashS := hashLen(cv, dFastShortTableBits, dFastShortLen) - - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - l := 4 + e.matchlen(s+4, o2+4, src) - - entry := tableEntry{offset: s + e.cur, val: uint32(cv)} - e.longTable[nextHashL] = entry - e.markLongShardDirty(nextHashL) - e.table[nextHashS] = entry - e.markShardDirty(nextHashS) - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - // Finished - break encodeLoop - } - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - blk.recentOffsets[0] = uint32(offset1) - blk.recentOffsets[1] = uint32(offset2) - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } - // If we encoded more than 64K mark all dirty. - if len(src) > 64<<10 { - e.markAllShardsDirty() - } -} - -// ResetDict will reset and set a dictionary if not nil -func (e *doubleFastEncoder) Reset(d *dict, singleBlock bool) { - e.fastEncoder.Reset(d, singleBlock) - if d != nil { - panic("doubleFastEncoder: Reset with dict not supported") - } -} - -// ResetDict will reset and set a dictionary if not nil -func (e *doubleFastEncoderDict) Reset(d *dict, singleBlock bool) { - allDirty := e.allDirty - e.fastEncoderDict.Reset(d, singleBlock) - if d == nil { - return - } - - // Init or copy dict table - if len(e.dictLongTable) != len(e.longTable) || d.id != e.lastDictID { - if len(e.dictLongTable) != len(e.longTable) { - e.dictLongTable = make([]tableEntry, len(e.longTable)) - } - if len(d.content) >= 8 { - cv := load6432(d.content, 0) - e.dictLongTable[hashLen(cv, dFastLongTableBits, dFastLongLen)] = tableEntry{ - val: uint32(cv), - offset: e.maxMatchOff, - } - end := int32(len(d.content)) - 8 + e.maxMatchOff - for i := e.maxMatchOff + 1; i < end; i++ { - cv = cv>>8 | (uint64(d.content[i-e.maxMatchOff+7]) << 56) - e.dictLongTable[hashLen(cv, dFastLongTableBits, dFastLongLen)] = tableEntry{ - val: uint32(cv), - offset: i, - } - } - } - e.lastDictID = d.id - allDirty = true - } - // Reset table to initial state - e.cur = e.maxMatchOff - - dirtyShardCnt := 0 - if !allDirty { - for i := range e.longTableShardDirty { - if e.longTableShardDirty[i] { - dirtyShardCnt++ - } - } - } - - if allDirty || dirtyShardCnt > dLongTableShardCnt/2 { - //copy(e.longTable[:], e.dictLongTable) - e.longTable = *(*[dFastLongTableSize]tableEntry)(e.dictLongTable) - for i := range e.longTableShardDirty { - e.longTableShardDirty[i] = false - } - return - } - for i := range e.longTableShardDirty { - if !e.longTableShardDirty[i] { - continue - } - - // copy(e.longTable[i*dLongTableShardSize:(i+1)*dLongTableShardSize], e.dictLongTable[i*dLongTableShardSize:(i+1)*dLongTableShardSize]) - *(*[dLongTableShardSize]tableEntry)(e.longTable[i*dLongTableShardSize:]) = *(*[dLongTableShardSize]tableEntry)(e.dictLongTable[i*dLongTableShardSize:]) - - e.longTableShardDirty[i] = false - } -} - -func (e *doubleFastEncoderDict) markLongShardDirty(entryNum uint32) { - e.longTableShardDirty[entryNum/dLongTableShardSize] = true -} diff --git a/vendor/github.com/klauspost/compress/zstd/enc_fast.go b/vendor/github.com/klauspost/compress/zstd/enc_fast.go deleted file mode 100644 index f45a3da7..00000000 --- a/vendor/github.com/klauspost/compress/zstd/enc_fast.go +++ /dev/null @@ -1,891 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "fmt" -) - -const ( - tableBits = 15 // Bits used in the table - tableSize = 1 << tableBits // Size of the table - tableShardCnt = 1 << (tableBits - dictShardBits) // Number of shards in the table - tableShardSize = tableSize / tableShardCnt // Size of an individual shard - tableFastHashLen = 6 - tableMask = tableSize - 1 // Mask for table indices. Redundant, but can eliminate bounds checks. - maxMatchLength = 131074 -) - -type tableEntry struct { - val uint32 - offset int32 -} - -type fastEncoder struct { - fastBase - table [tableSize]tableEntry -} - -type fastEncoderDict struct { - fastEncoder - dictTable []tableEntry - tableShardDirty [tableShardCnt]bool - allDirty bool -} - -// Encode mimmics functionality in zstd_fast.c -func (e *fastEncoder) Encode(blk *blockEnc, src []byte) { - const ( - inputMargin = 8 - minNonLiteralBlockSize = 1 + 1 + inputMargin - ) - - // Protect against e.cur wraparound. - for e.cur >= e.bufferReset-int32(len(e.hist)) { - if len(e.hist) == 0 { - for i := range e.table[:] { - e.table[i] = tableEntry{} - } - e.cur = e.maxMatchOff - break - } - // Shift down everything in the table that isn't already too far away. - minOff := e.cur + int32(len(e.hist)) - e.maxMatchOff - for i := range e.table[:] { - v := e.table[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.table[i].offset = v - } - e.cur = e.maxMatchOff - break - } - - s := e.addBlock(src) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Override src - src = e.hist - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 2. - const stepSize = 2 - - // TEMPLATE - const hashLog = tableBits - // seems global, but would be nice to tweak. - const kSearchStrength = 6 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - // t will contain the match offset when we find one. - // When existing the search loop, we have already checked 4 bytes. - var t int32 - - // We will not use repeat offsets across blocks. - // By not using them for the first 3 matches - canRepeat := len(blk.sequences) > 2 - - for { - if debugAsserts && canRepeat && offset1 == 0 { - panic("offset0 was 0") - } - - nextHash := hashLen(cv, hashLog, tableFastHashLen) - nextHash2 := hashLen(cv>>8, hashLog, tableFastHashLen) - candidate := e.table[nextHash] - candidate2 := e.table[nextHash2] - repIndex := s - offset1 + 2 - - e.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)} - e.table[nextHash2] = tableEntry{offset: s + e.cur + 1, val: uint32(cv >> 8)} - - if canRepeat && repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>16) { - // Consider history as well. - var seq seq - length := 4 + e.matchlen(s+6, repIndex+4, src) - seq.matchLen = uint32(length - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + 2 - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - sMin := s - e.maxMatchOff - if sMin < 0 { - sMin = 0 - } - for repIndex > sMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - s += length + 2 - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, length) - - } - break encodeLoop - } - cv = load6432(src, s) - continue - } - coffset0 := s - (candidate.offset - e.cur) - coffset1 := s - (candidate2.offset - e.cur) + 1 - if coffset0 < e.maxMatchOff && uint32(cv) == candidate.val { - // found a regular match - t = candidate.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - break - } - - if coffset1 < e.maxMatchOff && uint32(cv>>8) == candidate2.val { - // found a regular match - t = candidate2.offset - e.cur - s++ - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - break - } - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - // A 4-byte match has been found. We'll later see if more than 4 bytes. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && canRepeat && int(offset1) > len(src) { - panic("invalid offset") - } - - // Extend the 4-byte match as long as possible. - l := e.matchlen(s+4, t+4, src) + 4 - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength { - s-- - t-- - l++ - } - - // Write our sequence. - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - // Don't use repeat offsets - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - - // Check offset 2 - if o2 := s - offset2; canRepeat && load3232(src, o2) == uint32(cv) { - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - l := 4 + e.matchlen(s+4, o2+4, src) - - // Store this, since we have it. - nextHash := hashLen(cv, hashLog, tableFastHashLen) - e.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)} - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - break encodeLoop - } - // Prepare next loop. - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - blk.recentOffsets[0] = uint32(offset1) - blk.recentOffsets[1] = uint32(offset2) - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } -} - -// EncodeNoHist will encode a block with no history and no following blocks. -// Most notable difference is that src will not be copied for history and -// we do not need to check for max match length. -func (e *fastEncoder) EncodeNoHist(blk *blockEnc, src []byte) { - const ( - inputMargin = 8 - minNonLiteralBlockSize = 1 + 1 + inputMargin - ) - if debugEncoder { - if len(src) > maxCompressedBlockSize { - panic("src too big") - } - } - - // Protect against e.cur wraparound. - if e.cur >= e.bufferReset { - for i := range e.table[:] { - e.table[i] = tableEntry{} - } - e.cur = e.maxMatchOff - } - - s := int32(0) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 2. - const stepSize = 2 - - // TEMPLATE - const hashLog = tableBits - // seems global, but would be nice to tweak. - const kSearchStrength = 6 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - // t will contain the match offset when we find one. - // When existing the search loop, we have already checked 4 bytes. - var t int32 - - // We will not use repeat offsets across blocks. - // By not using them for the first 3 matches - - for { - nextHash := hashLen(cv, hashLog, tableFastHashLen) - nextHash2 := hashLen(cv>>8, hashLog, tableFastHashLen) - candidate := e.table[nextHash] - candidate2 := e.table[nextHash2] - repIndex := s - offset1 + 2 - - e.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)} - e.table[nextHash2] = tableEntry{offset: s + e.cur + 1, val: uint32(cv >> 8)} - - if len(blk.sequences) > 2 && load3232(src, repIndex) == uint32(cv>>16) { - // Consider history as well. - var seq seq - length := 4 + e.matchlen(s+6, repIndex+4, src) - - seq.matchLen = uint32(length - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + 2 - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - sMin := s - e.maxMatchOff - if sMin < 0 { - sMin = 0 - } - for repIndex > sMin && start > startLimit && src[repIndex-1] == src[start-1] { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - s += length + 2 - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, length) - - } - break encodeLoop - } - cv = load6432(src, s) - continue - } - coffset0 := s - (candidate.offset - e.cur) - coffset1 := s - (candidate2.offset - e.cur) + 1 - if coffset0 < e.maxMatchOff && uint32(cv) == candidate.val { - // found a regular match - t = candidate.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic(fmt.Sprintf("t (%d) < 0, candidate.offset: %d, e.cur: %d, coffset0: %d, e.maxMatchOff: %d", t, candidate.offset, e.cur, coffset0, e.maxMatchOff)) - } - break - } - - if coffset1 < e.maxMatchOff && uint32(cv>>8) == candidate2.val { - // found a regular match - t = candidate2.offset - e.cur - s++ - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - break - } - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - // A 4-byte match has been found. We'll later see if more than 4 bytes. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && t < 0 { - panic(fmt.Sprintf("t (%d) < 0 ", t)) - } - // Extend the 4-byte match as long as possible. - l := e.matchlen(s+4, t+4, src) + 4 - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] { - s-- - t-- - l++ - } - - // Write our sequence. - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - // Don't use repeat offsets - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - - // Check offset 2 - if o2 := s - offset2; len(blk.sequences) > 2 && load3232(src, o2) == uint32(cv) { - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - l := 4 + e.matchlen(s+4, o2+4, src) - - // Store this, since we have it. - nextHash := hashLen(cv, hashLog, tableFastHashLen) - e.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)} - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - break encodeLoop - } - // Prepare next loop. - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } - // We do not store history, so we must offset e.cur to avoid false matches for next user. - if e.cur < e.bufferReset { - e.cur += int32(len(src)) - } -} - -// Encode will encode the content, with a dictionary if initialized for it. -func (e *fastEncoderDict) Encode(blk *blockEnc, src []byte) { - const ( - inputMargin = 8 - minNonLiteralBlockSize = 1 + 1 + inputMargin - ) - if e.allDirty || len(src) > 32<<10 { - e.fastEncoder.Encode(blk, src) - e.allDirty = true - return - } - // Protect against e.cur wraparound. - for e.cur >= e.bufferReset-int32(len(e.hist)) { - if len(e.hist) == 0 { - e.table = [tableSize]tableEntry{} - e.cur = e.maxMatchOff - break - } - // Shift down everything in the table that isn't already too far away. - minOff := e.cur + int32(len(e.hist)) - e.maxMatchOff - for i := range e.table[:] { - v := e.table[i].offset - if v < minOff { - v = 0 - } else { - v = v - e.cur + e.maxMatchOff - } - e.table[i].offset = v - } - e.cur = e.maxMatchOff - break - } - - s := e.addBlock(src) - blk.size = len(src) - if len(src) < minNonLiteralBlockSize { - blk.extraLits = len(src) - blk.literals = blk.literals[:len(src)] - copy(blk.literals, src) - return - } - - // Override src - src = e.hist - sLimit := int32(len(src)) - inputMargin - // stepSize is the number of bytes to skip on every main loop iteration. - // It should be >= 2. - const stepSize = 2 - - // TEMPLATE - const hashLog = tableBits - // seems global, but would be nice to tweak. - const kSearchStrength = 7 - - // nextEmit is where in src the next emitLiteral should start from. - nextEmit := s - cv := load6432(src, s) - - // Relative offsets - offset1 := int32(blk.recentOffsets[0]) - offset2 := int32(blk.recentOffsets[1]) - - addLiterals := func(s *seq, until int32) { - if until == nextEmit { - return - } - blk.literals = append(blk.literals, src[nextEmit:until]...) - s.litLen = uint32(until - nextEmit) - } - if debugEncoder { - println("recent offsets:", blk.recentOffsets) - } - -encodeLoop: - for { - // t will contain the match offset when we find one. - // When existing the search loop, we have already checked 4 bytes. - var t int32 - - // We will not use repeat offsets across blocks. - // By not using them for the first 3 matches - canRepeat := len(blk.sequences) > 2 - - for { - if debugAsserts && canRepeat && offset1 == 0 { - panic("offset0 was 0") - } - - nextHash := hashLen(cv, hashLog, tableFastHashLen) - nextHash2 := hashLen(cv>>8, hashLog, tableFastHashLen) - candidate := e.table[nextHash] - candidate2 := e.table[nextHash2] - repIndex := s - offset1 + 2 - - e.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)} - e.markShardDirty(nextHash) - e.table[nextHash2] = tableEntry{offset: s + e.cur + 1, val: uint32(cv >> 8)} - e.markShardDirty(nextHash2) - - if canRepeat && repIndex >= 0 && load3232(src, repIndex) == uint32(cv>>16) { - // Consider history as well. - var seq seq - length := 4 + e.matchlen(s+6, repIndex+4, src) - - seq.matchLen = uint32(length - zstdMinMatch) - - // We might be able to match backwards. - // Extend as long as we can. - start := s + 2 - // We end the search early, so we don't risk 0 literals - // and have to do special offset treatment. - startLimit := nextEmit + 1 - - sMin := s - e.maxMatchOff - if sMin < 0 { - sMin = 0 - } - for repIndex > sMin && start > startLimit && src[repIndex-1] == src[start-1] && seq.matchLen < maxMatchLength-zstdMinMatch { - repIndex-- - start-- - seq.matchLen++ - } - addLiterals(&seq, start) - - // rep 0 - seq.offset = 1 - if debugSequences { - println("repeat sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - s += length + 2 - nextEmit = s - if s >= sLimit { - if debugEncoder { - println("repeat ended", s, length) - - } - break encodeLoop - } - cv = load6432(src, s) - continue - } - coffset0 := s - (candidate.offset - e.cur) - coffset1 := s - (candidate2.offset - e.cur) + 1 - if coffset0 < e.maxMatchOff && uint32(cv) == candidate.val { - // found a regular match - t = candidate.offset - e.cur - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - break - } - - if coffset1 < e.maxMatchOff && uint32(cv>>8) == candidate2.val { - // found a regular match - t = candidate2.offset - e.cur - s++ - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - if debugAsserts && s-t > e.maxMatchOff { - panic("s - t >e.maxMatchOff") - } - if debugAsserts && t < 0 { - panic("t<0") - } - break - } - s += stepSize + ((s - nextEmit) >> (kSearchStrength - 1)) - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - } - // A 4-byte match has been found. We'll later see if more than 4 bytes. - offset2 = offset1 - offset1 = s - t - - if debugAsserts && s <= t { - panic(fmt.Sprintf("s (%d) <= t (%d)", s, t)) - } - - if debugAsserts && canRepeat && int(offset1) > len(src) { - panic("invalid offset") - } - - // Extend the 4-byte match as long as possible. - l := e.matchlen(s+4, t+4, src) + 4 - - // Extend backwards - tMin := s - e.maxMatchOff - if tMin < 0 { - tMin = 0 - } - for t > tMin && s > nextEmit && src[t-1] == src[s-1] && l < maxMatchLength { - s-- - t-- - l++ - } - - // Write our sequence. - var seq seq - seq.litLen = uint32(s - nextEmit) - seq.matchLen = uint32(l - zstdMinMatch) - if seq.litLen > 0 { - blk.literals = append(blk.literals, src[nextEmit:s]...) - } - // Don't use repeat offsets - seq.offset = uint32(s-t) + 3 - s += l - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - nextEmit = s - if s >= sLimit { - break encodeLoop - } - cv = load6432(src, s) - - // Check offset 2 - if o2 := s - offset2; canRepeat && load3232(src, o2) == uint32(cv) { - // We have at least 4 byte match. - // No need to check backwards. We come straight from a match - l := 4 + e.matchlen(s+4, o2+4, src) - - // Store this, since we have it. - nextHash := hashLen(cv, hashLog, tableFastHashLen) - e.table[nextHash] = tableEntry{offset: s + e.cur, val: uint32(cv)} - e.markShardDirty(nextHash) - seq.matchLen = uint32(l) - zstdMinMatch - seq.litLen = 0 - // Since litlen is always 0, this is offset 1. - seq.offset = 1 - s += l - nextEmit = s - if debugSequences { - println("sequence", seq, "next s:", s) - } - blk.sequences = append(blk.sequences, seq) - - // Swap offset 1 and 2. - offset1, offset2 = offset2, offset1 - if s >= sLimit { - break encodeLoop - } - // Prepare next loop. - cv = load6432(src, s) - } - } - - if int(nextEmit) < len(src) { - blk.literals = append(blk.literals, src[nextEmit:]...) - blk.extraLits = len(src) - int(nextEmit) - } - blk.recentOffsets[0] = uint32(offset1) - blk.recentOffsets[1] = uint32(offset2) - if debugEncoder { - println("returning, recent offsets:", blk.recentOffsets, "extra literals:", blk.extraLits) - } -} - -// ResetDict will reset and set a dictionary if not nil -func (e *fastEncoder) Reset(d *dict, singleBlock bool) { - e.resetBase(d, singleBlock) - if d != nil { - panic("fastEncoder: Reset with dict") - } -} - -// ResetDict will reset and set a dictionary if not nil -func (e *fastEncoderDict) Reset(d *dict, singleBlock bool) { - e.resetBase(d, singleBlock) - if d == nil { - return - } - - // Init or copy dict table - if len(e.dictTable) != len(e.table) || d.id != e.lastDictID { - if len(e.dictTable) != len(e.table) { - e.dictTable = make([]tableEntry, len(e.table)) - } - if true { - end := e.maxMatchOff + int32(len(d.content)) - 8 - for i := e.maxMatchOff; i < end; i += 2 { - const hashLog = tableBits - - cv := load6432(d.content, i-e.maxMatchOff) - nextHash := hashLen(cv, hashLog, tableFastHashLen) // 0 -> 6 - nextHash1 := hashLen(cv>>8, hashLog, tableFastHashLen) // 1 -> 7 - e.dictTable[nextHash] = tableEntry{ - val: uint32(cv), - offset: i, - } - e.dictTable[nextHash1] = tableEntry{ - val: uint32(cv >> 8), - offset: i + 1, - } - } - } - e.lastDictID = d.id - e.allDirty = true - } - - e.cur = e.maxMatchOff - dirtyShardCnt := 0 - if !e.allDirty { - for i := range e.tableShardDirty { - if e.tableShardDirty[i] { - dirtyShardCnt++ - } - } - } - - const shardCnt = tableShardCnt - const shardSize = tableShardSize - if e.allDirty || dirtyShardCnt > shardCnt*4/6 { - //copy(e.table[:], e.dictTable) - e.table = *(*[tableSize]tableEntry)(e.dictTable) - for i := range e.tableShardDirty { - e.tableShardDirty[i] = false - } - e.allDirty = false - return - } - for i := range e.tableShardDirty { - if !e.tableShardDirty[i] { - continue - } - - //copy(e.table[i*shardSize:(i+1)*shardSize], e.dictTable[i*shardSize:(i+1)*shardSize]) - *(*[shardSize]tableEntry)(e.table[i*shardSize:]) = *(*[shardSize]tableEntry)(e.dictTable[i*shardSize:]) - e.tableShardDirty[i] = false - } - e.allDirty = false -} - -func (e *fastEncoderDict) markAllShardsDirty() { - e.allDirty = true -} - -func (e *fastEncoderDict) markShardDirty(entryNum uint32) { - e.tableShardDirty[entryNum/tableShardSize] = true -} diff --git a/vendor/github.com/klauspost/compress/zstd/encoder.go b/vendor/github.com/klauspost/compress/zstd/encoder.go deleted file mode 100644 index 72af7ef0..00000000 --- a/vendor/github.com/klauspost/compress/zstd/encoder.go +++ /dev/null @@ -1,619 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "crypto/rand" - "fmt" - "io" - "math" - rdebug "runtime/debug" - "sync" - - "github.com/klauspost/compress/zstd/internal/xxhash" -) - -// Encoder provides encoding to Zstandard. -// An Encoder can be used for either compressing a stream via the -// io.WriteCloser interface supported by the Encoder or as multiple independent -// tasks via the EncodeAll function. -// Smaller encodes are encouraged to use the EncodeAll function. -// Use NewWriter to create a new instance. -type Encoder struct { - o encoderOptions - encoders chan encoder - state encoderState - init sync.Once -} - -type encoder interface { - Encode(blk *blockEnc, src []byte) - EncodeNoHist(blk *blockEnc, src []byte) - Block() *blockEnc - CRC() *xxhash.Digest - AppendCRC([]byte) []byte - WindowSize(size int64) int32 - UseBlock(*blockEnc) - Reset(d *dict, singleBlock bool) -} - -type encoderState struct { - w io.Writer - filling []byte - current []byte - previous []byte - encoder encoder - writing *blockEnc - err error - writeErr error - nWritten int64 - nInput int64 - frameContentSize int64 - headerWritten bool - eofWritten bool - fullFrameWritten bool - - // This waitgroup indicates an encode is running. - wg sync.WaitGroup - // This waitgroup indicates we have a block encoding/writing. - wWg sync.WaitGroup -} - -// NewWriter will create a new Zstandard encoder. -// If the encoder will be used for encoding blocks a nil writer can be used. -func NewWriter(w io.Writer, opts ...EOption) (*Encoder, error) { - initPredefined() - var e Encoder - e.o.setDefault() - for _, o := range opts { - err := o(&e.o) - if err != nil { - return nil, err - } - } - if w != nil { - e.Reset(w) - } - return &e, nil -} - -func (e *Encoder) initialize() { - if e.o.concurrent == 0 { - e.o.setDefault() - } - e.encoders = make(chan encoder, e.o.concurrent) - for i := 0; i < e.o.concurrent; i++ { - enc := e.o.encoder() - e.encoders <- enc - } -} - -// Reset will re-initialize the writer and new writes will encode to the supplied writer -// as a new, independent stream. -func (e *Encoder) Reset(w io.Writer) { - s := &e.state - s.wg.Wait() - s.wWg.Wait() - if cap(s.filling) == 0 { - s.filling = make([]byte, 0, e.o.blockSize) - } - if e.o.concurrent > 1 { - if cap(s.current) == 0 { - s.current = make([]byte, 0, e.o.blockSize) - } - if cap(s.previous) == 0 { - s.previous = make([]byte, 0, e.o.blockSize) - } - s.current = s.current[:0] - s.previous = s.previous[:0] - if s.writing == nil { - s.writing = &blockEnc{lowMem: e.o.lowMem} - s.writing.init() - } - s.writing.initNewEncode() - } - if s.encoder == nil { - s.encoder = e.o.encoder() - } - s.filling = s.filling[:0] - s.encoder.Reset(e.o.dict, false) - s.headerWritten = false - s.eofWritten = false - s.fullFrameWritten = false - s.w = w - s.err = nil - s.nWritten = 0 - s.nInput = 0 - s.writeErr = nil - s.frameContentSize = 0 -} - -// ResetContentSize will reset and set a content size for the next stream. -// If the bytes written does not match the size given an error will be returned -// when calling Close(). -// This is removed when Reset is called. -// Sizes <= 0 results in no content size set. -func (e *Encoder) ResetContentSize(w io.Writer, size int64) { - e.Reset(w) - if size >= 0 { - e.state.frameContentSize = size - } -} - -// Write data to the encoder. -// Input data will be buffered and as the buffer fills up -// content will be compressed and written to the output. -// When done writing, use Close to flush the remaining output -// and write CRC if requested. -func (e *Encoder) Write(p []byte) (n int, err error) { - s := &e.state - for len(p) > 0 { - if len(p)+len(s.filling) < e.o.blockSize { - if e.o.crc { - _, _ = s.encoder.CRC().Write(p) - } - s.filling = append(s.filling, p...) - return n + len(p), nil - } - add := p - if len(p)+len(s.filling) > e.o.blockSize { - add = add[:e.o.blockSize-len(s.filling)] - } - if e.o.crc { - _, _ = s.encoder.CRC().Write(add) - } - s.filling = append(s.filling, add...) - p = p[len(add):] - n += len(add) - if len(s.filling) < e.o.blockSize { - return n, nil - } - err := e.nextBlock(false) - if err != nil { - return n, err - } - if debugAsserts && len(s.filling) > 0 { - panic(len(s.filling)) - } - } - return n, nil -} - -// nextBlock will synchronize and start compressing input in e.state.filling. -// If an error has occurred during encoding it will be returned. -func (e *Encoder) nextBlock(final bool) error { - s := &e.state - // Wait for current block. - s.wg.Wait() - if s.err != nil { - return s.err - } - if len(s.filling) > e.o.blockSize { - return fmt.Errorf("block > maxStoreBlockSize") - } - if !s.headerWritten { - // If we have a single block encode, do a sync compression. - if final && len(s.filling) == 0 && !e.o.fullZero { - s.headerWritten = true - s.fullFrameWritten = true - s.eofWritten = true - return nil - } - if final && len(s.filling) > 0 { - s.current = e.EncodeAll(s.filling, s.current[:0]) - var n2 int - n2, s.err = s.w.Write(s.current) - if s.err != nil { - return s.err - } - s.nWritten += int64(n2) - s.nInput += int64(len(s.filling)) - s.current = s.current[:0] - s.filling = s.filling[:0] - s.headerWritten = true - s.fullFrameWritten = true - s.eofWritten = true - return nil - } - - var tmp [maxHeaderSize]byte - fh := frameHeader{ - ContentSize: uint64(s.frameContentSize), - WindowSize: uint32(s.encoder.WindowSize(s.frameContentSize)), - SingleSegment: false, - Checksum: e.o.crc, - DictID: e.o.dict.ID(), - } - - dst := fh.appendTo(tmp[:0]) - s.headerWritten = true - s.wWg.Wait() - var n2 int - n2, s.err = s.w.Write(dst) - if s.err != nil { - return s.err - } - s.nWritten += int64(n2) - } - if s.eofWritten { - // Ensure we only write it once. - final = false - } - - if len(s.filling) == 0 { - // Final block, but no data. - if final { - enc := s.encoder - blk := enc.Block() - blk.reset(nil) - blk.last = true - blk.encodeRaw(nil) - s.wWg.Wait() - _, s.err = s.w.Write(blk.output) - s.nWritten += int64(len(blk.output)) - s.eofWritten = true - } - return s.err - } - - // SYNC: - if e.o.concurrent == 1 { - src := s.filling - s.nInput += int64(len(s.filling)) - if debugEncoder { - println("Adding sync block,", len(src), "bytes, final:", final) - } - enc := s.encoder - blk := enc.Block() - blk.reset(nil) - enc.Encode(blk, src) - blk.last = final - if final { - s.eofWritten = true - } - - s.err = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy) - if s.err != nil { - return s.err - } - _, s.err = s.w.Write(blk.output) - s.nWritten += int64(len(blk.output)) - s.filling = s.filling[:0] - return s.err - } - - // Move blocks forward. - s.filling, s.current, s.previous = s.previous[:0], s.filling, s.current - s.nInput += int64(len(s.current)) - s.wg.Add(1) - go func(src []byte) { - if debugEncoder { - println("Adding block,", len(src), "bytes, final:", final) - } - defer func() { - if r := recover(); r != nil { - s.err = fmt.Errorf("panic while encoding: %v", r) - rdebug.PrintStack() - } - s.wg.Done() - }() - enc := s.encoder - blk := enc.Block() - enc.Encode(blk, src) - blk.last = final - if final { - s.eofWritten = true - } - // Wait for pending writes. - s.wWg.Wait() - if s.writeErr != nil { - s.err = s.writeErr - return - } - // Transfer encoders from previous write block. - blk.swapEncoders(s.writing) - // Transfer recent offsets to next. - enc.UseBlock(s.writing) - s.writing = blk - s.wWg.Add(1) - go func() { - defer func() { - if r := recover(); r != nil { - s.writeErr = fmt.Errorf("panic while encoding/writing: %v", r) - rdebug.PrintStack() - } - s.wWg.Done() - }() - s.writeErr = blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy) - if s.writeErr != nil { - return - } - _, s.writeErr = s.w.Write(blk.output) - s.nWritten += int64(len(blk.output)) - }() - }(s.current) - return nil -} - -// ReadFrom reads data from r until EOF or error. -// The return value n is the number of bytes read. -// Any error except io.EOF encountered during the read is also returned. -// -// The Copy function uses ReaderFrom if available. -func (e *Encoder) ReadFrom(r io.Reader) (n int64, err error) { - if debugEncoder { - println("Using ReadFrom") - } - - // Flush any current writes. - if len(e.state.filling) > 0 { - if err := e.nextBlock(false); err != nil { - return 0, err - } - } - e.state.filling = e.state.filling[:e.o.blockSize] - src := e.state.filling - for { - n2, err := r.Read(src) - if e.o.crc { - _, _ = e.state.encoder.CRC().Write(src[:n2]) - } - // src is now the unfilled part... - src = src[n2:] - n += int64(n2) - switch err { - case io.EOF: - e.state.filling = e.state.filling[:len(e.state.filling)-len(src)] - if debugEncoder { - println("ReadFrom: got EOF final block:", len(e.state.filling)) - } - return n, nil - case nil: - default: - if debugEncoder { - println("ReadFrom: got error:", err) - } - e.state.err = err - return n, err - } - if len(src) > 0 { - if debugEncoder { - println("ReadFrom: got space left in source:", len(src)) - } - continue - } - err = e.nextBlock(false) - if err != nil { - return n, err - } - e.state.filling = e.state.filling[:e.o.blockSize] - src = e.state.filling - } -} - -// Flush will send the currently written data to output -// and block until everything has been written. -// This should only be used on rare occasions where pushing the currently queued data is critical. -func (e *Encoder) Flush() error { - s := &e.state - if len(s.filling) > 0 { - err := e.nextBlock(false) - if err != nil { - return err - } - } - s.wg.Wait() - s.wWg.Wait() - if s.err != nil { - return s.err - } - return s.writeErr -} - -// Close will flush the final output and close the stream. -// The function will block until everything has been written. -// The Encoder can still be re-used after calling this. -func (e *Encoder) Close() error { - s := &e.state - if s.encoder == nil { - return nil - } - err := e.nextBlock(true) - if err != nil { - return err - } - if s.frameContentSize > 0 { - if s.nInput != s.frameContentSize { - return fmt.Errorf("frame content size %d given, but %d bytes was written", s.frameContentSize, s.nInput) - } - } - if e.state.fullFrameWritten { - return s.err - } - s.wg.Wait() - s.wWg.Wait() - - if s.err != nil { - return s.err - } - if s.writeErr != nil { - return s.writeErr - } - - // Write CRC - if e.o.crc && s.err == nil { - // heap alloc. - var tmp [4]byte - _, s.err = s.w.Write(s.encoder.AppendCRC(tmp[:0])) - s.nWritten += 4 - } - - // Add padding with content from crypto/rand.Reader - if s.err == nil && e.o.pad > 0 { - add := calcSkippableFrame(s.nWritten, int64(e.o.pad)) - frame, err := skippableFrame(s.filling[:0], add, rand.Reader) - if err != nil { - return err - } - _, s.err = s.w.Write(frame) - } - return s.err -} - -// EncodeAll will encode all input in src and append it to dst. -// This function can be called concurrently, but each call will only run on a single goroutine. -// If empty input is given, nothing is returned, unless WithZeroFrames is specified. -// Encoded blocks can be concatenated and the result will be the combined input stream. -// Data compressed with EncodeAll can be decoded with the Decoder, -// using either a stream or DecodeAll. -func (e *Encoder) EncodeAll(src, dst []byte) []byte { - if len(src) == 0 { - if e.o.fullZero { - // Add frame header. - fh := frameHeader{ - ContentSize: 0, - WindowSize: MinWindowSize, - SingleSegment: true, - // Adding a checksum would be a waste of space. - Checksum: false, - DictID: 0, - } - dst = fh.appendTo(dst) - - // Write raw block as last one only. - var blk blockHeader - blk.setSize(0) - blk.setType(blockTypeRaw) - blk.setLast(true) - dst = blk.appendTo(dst) - } - return dst - } - e.init.Do(e.initialize) - enc := <-e.encoders - defer func() { - // Release encoder reference to last block. - // If a non-single block is needed the encoder will reset again. - e.encoders <- enc - }() - // Use single segments when above minimum window and below window size. - single := len(src) <= e.o.windowSize && len(src) > MinWindowSize - if e.o.single != nil { - single = *e.o.single - } - fh := frameHeader{ - ContentSize: uint64(len(src)), - WindowSize: uint32(enc.WindowSize(int64(len(src)))), - SingleSegment: single, - Checksum: e.o.crc, - DictID: e.o.dict.ID(), - } - - // If less than 1MB, allocate a buffer up front. - if len(dst) == 0 && cap(dst) == 0 && len(src) < 1<<20 && !e.o.lowMem { - dst = make([]byte, 0, len(src)) - } - dst = fh.appendTo(dst) - - // If we can do everything in one block, prefer that. - if len(src) <= e.o.blockSize { - enc.Reset(e.o.dict, true) - // Slightly faster with no history and everything in one block. - if e.o.crc { - _, _ = enc.CRC().Write(src) - } - blk := enc.Block() - blk.last = true - if e.o.dict == nil { - enc.EncodeNoHist(blk, src) - } else { - enc.Encode(blk, src) - } - - // If we got the exact same number of literals as input, - // assume the literals cannot be compressed. - oldout := blk.output - // Output directly to dst - blk.output = dst - - err := blk.encode(src, e.o.noEntropy, !e.o.allLitEntropy) - if err != nil { - panic(err) - } - dst = blk.output - blk.output = oldout - } else { - enc.Reset(e.o.dict, false) - blk := enc.Block() - for len(src) > 0 { - todo := src - if len(todo) > e.o.blockSize { - todo = todo[:e.o.blockSize] - } - src = src[len(todo):] - if e.o.crc { - _, _ = enc.CRC().Write(todo) - } - blk.pushOffsets() - enc.Encode(blk, todo) - if len(src) == 0 { - blk.last = true - } - err := blk.encode(todo, e.o.noEntropy, !e.o.allLitEntropy) - if err != nil { - panic(err) - } - dst = append(dst, blk.output...) - blk.reset(nil) - } - } - if e.o.crc { - dst = enc.AppendCRC(dst) - } - // Add padding with content from crypto/rand.Reader - if e.o.pad > 0 { - add := calcSkippableFrame(int64(len(dst)), int64(e.o.pad)) - var err error - dst, err = skippableFrame(dst, add, rand.Reader) - if err != nil { - panic(err) - } - } - return dst -} - -// MaxEncodedSize returns the expected maximum -// size of an encoded block or stream. -func (e *Encoder) MaxEncodedSize(size int) int { - frameHeader := 4 + 2 // magic + frame header & window descriptor - if e.o.dict != nil { - frameHeader += 4 - } - // Frame content size: - if size < 256 { - frameHeader++ - } else if size < 65536+256 { - frameHeader += 2 - } else if size < math.MaxInt32 { - frameHeader += 4 - } else { - frameHeader += 8 - } - // Final crc - if e.o.crc { - frameHeader += 4 - } - - // Max overhead is 3 bytes/block. - // There cannot be 0 blocks. - blocks := (size + e.o.blockSize) / e.o.blockSize - - // Combine, add padding. - maxSz := frameHeader + 3*blocks + size - if e.o.pad > 1 { - maxSz += calcSkippableFrame(int64(maxSz), int64(e.o.pad)) - } - return maxSz -} diff --git a/vendor/github.com/klauspost/compress/zstd/encoder_options.go b/vendor/github.com/klauspost/compress/zstd/encoder_options.go deleted file mode 100644 index faaf8192..00000000 --- a/vendor/github.com/klauspost/compress/zstd/encoder_options.go +++ /dev/null @@ -1,339 +0,0 @@ -package zstd - -import ( - "errors" - "fmt" - "math" - "math/bits" - "runtime" - "strings" -) - -// EOption is an option for creating a encoder. -type EOption func(*encoderOptions) error - -// options retains accumulated state of multiple options. -type encoderOptions struct { - concurrent int - level EncoderLevel - single *bool - pad int - blockSize int - windowSize int - crc bool - fullZero bool - noEntropy bool - allLitEntropy bool - customWindow bool - customALEntropy bool - customBlockSize bool - lowMem bool - dict *dict -} - -func (o *encoderOptions) setDefault() { - *o = encoderOptions{ - concurrent: runtime.GOMAXPROCS(0), - crc: true, - single: nil, - blockSize: maxCompressedBlockSize, - windowSize: 8 << 20, - level: SpeedDefault, - allLitEntropy: false, - lowMem: false, - } -} - -// encoder returns an encoder with the selected options. -func (o encoderOptions) encoder() encoder { - switch o.level { - case SpeedFastest: - if o.dict != nil { - return &fastEncoderDict{fastEncoder: fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}} - } - return &fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}} - - case SpeedDefault: - if o.dict != nil { - return &doubleFastEncoderDict{fastEncoderDict: fastEncoderDict{fastEncoder: fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}}} - } - return &doubleFastEncoder{fastEncoder: fastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}} - case SpeedBetterCompression: - if o.dict != nil { - return &betterFastEncoderDict{betterFastEncoder: betterFastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}}} - } - return &betterFastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}} - case SpeedBestCompression: - return &bestFastEncoder{fastBase: fastBase{maxMatchOff: int32(o.windowSize), bufferReset: math.MaxInt32 - int32(o.windowSize*2), lowMem: o.lowMem}} - } - panic("unknown compression level") -} - -// WithEncoderCRC will add CRC value to output. -// Output will be 4 bytes larger. -func WithEncoderCRC(b bool) EOption { - return func(o *encoderOptions) error { o.crc = b; return nil } -} - -// WithEncoderConcurrency will set the concurrency, -// meaning the maximum number of encoders to run concurrently. -// The value supplied must be at least 1. -// For streams, setting a value of 1 will disable async compression. -// By default this will be set to GOMAXPROCS. -func WithEncoderConcurrency(n int) EOption { - return func(o *encoderOptions) error { - if n <= 0 { - return fmt.Errorf("concurrency must be at least 1") - } - o.concurrent = n - return nil - } -} - -// WithWindowSize will set the maximum allowed back-reference distance. -// The value must be a power of two between MinWindowSize and MaxWindowSize. -// A larger value will enable better compression but allocate more memory and, -// for above-default values, take considerably longer. -// The default value is determined by the compression level. -func WithWindowSize(n int) EOption { - return func(o *encoderOptions) error { - switch { - case n < MinWindowSize: - return fmt.Errorf("window size must be at least %d", MinWindowSize) - case n > MaxWindowSize: - return fmt.Errorf("window size must be at most %d", MaxWindowSize) - case (n & (n - 1)) != 0: - return errors.New("window size must be a power of 2") - } - - o.windowSize = n - o.customWindow = true - if o.blockSize > o.windowSize { - o.blockSize = o.windowSize - o.customBlockSize = true - } - return nil - } -} - -// WithEncoderPadding will add padding to all output so the size will be a multiple of n. -// This can be used to obfuscate the exact output size or make blocks of a certain size. -// The contents will be a skippable frame, so it will be invisible by the decoder. -// n must be > 0 and <= 1GB, 1<<30 bytes. -// The padded area will be filled with data from crypto/rand.Reader. -// If `EncodeAll` is used with data already in the destination, the total size will be multiple of this. -func WithEncoderPadding(n int) EOption { - return func(o *encoderOptions) error { - if n <= 0 { - return fmt.Errorf("padding must be at least 1") - } - // No need to waste our time. - if n == 1 { - n = 0 - } - if n > 1<<30 { - return fmt.Errorf("padding must less than 1GB (1<<30 bytes) ") - } - o.pad = n - return nil - } -} - -// EncoderLevel predefines encoder compression levels. -// Only use the constants made available, since the actual mapping -// of these values are very likely to change and your compression could change -// unpredictably when upgrading the library. -type EncoderLevel int - -const ( - speedNotSet EncoderLevel = iota - - // SpeedFastest will choose the fastest reasonable compression. - // This is roughly equivalent to the fastest Zstandard mode. - SpeedFastest - - // SpeedDefault is the default "pretty fast" compression option. - // This is roughly equivalent to the default Zstandard mode (level 3). - SpeedDefault - - // SpeedBetterCompression will yield better compression than the default. - // Currently it is about zstd level 7-8 with ~ 2x-3x the default CPU usage. - // By using this, notice that CPU usage may go up in the future. - SpeedBetterCompression - - // SpeedBestCompression will choose the best available compression option. - // This will offer the best compression no matter the CPU cost. - SpeedBestCompression - - // speedLast should be kept as the last actual compression option. - // The is not for external usage, but is used to keep track of the valid options. - speedLast -) - -// EncoderLevelFromString will convert a string representation of an encoding level back -// to a compression level. The compare is not case sensitive. -// If the string wasn't recognized, (false, SpeedDefault) will be returned. -func EncoderLevelFromString(s string) (bool, EncoderLevel) { - for l := speedNotSet + 1; l < speedLast; l++ { - if strings.EqualFold(s, l.String()) { - return true, l - } - } - return false, SpeedDefault -} - -// EncoderLevelFromZstd will return an encoder level that closest matches the compression -// ratio of a specific zstd compression level. -// Many input values will provide the same compression level. -func EncoderLevelFromZstd(level int) EncoderLevel { - switch { - case level < 3: - return SpeedFastest - case level >= 3 && level < 6: - return SpeedDefault - case level >= 6 && level < 10: - return SpeedBetterCompression - default: - return SpeedBestCompression - } -} - -// String provides a string representation of the compression level. -func (e EncoderLevel) String() string { - switch e { - case SpeedFastest: - return "fastest" - case SpeedDefault: - return "default" - case SpeedBetterCompression: - return "better" - case SpeedBestCompression: - return "best" - default: - return "invalid" - } -} - -// WithEncoderLevel specifies a predefined compression level. -func WithEncoderLevel(l EncoderLevel) EOption { - return func(o *encoderOptions) error { - switch { - case l <= speedNotSet || l >= speedLast: - return fmt.Errorf("unknown encoder level") - } - o.level = l - if !o.customWindow { - switch o.level { - case SpeedFastest: - o.windowSize = 4 << 20 - if !o.customBlockSize { - o.blockSize = 1 << 16 - } - case SpeedDefault: - o.windowSize = 8 << 20 - case SpeedBetterCompression: - o.windowSize = 16 << 20 - case SpeedBestCompression: - o.windowSize = 32 << 20 - } - } - if !o.customALEntropy { - o.allLitEntropy = l > SpeedDefault - } - - return nil - } -} - -// WithZeroFrames will encode 0 length input as full frames. -// This can be needed for compatibility with zstandard usage, -// but is not needed for this package. -func WithZeroFrames(b bool) EOption { - return func(o *encoderOptions) error { - o.fullZero = b - return nil - } -} - -// WithAllLitEntropyCompression will apply entropy compression if no matches are found. -// Disabling this will skip incompressible data faster, but in cases with no matches but -// skewed character distribution compression is lost. -// Default value depends on the compression level selected. -func WithAllLitEntropyCompression(b bool) EOption { - return func(o *encoderOptions) error { - o.customALEntropy = true - o.allLitEntropy = b - return nil - } -} - -// WithNoEntropyCompression will always skip entropy compression of literals. -// This can be useful if content has matches, but unlikely to benefit from entropy -// compression. Usually the slight speed improvement is not worth enabling this. -func WithNoEntropyCompression(b bool) EOption { - return func(o *encoderOptions) error { - o.noEntropy = b - return nil - } -} - -// WithSingleSegment will set the "single segment" flag when EncodeAll is used. -// If this flag is set, data must be regenerated within a single continuous memory segment. -// In this case, Window_Descriptor byte is skipped, but Frame_Content_Size is necessarily present. -// As a consequence, the decoder must allocate a memory segment of size equal or larger than size of your content. -// In order to preserve the decoder from unreasonable memory requirements, -// a decoder is allowed to reject a compressed frame which requests a memory size beyond decoder's authorized range. -// For broader compatibility, decoders are recommended to support memory sizes of at least 8 MB. -// This is only a recommendation, each decoder is free to support higher or lower limits, depending on local limitations. -// If this is not specified, block encodes will automatically choose this based on the input size and the window size. -// This setting has no effect on streamed encodes. -func WithSingleSegment(b bool) EOption { - return func(o *encoderOptions) error { - o.single = &b - return nil - } -} - -// WithLowerEncoderMem will trade in some memory cases trade less memory usage for -// slower encoding speed. -// This will not change the window size which is the primary function for reducing -// memory usage. See WithWindowSize. -func WithLowerEncoderMem(b bool) EOption { - return func(o *encoderOptions) error { - o.lowMem = b - return nil - } -} - -// WithEncoderDict allows to register a dictionary that will be used for the encode. -// -// The slice dict must be in the [dictionary format] produced by -// "zstd --train" from the Zstandard reference implementation. -// -// The encoder *may* choose to use no dictionary instead for certain payloads. -// -// [dictionary format]: https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary-format -func WithEncoderDict(dict []byte) EOption { - return func(o *encoderOptions) error { - d, err := loadDict(dict) - if err != nil { - return err - } - o.dict = d - return nil - } -} - -// WithEncoderDictRaw registers a dictionary that may be used by the encoder. -// -// The slice content may contain arbitrary data. It will be used as an initial -// history. -func WithEncoderDictRaw(id uint32, content []byte) EOption { - return func(o *encoderOptions) error { - if bits.UintSize > 32 && uint(len(content)) > dictMaxLength { - return fmt.Errorf("dictionary of size %d > 2GiB too large", len(content)) - } - o.dict = &dict{id: id, content: content, offsets: [3]int{1, 4, 8}} - return nil - } -} diff --git a/vendor/github.com/klauspost/compress/zstd/framedec.go b/vendor/github.com/klauspost/compress/zstd/framedec.go deleted file mode 100644 index 53e160f7..00000000 --- a/vendor/github.com/klauspost/compress/zstd/framedec.go +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "encoding/binary" - "encoding/hex" - "errors" - "io" - - "github.com/klauspost/compress/zstd/internal/xxhash" -) - -type frameDec struct { - o decoderOptions - crc *xxhash.Digest - - WindowSize uint64 - - // Frame history passed between blocks - history history - - rawInput byteBuffer - - // Byte buffer that can be reused for small input blocks. - bBuf byteBuf - - FrameContentSize uint64 - - DictionaryID uint32 - HasCheckSum bool - SingleSegment bool -} - -const ( - // MinWindowSize is the minimum Window Size, which is 1 KB. - MinWindowSize = 1 << 10 - - // MaxWindowSize is the maximum encoder window size - // and the default decoder maximum window size. - MaxWindowSize = 1 << 29 -) - -const ( - frameMagic = "\x28\xb5\x2f\xfd" - skippableFrameMagic = "\x2a\x4d\x18" -) - -func newFrameDec(o decoderOptions) *frameDec { - if o.maxWindowSize > o.maxDecodedSize { - o.maxWindowSize = o.maxDecodedSize - } - d := frameDec{ - o: o, - } - return &d -} - -// reset will read the frame header and prepare for block decoding. -// If nothing can be read from the input, io.EOF will be returned. -// Any other error indicated that the stream contained data, but -// there was a problem. -func (d *frameDec) reset(br byteBuffer) error { - d.HasCheckSum = false - d.WindowSize = 0 - var signature [4]byte - for { - var err error - // Check if we can read more... - b, err := br.readSmall(1) - switch err { - case io.EOF, io.ErrUnexpectedEOF: - return io.EOF - case nil: - signature[0] = b[0] - default: - return err - } - // Read the rest, don't allow io.ErrUnexpectedEOF - b, err = br.readSmall(3) - switch err { - case io.EOF: - return io.EOF - case nil: - copy(signature[1:], b) - default: - return err - } - - if string(signature[1:4]) != skippableFrameMagic || signature[0]&0xf0 != 0x50 { - if debugDecoder { - println("Not skippable", hex.EncodeToString(signature[:]), hex.EncodeToString([]byte(skippableFrameMagic))) - } - // Break if not skippable frame. - break - } - // Read size to skip - b, err = br.readSmall(4) - if err != nil { - if debugDecoder { - println("Reading Frame Size", err) - } - return err - } - n := uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24) - println("Skipping frame with", n, "bytes.") - err = br.skipN(int64(n)) - if err != nil { - if debugDecoder { - println("Reading discarded frame", err) - } - return err - } - } - if string(signature[:]) != frameMagic { - if debugDecoder { - println("Got magic numbers: ", signature, "want:", []byte(frameMagic)) - } - return ErrMagicMismatch - } - - // Read Frame_Header_Descriptor - fhd, err := br.readByte() - if err != nil { - if debugDecoder { - println("Reading Frame_Header_Descriptor", err) - } - return err - } - d.SingleSegment = fhd&(1<<5) != 0 - - if fhd&(1<<3) != 0 { - return errors.New("reserved bit set on frame header") - } - - // Read Window_Descriptor - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#window_descriptor - d.WindowSize = 0 - if !d.SingleSegment { - wd, err := br.readByte() - if err != nil { - if debugDecoder { - println("Reading Window_Descriptor", err) - } - return err - } - printf("raw: %x, mantissa: %d, exponent: %d\n", wd, wd&7, wd>>3) - windowLog := 10 + (wd >> 3) - windowBase := uint64(1) << windowLog - windowAdd := (windowBase / 8) * uint64(wd&0x7) - d.WindowSize = windowBase + windowAdd - } - - // Read Dictionary_ID - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#dictionary_id - d.DictionaryID = 0 - if size := fhd & 3; size != 0 { - if size == 3 { - size = 4 - } - - b, err := br.readSmall(int(size)) - if err != nil { - println("Reading Dictionary_ID", err) - return err - } - var id uint32 - switch len(b) { - case 1: - id = uint32(b[0]) - case 2: - id = uint32(b[0]) | (uint32(b[1]) << 8) - case 4: - id = uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24) - } - if debugDecoder { - println("Dict size", size, "ID:", id) - } - d.DictionaryID = id - } - - // Read Frame_Content_Size - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#frame_content_size - var fcsSize int - v := fhd >> 6 - switch v { - case 0: - if d.SingleSegment { - fcsSize = 1 - } - default: - fcsSize = 1 << v - } - d.FrameContentSize = fcsUnknown - if fcsSize > 0 { - b, err := br.readSmall(fcsSize) - if err != nil { - println("Reading Frame content", err) - return err - } - switch len(b) { - case 1: - d.FrameContentSize = uint64(b[0]) - case 2: - // When FCS_Field_Size is 2, the offset of 256 is added. - d.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) + 256 - case 4: - d.FrameContentSize = uint64(b[0]) | (uint64(b[1]) << 8) | (uint64(b[2]) << 16) | (uint64(b[3]) << 24) - case 8: - d1 := uint32(b[0]) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24) - d2 := uint32(b[4]) | (uint32(b[5]) << 8) | (uint32(b[6]) << 16) | (uint32(b[7]) << 24) - d.FrameContentSize = uint64(d1) | (uint64(d2) << 32) - } - if debugDecoder { - println("Read FCS:", d.FrameContentSize) - } - } - - // Move this to shared. - d.HasCheckSum = fhd&(1<<2) != 0 - if d.HasCheckSum { - if d.crc == nil { - d.crc = xxhash.New() - } - d.crc.Reset() - } - - if d.WindowSize > d.o.maxWindowSize { - if debugDecoder { - printf("window size %d > max %d\n", d.WindowSize, d.o.maxWindowSize) - } - return ErrWindowSizeExceeded - } - - if d.WindowSize == 0 && d.SingleSegment { - // We may not need window in this case. - d.WindowSize = d.FrameContentSize - if d.WindowSize < MinWindowSize { - d.WindowSize = MinWindowSize - } - if d.WindowSize > d.o.maxDecodedSize { - if debugDecoder { - printf("window size %d > max %d\n", d.WindowSize, d.o.maxWindowSize) - } - return ErrDecoderSizeExceeded - } - } - - // The minimum Window_Size is 1 KB. - if d.WindowSize < MinWindowSize { - if debugDecoder { - println("got window size: ", d.WindowSize) - } - return ErrWindowSizeTooSmall - } - d.history.windowSize = int(d.WindowSize) - if !d.o.lowMem || d.history.windowSize < maxBlockSize { - // Alloc 2x window size if not low-mem, or window size below 2MB. - d.history.allocFrameBuffer = d.history.windowSize * 2 - } else { - if d.o.lowMem { - // Alloc with 1MB extra. - d.history.allocFrameBuffer = d.history.windowSize + maxBlockSize/2 - } else { - // Alloc with 2MB extra. - d.history.allocFrameBuffer = d.history.windowSize + maxBlockSize - } - } - - if debugDecoder { - println("Frame: Dict:", d.DictionaryID, "FrameContentSize:", d.FrameContentSize, "singleseg:", d.SingleSegment, "window:", d.WindowSize, "crc:", d.HasCheckSum) - } - - // history contains input - maybe we do something - d.rawInput = br - return nil -} - -// next will start decoding the next block from stream. -func (d *frameDec) next(block *blockDec) error { - if debugDecoder { - println("decoding new block") - } - err := block.reset(d.rawInput, d.WindowSize) - if err != nil { - println("block error:", err) - // Signal the frame decoder we have a problem. - block.sendErr(err) - return err - } - return nil -} - -// checkCRC will check the checksum, assuming the frame has one. -// Will return ErrCRCMismatch if crc check failed, otherwise nil. -func (d *frameDec) checkCRC() error { - // We can overwrite upper tmp now - buf, err := d.rawInput.readSmall(4) - if err != nil { - println("CRC missing?", err) - return err - } - - want := binary.LittleEndian.Uint32(buf[:4]) - got := uint32(d.crc.Sum64()) - - if got != want { - if debugDecoder { - printf("CRC check failed: got %08x, want %08x\n", got, want) - } - return ErrCRCMismatch - } - if debugDecoder { - printf("CRC ok %08x\n", got) - } - return nil -} - -// consumeCRC skips over the checksum, assuming the frame has one. -func (d *frameDec) consumeCRC() error { - _, err := d.rawInput.readSmall(4) - if err != nil { - println("CRC missing?", err) - } - return err -} - -// runDecoder will run the decoder for the remainder of the frame. -func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) { - saved := d.history.b - - // We use the history for output to avoid copying it. - d.history.b = dst - d.history.ignoreBuffer = len(dst) - // Store input length, so we only check new data. - crcStart := len(dst) - d.history.decoders.maxSyncLen = 0 - if d.o.limitToCap { - d.history.decoders.maxSyncLen = uint64(cap(dst) - len(dst)) - } - if d.FrameContentSize != fcsUnknown { - if !d.o.limitToCap || d.FrameContentSize+uint64(len(dst)) < d.history.decoders.maxSyncLen { - d.history.decoders.maxSyncLen = d.FrameContentSize + uint64(len(dst)) - } - if d.history.decoders.maxSyncLen > d.o.maxDecodedSize { - if debugDecoder { - println("maxSyncLen:", d.history.decoders.maxSyncLen, "> maxDecodedSize:", d.o.maxDecodedSize) - } - return dst, ErrDecoderSizeExceeded - } - if debugDecoder { - println("maxSyncLen:", d.history.decoders.maxSyncLen) - } - if !d.o.limitToCap && uint64(cap(dst)) < d.history.decoders.maxSyncLen { - // Alloc for output - dst2 := make([]byte, len(dst), d.history.decoders.maxSyncLen+compressedBlockOverAlloc) - copy(dst2, dst) - dst = dst2 - } - } - var err error - for { - err = dec.reset(d.rawInput, d.WindowSize) - if err != nil { - break - } - if debugDecoder { - println("next block:", dec) - } - err = dec.decodeBuf(&d.history) - if err != nil { - break - } - if uint64(len(d.history.b)-crcStart) > d.o.maxDecodedSize { - println("runDecoder: maxDecodedSize exceeded", uint64(len(d.history.b)-crcStart), ">", d.o.maxDecodedSize) - err = ErrDecoderSizeExceeded - break - } - if d.o.limitToCap && len(d.history.b) > cap(dst) { - println("runDecoder: cap exceeded", uint64(len(d.history.b)), ">", cap(dst)) - err = ErrDecoderSizeExceeded - break - } - if uint64(len(d.history.b)-crcStart) > d.FrameContentSize { - println("runDecoder: FrameContentSize exceeded", uint64(len(d.history.b)-crcStart), ">", d.FrameContentSize) - err = ErrFrameSizeExceeded - break - } - if dec.Last { - break - } - if debugDecoder { - println("runDecoder: FrameContentSize", uint64(len(d.history.b)-crcStart), "<=", d.FrameContentSize) - } - } - dst = d.history.b - if err == nil { - if d.FrameContentSize != fcsUnknown && uint64(len(d.history.b)-crcStart) != d.FrameContentSize { - err = ErrFrameSizeMismatch - } else if d.HasCheckSum { - if d.o.ignoreChecksum { - err = d.consumeCRC() - } else { - d.crc.Write(dst[crcStart:]) - err = d.checkCRC() - } - } - } - d.history.b = saved - return dst, err -} diff --git a/vendor/github.com/klauspost/compress/zstd/frameenc.go b/vendor/github.com/klauspost/compress/zstd/frameenc.go deleted file mode 100644 index 2f5d5ed4..00000000 --- a/vendor/github.com/klauspost/compress/zstd/frameenc.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "encoding/binary" - "fmt" - "io" - "math" - "math/bits" -) - -type frameHeader struct { - ContentSize uint64 - WindowSize uint32 - SingleSegment bool - Checksum bool - DictID uint32 -} - -const maxHeaderSize = 14 - -func (f frameHeader) appendTo(dst []byte) []byte { - dst = append(dst, frameMagic...) - var fhd uint8 - if f.Checksum { - fhd |= 1 << 2 - } - if f.SingleSegment { - fhd |= 1 << 5 - } - - var dictIDContent []byte - if f.DictID > 0 { - var tmp [4]byte - if f.DictID < 256 { - fhd |= 1 - tmp[0] = uint8(f.DictID) - dictIDContent = tmp[:1] - } else if f.DictID < 1<<16 { - fhd |= 2 - binary.LittleEndian.PutUint16(tmp[:2], uint16(f.DictID)) - dictIDContent = tmp[:2] - } else { - fhd |= 3 - binary.LittleEndian.PutUint32(tmp[:4], f.DictID) - dictIDContent = tmp[:4] - } - } - var fcs uint8 - if f.ContentSize >= 256 { - fcs++ - } - if f.ContentSize >= 65536+256 { - fcs++ - } - if f.ContentSize >= 0xffffffff { - fcs++ - } - - fhd |= fcs << 6 - - dst = append(dst, fhd) - if !f.SingleSegment { - const winLogMin = 10 - windowLog := (bits.Len32(f.WindowSize-1) - winLogMin) << 3 - dst = append(dst, uint8(windowLog)) - } - if f.DictID > 0 { - dst = append(dst, dictIDContent...) - } - switch fcs { - case 0: - if f.SingleSegment { - dst = append(dst, uint8(f.ContentSize)) - } - // Unless SingleSegment is set, framessizes < 256 are nto stored. - case 1: - f.ContentSize -= 256 - dst = append(dst, uint8(f.ContentSize), uint8(f.ContentSize>>8)) - case 2: - dst = append(dst, uint8(f.ContentSize), uint8(f.ContentSize>>8), uint8(f.ContentSize>>16), uint8(f.ContentSize>>24)) - case 3: - dst = append(dst, uint8(f.ContentSize), uint8(f.ContentSize>>8), uint8(f.ContentSize>>16), uint8(f.ContentSize>>24), - uint8(f.ContentSize>>32), uint8(f.ContentSize>>40), uint8(f.ContentSize>>48), uint8(f.ContentSize>>56)) - default: - panic("invalid fcs") - } - return dst -} - -const skippableFrameHeader = 4 + 4 - -// calcSkippableFrame will return a total size to be added for written -// to be divisible by multiple. -// The value will always be > skippableFrameHeader. -// The function will panic if written < 0 or wantMultiple <= 0. -func calcSkippableFrame(written, wantMultiple int64) int { - if wantMultiple <= 0 { - panic("wantMultiple <= 0") - } - if written < 0 { - panic("written < 0") - } - leftOver := written % wantMultiple - if leftOver == 0 { - return 0 - } - toAdd := wantMultiple - leftOver - for toAdd < skippableFrameHeader { - toAdd += wantMultiple - } - return int(toAdd) -} - -// skippableFrame will add a skippable frame with a total size of bytes. -// total should be >= skippableFrameHeader and < math.MaxUint32. -func skippableFrame(dst []byte, total int, r io.Reader) ([]byte, error) { - if total == 0 { - return dst, nil - } - if total < skippableFrameHeader { - return dst, fmt.Errorf("requested skippable frame (%d) < 8", total) - } - if int64(total) > math.MaxUint32 { - return dst, fmt.Errorf("requested skippable frame (%d) > max uint32", total) - } - dst = append(dst, 0x50, 0x2a, 0x4d, 0x18) - f := uint32(total - skippableFrameHeader) - dst = append(dst, uint8(f), uint8(f>>8), uint8(f>>16), uint8(f>>24)) - start := len(dst) - dst = append(dst, make([]byte, f)...) - _, err := io.ReadFull(r, dst[start:]) - return dst, err -} diff --git a/vendor/github.com/klauspost/compress/zstd/fse_decoder.go b/vendor/github.com/klauspost/compress/zstd/fse_decoder.go deleted file mode 100644 index 2f8860a7..00000000 --- a/vendor/github.com/klauspost/compress/zstd/fse_decoder.go +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "encoding/binary" - "errors" - "fmt" - "io" -) - -const ( - tablelogAbsoluteMax = 9 -) - -const ( - /*!MEMORY_USAGE : - * Memory usage formula : N->2^N Bytes (examples : 10 -> 1KB; 12 -> 4KB ; 16 -> 64KB; 20 -> 1MB; etc.) - * Increasing memory usage improves compression ratio - * Reduced memory usage can improve speed, due to cache effect - * Recommended max value is 14, for 16KB, which nicely fits into Intel x86 L1 cache */ - maxMemoryUsage = tablelogAbsoluteMax + 2 - - maxTableLog = maxMemoryUsage - 2 - maxTablesize = 1 << maxTableLog - maxTableMask = (1 << maxTableLog) - 1 - minTablelog = 5 - maxSymbolValue = 255 -) - -// fseDecoder provides temporary storage for compression and decompression. -type fseDecoder struct { - dt [maxTablesize]decSymbol // Decompression table. - symbolLen uint16 // Length of active part of the symbol table. - actualTableLog uint8 // Selected tablelog. - maxBits uint8 // Maximum number of additional bits - - // used for table creation to avoid allocations. - stateTable [256]uint16 - norm [maxSymbolValue + 1]int16 - preDefined bool -} - -// tableStep returns the next table index. -func tableStep(tableSize uint32) uint32 { - return (tableSize >> 1) + (tableSize >> 3) + 3 -} - -// readNCount will read the symbol distribution so decoding tables can be constructed. -func (s *fseDecoder) readNCount(b *byteReader, maxSymbol uint16) error { - var ( - charnum uint16 - previous0 bool - ) - if b.remain() < 4 { - return errors.New("input too small") - } - bitStream := b.Uint32NC() - nbBits := uint((bitStream & 0xF) + minTablelog) // extract tableLog - if nbBits > tablelogAbsoluteMax { - println("Invalid tablelog:", nbBits) - return errors.New("tableLog too large") - } - bitStream >>= 4 - bitCount := uint(4) - - s.actualTableLog = uint8(nbBits) - remaining := int32((1 << nbBits) + 1) - threshold := int32(1 << nbBits) - gotTotal := int32(0) - nbBits++ - - for remaining > 1 && charnum <= maxSymbol { - if previous0 { - //println("prev0") - n0 := charnum - for (bitStream & 0xFFFF) == 0xFFFF { - //println("24 x 0") - n0 += 24 - if r := b.remain(); r > 5 { - b.advance(2) - // The check above should make sure we can read 32 bits - bitStream = b.Uint32NC() >> bitCount - } else { - // end of bit stream - bitStream >>= 16 - bitCount += 16 - } - } - //printf("bitstream: %d, 0b%b", bitStream&3, bitStream) - for (bitStream & 3) == 3 { - n0 += 3 - bitStream >>= 2 - bitCount += 2 - } - n0 += uint16(bitStream & 3) - bitCount += 2 - - if n0 > maxSymbolValue { - return errors.New("maxSymbolValue too small") - } - //println("inserting ", n0-charnum, "zeroes from idx", charnum, "ending before", n0) - for charnum < n0 { - s.norm[uint8(charnum)] = 0 - charnum++ - } - - if r := b.remain(); r >= 7 || r-int(bitCount>>3) >= 4 { - b.advance(bitCount >> 3) - bitCount &= 7 - // The check above should make sure we can read 32 bits - bitStream = b.Uint32NC() >> bitCount - } else { - bitStream >>= 2 - } - } - - max := (2*threshold - 1) - remaining - var count int32 - - if int32(bitStream)&(threshold-1) < max { - count = int32(bitStream) & (threshold - 1) - if debugAsserts && nbBits < 1 { - panic("nbBits underflow") - } - bitCount += nbBits - 1 - } else { - count = int32(bitStream) & (2*threshold - 1) - if count >= threshold { - count -= max - } - bitCount += nbBits - } - - // extra accuracy - count-- - if count < 0 { - // -1 means +1 - remaining += count - gotTotal -= count - } else { - remaining -= count - gotTotal += count - } - s.norm[charnum&0xff] = int16(count) - charnum++ - previous0 = count == 0 - for remaining < threshold { - nbBits-- - threshold >>= 1 - } - - if r := b.remain(); r >= 7 || r-int(bitCount>>3) >= 4 { - b.advance(bitCount >> 3) - bitCount &= 7 - // The check above should make sure we can read 32 bits - bitStream = b.Uint32NC() >> (bitCount & 31) - } else { - bitCount -= (uint)(8 * (len(b.b) - 4 - b.off)) - b.off = len(b.b) - 4 - bitStream = b.Uint32() >> (bitCount & 31) - } - } - s.symbolLen = charnum - if s.symbolLen <= 1 { - return fmt.Errorf("symbolLen (%d) too small", s.symbolLen) - } - if s.symbolLen > maxSymbolValue+1 { - return fmt.Errorf("symbolLen (%d) too big", s.symbolLen) - } - if remaining != 1 { - return fmt.Errorf("corruption detected (remaining %d != 1)", remaining) - } - if bitCount > 32 { - return fmt.Errorf("corruption detected (bitCount %d > 32)", bitCount) - } - if gotTotal != 1<> 3) - return s.buildDtable() -} - -func (s *fseDecoder) mustReadFrom(r io.Reader) { - fatalErr := func(err error) { - if err != nil { - panic(err) - } - } - // dt [maxTablesize]decSymbol // Decompression table. - // symbolLen uint16 // Length of active part of the symbol table. - // actualTableLog uint8 // Selected tablelog. - // maxBits uint8 // Maximum number of additional bits - // // used for table creation to avoid allocations. - // stateTable [256]uint16 - // norm [maxSymbolValue + 1]int16 - // preDefined bool - fatalErr(binary.Read(r, binary.LittleEndian, &s.dt)) - fatalErr(binary.Read(r, binary.LittleEndian, &s.symbolLen)) - fatalErr(binary.Read(r, binary.LittleEndian, &s.actualTableLog)) - fatalErr(binary.Read(r, binary.LittleEndian, &s.maxBits)) - fatalErr(binary.Read(r, binary.LittleEndian, &s.stateTable)) - fatalErr(binary.Read(r, binary.LittleEndian, &s.norm)) - fatalErr(binary.Read(r, binary.LittleEndian, &s.preDefined)) -} - -// decSymbol contains information about a state entry, -// Including the state offset base, the output symbol and -// the number of bits to read for the low part of the destination state. -// Using a composite uint64 is faster than a struct with separate members. -type decSymbol uint64 - -func newDecSymbol(nbits, addBits uint8, newState uint16, baseline uint32) decSymbol { - return decSymbol(nbits) | (decSymbol(addBits) << 8) | (decSymbol(newState) << 16) | (decSymbol(baseline) << 32) -} - -func (d decSymbol) nbBits() uint8 { - return uint8(d) -} - -func (d decSymbol) addBits() uint8 { - return uint8(d >> 8) -} - -func (d decSymbol) newState() uint16 { - return uint16(d >> 16) -} - -func (d decSymbol) baselineInt() int { - return int(d >> 32) -} - -func (d *decSymbol) setNBits(nBits uint8) { - const mask = 0xffffffffffffff00 - *d = (*d & mask) | decSymbol(nBits) -} - -func (d *decSymbol) setAddBits(addBits uint8) { - const mask = 0xffffffffffff00ff - *d = (*d & mask) | (decSymbol(addBits) << 8) -} - -func (d *decSymbol) setNewState(state uint16) { - const mask = 0xffffffff0000ffff - *d = (*d & mask) | decSymbol(state)<<16 -} - -func (d *decSymbol) setExt(addBits uint8, baseline uint32) { - const mask = 0xffff00ff - *d = (*d & mask) | (decSymbol(addBits) << 8) | (decSymbol(baseline) << 32) -} - -// decSymbolValue returns the transformed decSymbol for the given symbol. -func decSymbolValue(symb uint8, t []baseOffset) (decSymbol, error) { - if int(symb) >= len(t) { - return 0, fmt.Errorf("rle symbol %d >= max %d", symb, len(t)) - } - lu := t[symb] - return newDecSymbol(0, lu.addBits, 0, lu.baseLine), nil -} - -// setRLE will set the decoder til RLE mode. -func (s *fseDecoder) setRLE(symbol decSymbol) { - s.actualTableLog = 0 - s.maxBits = symbol.addBits() - s.dt[0] = symbol -} - -// transform will transform the decoder table into a table usable for -// decoding without having to apply the transformation while decoding. -// The state will contain the base value and the number of bits to read. -func (s *fseDecoder) transform(t []baseOffset) error { - tableSize := uint16(1 << s.actualTableLog) - s.maxBits = 0 - for i, v := range s.dt[:tableSize] { - add := v.addBits() - if int(add) >= len(t) { - return fmt.Errorf("invalid decoding table entry %d, symbol %d >= max (%d)", i, v.addBits(), len(t)) - } - lu := t[add] - if lu.addBits > s.maxBits { - s.maxBits = lu.addBits - } - v.setExt(lu.addBits, lu.baseLine) - s.dt[i] = v - } - return nil -} - -type fseState struct { - dt []decSymbol - state decSymbol -} - -// Initialize and decodeAsync first state and symbol. -func (s *fseState) init(br *bitReader, tableLog uint8, dt []decSymbol) { - s.dt = dt - br.fill() - s.state = dt[br.getBits(tableLog)] -} - -// final returns the current state symbol without decoding the next. -func (s decSymbol) final() (int, uint8) { - return s.baselineInt(), s.addBits() -} diff --git a/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go b/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go deleted file mode 100644 index d04a829b..00000000 --- a/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.go +++ /dev/null @@ -1,65 +0,0 @@ -//go:build amd64 && !appengine && !noasm && gc -// +build amd64,!appengine,!noasm,gc - -package zstd - -import ( - "fmt" -) - -type buildDtableAsmContext struct { - // inputs - stateTable *uint16 - norm *int16 - dt *uint64 - - // outputs --- set by the procedure in the case of error; - // for interpretation please see the error handling part below - errParam1 uint64 - errParam2 uint64 -} - -// buildDtable_asm is an x86 assembly implementation of fseDecoder.buildDtable. -// Function returns non-zero exit code on error. -// -//go:noescape -func buildDtable_asm(s *fseDecoder, ctx *buildDtableAsmContext) int - -// please keep in sync with _generate/gen_fse.go -const ( - errorCorruptedNormalizedCounter = 1 - errorNewStateTooBig = 2 - errorNewStateNoBits = 3 -) - -// buildDtable will build the decoding table. -func (s *fseDecoder) buildDtable() error { - ctx := buildDtableAsmContext{ - stateTable: &s.stateTable[0], - norm: &s.norm[0], - dt: (*uint64)(&s.dt[0]), - } - code := buildDtable_asm(s, &ctx) - - if code != 0 { - switch code { - case errorCorruptedNormalizedCounter: - position := ctx.errParam1 - return fmt.Errorf("corrupted input (position=%d, expected 0)", position) - - case errorNewStateTooBig: - newState := decSymbol(ctx.errParam1) - size := ctx.errParam2 - return fmt.Errorf("newState (%d) outside table size (%d)", newState, size) - - case errorNewStateNoBits: - newState := decSymbol(ctx.errParam1) - oldState := decSymbol(ctx.errParam2) - return fmt.Errorf("newState (%d) == oldState (%d) and no bits", newState, oldState) - - default: - return fmt.Errorf("buildDtable_asm returned unhandled nonzero code = %d", code) - } - } - return nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.s b/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.s deleted file mode 100644 index bcde3986..00000000 --- a/vendor/github.com/klauspost/compress/zstd/fse_decoder_amd64.s +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by command: go run gen_fse.go -out ../fse_decoder_amd64.s -pkg=zstd. DO NOT EDIT. - -//go:build !appengine && !noasm && gc && !noasm - -// func buildDtable_asm(s *fseDecoder, ctx *buildDtableAsmContext) int -TEXT ·buildDtable_asm(SB), $0-24 - MOVQ ctx+8(FP), CX - MOVQ s+0(FP), DI - - // Load values - MOVBQZX 4098(DI), DX - XORQ AX, AX - BTSQ DX, AX - MOVQ (CX), BX - MOVQ 16(CX), SI - LEAQ -1(AX), R8 - MOVQ 8(CX), CX - MOVWQZX 4096(DI), DI - - // End load values - // Init, lay down lowprob symbols - XORQ R9, R9 - JMP init_main_loop_condition - -init_main_loop: - MOVWQSX (CX)(R9*2), R10 - CMPW R10, $-1 - JNE do_not_update_high_threshold - MOVB R9, 1(SI)(R8*8) - DECQ R8 - MOVQ $0x0000000000000001, R10 - -do_not_update_high_threshold: - MOVW R10, (BX)(R9*2) - INCQ R9 - -init_main_loop_condition: - CMPQ R9, DI - JL init_main_loop - - // Spread symbols - // Calculate table step - MOVQ AX, R9 - SHRQ $0x01, R9 - MOVQ AX, R10 - SHRQ $0x03, R10 - LEAQ 3(R9)(R10*1), R9 - - // Fill add bits values - LEAQ -1(AX), R10 - XORQ R11, R11 - XORQ R12, R12 - JMP spread_main_loop_condition - -spread_main_loop: - XORQ R13, R13 - MOVWQSX (CX)(R12*2), R14 - JMP spread_inner_loop_condition - -spread_inner_loop: - MOVB R12, 1(SI)(R11*8) - -adjust_position: - ADDQ R9, R11 - ANDQ R10, R11 - CMPQ R11, R8 - JG adjust_position - INCQ R13 - -spread_inner_loop_condition: - CMPQ R13, R14 - JL spread_inner_loop - INCQ R12 - -spread_main_loop_condition: - CMPQ R12, DI - JL spread_main_loop - TESTQ R11, R11 - JZ spread_check_ok - MOVQ ctx+8(FP), AX - MOVQ R11, 24(AX) - MOVQ $+1, ret+16(FP) - RET - -spread_check_ok: - // Build Decoding table - XORQ DI, DI - -build_table_main_table: - MOVBQZX 1(SI)(DI*8), CX - MOVWQZX (BX)(CX*2), R8 - LEAQ 1(R8), R9 - MOVW R9, (BX)(CX*2) - MOVQ R8, R9 - BSRQ R9, R9 - MOVQ DX, CX - SUBQ R9, CX - SHLQ CL, R8 - SUBQ AX, R8 - MOVB CL, (SI)(DI*8) - MOVW R8, 2(SI)(DI*8) - CMPQ R8, AX - JLE build_table_check1_ok - MOVQ ctx+8(FP), CX - MOVQ R8, 24(CX) - MOVQ AX, 32(CX) - MOVQ $+2, ret+16(FP) - RET - -build_table_check1_ok: - TESTB CL, CL - JNZ build_table_check2_ok - CMPW R8, DI - JNE build_table_check2_ok - MOVQ ctx+8(FP), AX - MOVQ R8, 24(AX) - MOVQ DI, 32(AX) - MOVQ $+3, ret+16(FP) - RET - -build_table_check2_ok: - INCQ DI - CMPQ DI, AX - JL build_table_main_table - MOVQ $+0, ret+16(FP) - RET diff --git a/vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go b/vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go deleted file mode 100644 index 332e51fe..00000000 --- a/vendor/github.com/klauspost/compress/zstd/fse_decoder_generic.go +++ /dev/null @@ -1,72 +0,0 @@ -//go:build !amd64 || appengine || !gc || noasm -// +build !amd64 appengine !gc noasm - -package zstd - -import ( - "errors" - "fmt" -) - -// buildDtable will build the decoding table. -func (s *fseDecoder) buildDtable() error { - tableSize := uint32(1 << s.actualTableLog) - highThreshold := tableSize - 1 - symbolNext := s.stateTable[:256] - - // Init, lay down lowprob symbols - { - for i, v := range s.norm[:s.symbolLen] { - if v == -1 { - s.dt[highThreshold].setAddBits(uint8(i)) - highThreshold-- - symbolNext[i] = 1 - } else { - symbolNext[i] = uint16(v) - } - } - } - - // Spread symbols - { - tableMask := tableSize - 1 - step := tableStep(tableSize) - position := uint32(0) - for ss, v := range s.norm[:s.symbolLen] { - for i := 0; i < int(v); i++ { - s.dt[position].setAddBits(uint8(ss)) - position = (position + step) & tableMask - for position > highThreshold { - // lowprob area - position = (position + step) & tableMask - } - } - } - if position != 0 { - // position must reach all cells once, otherwise normalizedCounter is incorrect - return errors.New("corrupted input (position != 0)") - } - } - - // Build Decoding table - { - tableSize := uint16(1 << s.actualTableLog) - for u, v := range s.dt[:tableSize] { - symbol := v.addBits() - nextState := symbolNext[symbol] - symbolNext[symbol] = nextState + 1 - nBits := s.actualTableLog - byte(highBits(uint32(nextState))) - s.dt[u&maxTableMask].setNBits(nBits) - newState := (nextState << nBits) - tableSize - if newState > tableSize { - return fmt.Errorf("newState (%d) outside table size (%d)", newState, tableSize) - } - if newState == uint16(u) && nBits == 0 { - // Seems weird that this is possible with nbits > 0. - return fmt.Errorf("newState (%d) == oldState (%d) and no bits", newState, u) - } - s.dt[u&maxTableMask].setNewState(newState) - } - } - return nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/fse_encoder.go b/vendor/github.com/klauspost/compress/zstd/fse_encoder.go deleted file mode 100644 index ab26326a..00000000 --- a/vendor/github.com/klauspost/compress/zstd/fse_encoder.go +++ /dev/null @@ -1,701 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "errors" - "fmt" - "math" -) - -const ( - // For encoding we only support up to - maxEncTableLog = 8 - maxEncTablesize = 1 << maxTableLog - maxEncTableMask = (1 << maxTableLog) - 1 - minEncTablelog = 5 - maxEncSymbolValue = maxMatchLengthSymbol -) - -// Scratch provides temporary storage for compression and decompression. -type fseEncoder struct { - symbolLen uint16 // Length of active part of the symbol table. - actualTableLog uint8 // Selected tablelog. - ct cTable // Compression tables. - maxCount int // count of the most probable symbol - zeroBits bool // no bits has prob > 50%. - clearCount bool // clear count - useRLE bool // This encoder is for RLE - preDefined bool // This encoder is predefined. - reUsed bool // Set to know when the encoder has been reused. - rleVal uint8 // RLE Symbol - maxBits uint8 // Maximum output bits after transform. - - // TODO: Technically zstd should be fine with 64 bytes. - count [256]uint32 - norm [256]int16 -} - -// cTable contains tables used for compression. -type cTable struct { - tableSymbol []byte - stateTable []uint16 - symbolTT []symbolTransform -} - -// symbolTransform contains the state transform for a symbol. -type symbolTransform struct { - deltaNbBits uint32 - deltaFindState int16 - outBits uint8 -} - -// String prints values as a human readable string. -func (s symbolTransform) String() string { - return fmt.Sprintf("{deltabits: %08x, findstate:%d outbits:%d}", s.deltaNbBits, s.deltaFindState, s.outBits) -} - -// Histogram allows to populate the histogram and skip that step in the compression, -// It otherwise allows to inspect the histogram when compression is done. -// To indicate that you have populated the histogram call HistogramFinished -// with the value of the highest populated symbol, as well as the number of entries -// in the most populated entry. These are accepted at face value. -func (s *fseEncoder) Histogram() *[256]uint32 { - return &s.count -} - -// HistogramFinished can be called to indicate that the histogram has been populated. -// maxSymbol is the index of the highest set symbol of the next data segment. -// maxCount is the number of entries in the most populated entry. -// These are accepted at face value. -func (s *fseEncoder) HistogramFinished(maxSymbol uint8, maxCount int) { - s.maxCount = maxCount - s.symbolLen = uint16(maxSymbol) + 1 - s.clearCount = maxCount != 0 -} - -// allocCtable will allocate tables needed for compression. -// If existing tables a re big enough, they are simply re-used. -func (s *fseEncoder) allocCtable() { - tableSize := 1 << s.actualTableLog - // get tableSymbol that is big enough. - if cap(s.ct.tableSymbol) < tableSize { - s.ct.tableSymbol = make([]byte, tableSize) - } - s.ct.tableSymbol = s.ct.tableSymbol[:tableSize] - - ctSize := tableSize - if cap(s.ct.stateTable) < ctSize { - s.ct.stateTable = make([]uint16, ctSize) - } - s.ct.stateTable = s.ct.stateTable[:ctSize] - - if cap(s.ct.symbolTT) < 256 { - s.ct.symbolTT = make([]symbolTransform, 256) - } - s.ct.symbolTT = s.ct.symbolTT[:256] -} - -// buildCTable will populate the compression table so it is ready to be used. -func (s *fseEncoder) buildCTable() error { - tableSize := uint32(1 << s.actualTableLog) - highThreshold := tableSize - 1 - var cumul [256]int16 - - s.allocCtable() - tableSymbol := s.ct.tableSymbol[:tableSize] - // symbol start positions - { - cumul[0] = 0 - for ui, v := range s.norm[:s.symbolLen-1] { - u := byte(ui) // one less than reference - if v == -1 { - // Low proba symbol - cumul[u+1] = cumul[u] + 1 - tableSymbol[highThreshold] = u - highThreshold-- - } else { - cumul[u+1] = cumul[u] + v - } - } - // Encode last symbol separately to avoid overflowing u - u := int(s.symbolLen - 1) - v := s.norm[s.symbolLen-1] - if v == -1 { - // Low proba symbol - cumul[u+1] = cumul[u] + 1 - tableSymbol[highThreshold] = byte(u) - highThreshold-- - } else { - cumul[u+1] = cumul[u] + v - } - if uint32(cumul[s.symbolLen]) != tableSize { - return fmt.Errorf("internal error: expected cumul[s.symbolLen] (%d) == tableSize (%d)", cumul[s.symbolLen], tableSize) - } - cumul[s.symbolLen] = int16(tableSize) + 1 - } - // Spread symbols - s.zeroBits = false - { - step := tableStep(tableSize) - tableMask := tableSize - 1 - var position uint32 - // if any symbol > largeLimit, we may have 0 bits output. - largeLimit := int16(1 << (s.actualTableLog - 1)) - for ui, v := range s.norm[:s.symbolLen] { - symbol := byte(ui) - if v > largeLimit { - s.zeroBits = true - } - for nbOccurrences := int16(0); nbOccurrences < v; nbOccurrences++ { - tableSymbol[position] = symbol - position = (position + step) & tableMask - for position > highThreshold { - position = (position + step) & tableMask - } /* Low proba area */ - } - } - - // Check if we have gone through all positions - if position != 0 { - return errors.New("position!=0") - } - } - - // Build table - table := s.ct.stateTable - { - tsi := int(tableSize) - for u, v := range tableSymbol { - // TableU16 : sorted by symbol order; gives next state value - table[cumul[v]] = uint16(tsi + u) - cumul[v]++ - } - } - - // Build Symbol Transformation Table - { - total := int16(0) - symbolTT := s.ct.symbolTT[:s.symbolLen] - tableLog := s.actualTableLog - tl := (uint32(tableLog) << 16) - (1 << tableLog) - for i, v := range s.norm[:s.symbolLen] { - switch v { - case 0: - case -1, 1: - symbolTT[i].deltaNbBits = tl - symbolTT[i].deltaFindState = total - 1 - total++ - default: - maxBitsOut := uint32(tableLog) - highBit(uint32(v-1)) - minStatePlus := uint32(v) << maxBitsOut - symbolTT[i].deltaNbBits = (maxBitsOut << 16) - minStatePlus - symbolTT[i].deltaFindState = total - v - total += v - } - } - if total != int16(tableSize) { - return fmt.Errorf("total mismatch %d (got) != %d (want)", total, tableSize) - } - } - return nil -} - -var rtbTable = [...]uint32{0, 473195, 504333, 520860, 550000, 700000, 750000, 830000} - -func (s *fseEncoder) setRLE(val byte) { - s.allocCtable() - s.actualTableLog = 0 - s.ct.stateTable = s.ct.stateTable[:1] - s.ct.symbolTT[val] = symbolTransform{ - deltaFindState: 0, - deltaNbBits: 0, - } - if debugEncoder { - println("setRLE: val", val, "symbolTT", s.ct.symbolTT[val]) - } - s.rleVal = val - s.useRLE = true -} - -// setBits will set output bits for the transform. -// if nil is provided, the number of bits is equal to the index. -func (s *fseEncoder) setBits(transform []byte) { - if s.reUsed || s.preDefined { - return - } - if s.useRLE { - if transform == nil { - s.ct.symbolTT[s.rleVal].outBits = s.rleVal - s.maxBits = s.rleVal - return - } - s.maxBits = transform[s.rleVal] - s.ct.symbolTT[s.rleVal].outBits = s.maxBits - return - } - if transform == nil { - for i := range s.ct.symbolTT[:s.symbolLen] { - s.ct.symbolTT[i].outBits = uint8(i) - } - s.maxBits = uint8(s.symbolLen - 1) - return - } - s.maxBits = 0 - for i, v := range transform[:s.symbolLen] { - s.ct.symbolTT[i].outBits = v - if v > s.maxBits { - // We could assume bits always going up, but we play safe. - s.maxBits = v - } - } -} - -// normalizeCount will normalize the count of the symbols so -// the total is equal to the table size. -// If successful, compression tables will also be made ready. -func (s *fseEncoder) normalizeCount(length int) error { - if s.reUsed { - return nil - } - s.optimalTableLog(length) - var ( - tableLog = s.actualTableLog - scale = 62 - uint64(tableLog) - step = (1 << 62) / uint64(length) - vStep = uint64(1) << (scale - 20) - stillToDistribute = int16(1 << tableLog) - largest int - largestP int16 - lowThreshold = (uint32)(length >> tableLog) - ) - if s.maxCount == length { - s.useRLE = true - return nil - } - s.useRLE = false - for i, cnt := range s.count[:s.symbolLen] { - // already handled - // if (count[s] == s.length) return 0; /* rle special case */ - - if cnt == 0 { - s.norm[i] = 0 - continue - } - if cnt <= lowThreshold { - s.norm[i] = -1 - stillToDistribute-- - } else { - proba := (int16)((uint64(cnt) * step) >> scale) - if proba < 8 { - restToBeat := vStep * uint64(rtbTable[proba]) - v := uint64(cnt)*step - (uint64(proba) << scale) - if v > restToBeat { - proba++ - } - } - if proba > largestP { - largestP = proba - largest = i - } - s.norm[i] = proba - stillToDistribute -= proba - } - } - - if -stillToDistribute >= (s.norm[largest] >> 1) { - // corner case, need another normalization method - err := s.normalizeCount2(length) - if err != nil { - return err - } - if debugAsserts { - err = s.validateNorm() - if err != nil { - return err - } - } - return s.buildCTable() - } - s.norm[largest] += stillToDistribute - if debugAsserts { - err := s.validateNorm() - if err != nil { - return err - } - } - return s.buildCTable() -} - -// Secondary normalization method. -// To be used when primary method fails. -func (s *fseEncoder) normalizeCount2(length int) error { - const notYetAssigned = -2 - var ( - distributed uint32 - total = uint32(length) - tableLog = s.actualTableLog - lowThreshold = total >> tableLog - lowOne = (total * 3) >> (tableLog + 1) - ) - for i, cnt := range s.count[:s.symbolLen] { - if cnt == 0 { - s.norm[i] = 0 - continue - } - if cnt <= lowThreshold { - s.norm[i] = -1 - distributed++ - total -= cnt - continue - } - if cnt <= lowOne { - s.norm[i] = 1 - distributed++ - total -= cnt - continue - } - s.norm[i] = notYetAssigned - } - toDistribute := (1 << tableLog) - distributed - - if (total / toDistribute) > lowOne { - // risk of rounding to zero - lowOne = (total * 3) / (toDistribute * 2) - for i, cnt := range s.count[:s.symbolLen] { - if (s.norm[i] == notYetAssigned) && (cnt <= lowOne) { - s.norm[i] = 1 - distributed++ - total -= cnt - continue - } - } - toDistribute = (1 << tableLog) - distributed - } - if distributed == uint32(s.symbolLen)+1 { - // all values are pretty poor; - // probably incompressible data (should have already been detected); - // find max, then give all remaining points to max - var maxV int - var maxC uint32 - for i, cnt := range s.count[:s.symbolLen] { - if cnt > maxC { - maxV = i - maxC = cnt - } - } - s.norm[maxV] += int16(toDistribute) - return nil - } - - if total == 0 { - // all of the symbols were low enough for the lowOne or lowThreshold - for i := uint32(0); toDistribute > 0; i = (i + 1) % (uint32(s.symbolLen)) { - if s.norm[i] > 0 { - toDistribute-- - s.norm[i]++ - } - } - return nil - } - - var ( - vStepLog = 62 - uint64(tableLog) - mid = uint64((1 << (vStepLog - 1)) - 1) - rStep = (((1 << vStepLog) * uint64(toDistribute)) + mid) / uint64(total) // scale on remaining - tmpTotal = mid - ) - for i, cnt := range s.count[:s.symbolLen] { - if s.norm[i] == notYetAssigned { - var ( - end = tmpTotal + uint64(cnt)*rStep - sStart = uint32(tmpTotal >> vStepLog) - sEnd = uint32(end >> vStepLog) - weight = sEnd - sStart - ) - if weight < 1 { - return errors.New("weight < 1") - } - s.norm[i] = int16(weight) - tmpTotal = end - } - } - return nil -} - -// optimalTableLog calculates and sets the optimal tableLog in s.actualTableLog -func (s *fseEncoder) optimalTableLog(length int) { - tableLog := uint8(maxEncTableLog) - minBitsSrc := highBit(uint32(length)) + 1 - minBitsSymbols := highBit(uint32(s.symbolLen-1)) + 2 - minBits := uint8(minBitsSymbols) - if minBitsSrc < minBitsSymbols { - minBits = uint8(minBitsSrc) - } - - maxBitsSrc := uint8(highBit(uint32(length-1))) - 2 - if maxBitsSrc < tableLog { - // Accuracy can be reduced - tableLog = maxBitsSrc - } - if minBits > tableLog { - tableLog = minBits - } - // Need a minimum to safely represent all symbol values - if tableLog < minEncTablelog { - tableLog = minEncTablelog - } - if tableLog > maxEncTableLog { - tableLog = maxEncTableLog - } - s.actualTableLog = tableLog -} - -// validateNorm validates the normalized histogram table. -func (s *fseEncoder) validateNorm() (err error) { - var total int - for _, v := range s.norm[:s.symbolLen] { - if v >= 0 { - total += int(v) - } else { - total -= int(v) - } - } - defer func() { - if err == nil { - return - } - fmt.Printf("selected TableLog: %d, Symbol length: %d\n", s.actualTableLog, s.symbolLen) - for i, v := range s.norm[:s.symbolLen] { - fmt.Printf("%3d: %5d -> %4d \n", i, s.count[i], v) - } - }() - if total != (1 << s.actualTableLog) { - return fmt.Errorf("warning: Total == %d != %d", total, 1<> 3) + 3 + 2 - - // Write Table Size - bitStream = uint32(tableLog - minEncTablelog) - bitCount = uint(4) - remaining = int16(tableSize + 1) /* +1 for extra accuracy */ - threshold = int16(tableSize) - nbBits = uint(tableLog + 1) - outP = len(out) - ) - if cap(out) < outP+maxHeaderSize { - out = append(out, make([]byte, maxHeaderSize*3)...) - out = out[:len(out)-maxHeaderSize*3] - } - out = out[:outP+maxHeaderSize] - - // stops at 1 - for remaining > 1 { - if previous0 { - start := charnum - for s.norm[charnum] == 0 { - charnum++ - } - for charnum >= start+24 { - start += 24 - bitStream += uint32(0xFFFF) << bitCount - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += 2 - bitStream >>= 16 - } - for charnum >= start+3 { - start += 3 - bitStream += 3 << bitCount - bitCount += 2 - } - bitStream += uint32(charnum-start) << bitCount - bitCount += 2 - if bitCount > 16 { - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += 2 - bitStream >>= 16 - bitCount -= 16 - } - } - - count := s.norm[charnum] - charnum++ - max := (2*threshold - 1) - remaining - if count < 0 { - remaining += count - } else { - remaining -= count - } - count++ // +1 for extra accuracy - if count >= threshold { - count += max // [0..max[ [max..threshold[ (...) [threshold+max 2*threshold[ - } - bitStream += uint32(count) << bitCount - bitCount += nbBits - if count < max { - bitCount-- - } - - previous0 = count == 1 - if remaining < 1 { - return nil, errors.New("internal error: remaining < 1") - } - for remaining < threshold { - nbBits-- - threshold >>= 1 - } - - if bitCount > 16 { - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += 2 - bitStream >>= 16 - bitCount -= 16 - } - } - - if outP+2 > len(out) { - return nil, fmt.Errorf("internal error: %d > %d, maxheader: %d, sl: %d, tl: %d, normcount: %v", outP+2, len(out), maxHeaderSize, s.symbolLen, int(tableLog), s.norm[:s.symbolLen]) - } - out[outP] = byte(bitStream) - out[outP+1] = byte(bitStream >> 8) - outP += int((bitCount + 7) / 8) - - if charnum > s.symbolLen { - return nil, errors.New("internal error: charnum > s.symbolLen") - } - return out[:outP], nil -} - -// Approximate symbol cost, as fractional value, using fixed-point format (accuracyLog fractional bits) -// note 1 : assume symbolValue is valid (<= maxSymbolValue) -// note 2 : if freq[symbolValue]==0, @return a fake cost of tableLog+1 bits * -func (s *fseEncoder) bitCost(symbolValue uint8, accuracyLog uint32) uint32 { - minNbBits := s.ct.symbolTT[symbolValue].deltaNbBits >> 16 - threshold := (minNbBits + 1) << 16 - if debugAsserts { - if !(s.actualTableLog < 16) { - panic("!s.actualTableLog < 16") - } - // ensure enough room for renormalization double shift - if !(uint8(accuracyLog) < 31-s.actualTableLog) { - panic("!uint8(accuracyLog) < 31-s.actualTableLog") - } - } - tableSize := uint32(1) << s.actualTableLog - deltaFromThreshold := threshold - (s.ct.symbolTT[symbolValue].deltaNbBits + tableSize) - // linear interpolation (very approximate) - normalizedDeltaFromThreshold := (deltaFromThreshold << accuracyLog) >> s.actualTableLog - bitMultiplier := uint32(1) << accuracyLog - if debugAsserts { - if s.ct.symbolTT[symbolValue].deltaNbBits+tableSize > threshold { - panic("s.ct.symbolTT[symbolValue].deltaNbBits+tableSize > threshold") - } - if normalizedDeltaFromThreshold > bitMultiplier { - panic("normalizedDeltaFromThreshold > bitMultiplier") - } - } - return (minNbBits+1)*bitMultiplier - normalizedDeltaFromThreshold -} - -// Returns the cost in bits of encoding the distribution in count using ctable. -// Histogram should only be up to the last non-zero symbol. -// Returns an -1 if ctable cannot represent all the symbols in count. -func (s *fseEncoder) approxSize(hist []uint32) uint32 { - if int(s.symbolLen) < len(hist) { - // More symbols than we have. - return math.MaxUint32 - } - if s.useRLE { - // We will never reuse RLE encoders. - return math.MaxUint32 - } - const kAccuracyLog = 8 - badCost := (uint32(s.actualTableLog) + 1) << kAccuracyLog - var cost uint32 - for i, v := range hist { - if v == 0 { - continue - } - if s.norm[i] == 0 { - return math.MaxUint32 - } - bitCost := s.bitCost(uint8(i), kAccuracyLog) - if bitCost > badCost { - return math.MaxUint32 - } - cost += v * bitCost - } - return cost >> kAccuracyLog -} - -// maxHeaderSize returns the maximum header size in bits. -// This is not exact size, but we want a penalty for new tables anyway. -func (s *fseEncoder) maxHeaderSize() uint32 { - if s.preDefined { - return 0 - } - if s.useRLE { - return 8 - } - return (((uint32(s.symbolLen) * uint32(s.actualTableLog)) >> 3) + 3) * 8 -} - -// cState contains the compression state of a stream. -type cState struct { - bw *bitWriter - stateTable []uint16 - state uint16 -} - -// init will initialize the compression state to the first symbol of the stream. -func (c *cState) init(bw *bitWriter, ct *cTable, first symbolTransform) { - c.bw = bw - c.stateTable = ct.stateTable - if len(c.stateTable) == 1 { - // RLE - c.stateTable[0] = uint16(0) - c.state = 0 - return - } - nbBitsOut := (first.deltaNbBits + (1 << 15)) >> 16 - im := int32((nbBitsOut << 16) - first.deltaNbBits) - lu := (im >> nbBitsOut) + int32(first.deltaFindState) - c.state = c.stateTable[lu] -} - -// flush will write the tablelog to the output and flush the remaining full bytes. -func (c *cState) flush(tableLog uint8) { - c.bw.flush32() - c.bw.addBits16NC(c.state, tableLog) -} diff --git a/vendor/github.com/klauspost/compress/zstd/fse_predefined.go b/vendor/github.com/klauspost/compress/zstd/fse_predefined.go deleted file mode 100644 index 474cb77d..00000000 --- a/vendor/github.com/klauspost/compress/zstd/fse_predefined.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "fmt" - "math" - "sync" -) - -var ( - // fsePredef are the predefined fse tables as defined here: - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#default-distributions - // These values are already transformed. - fsePredef [3]fseDecoder - - // fsePredefEnc are the predefined encoder based on fse tables as defined here: - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#default-distributions - // These values are already transformed. - fsePredefEnc [3]fseEncoder - - // symbolTableX contain the transformations needed for each type as defined in - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#the-codes-for-literals-lengths-match-lengths-and-offsets - symbolTableX [3][]baseOffset - - // maxTableSymbol is the biggest supported symbol for each table type - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#the-codes-for-literals-lengths-match-lengths-and-offsets - maxTableSymbol = [3]uint8{tableLiteralLengths: maxLiteralLengthSymbol, tableOffsets: maxOffsetLengthSymbol, tableMatchLengths: maxMatchLengthSymbol} - - // bitTables is the bits table for each table. - bitTables = [3][]byte{tableLiteralLengths: llBitsTable[:], tableOffsets: nil, tableMatchLengths: mlBitsTable[:]} -) - -type tableIndex uint8 - -const ( - // indexes for fsePredef and symbolTableX - tableLiteralLengths tableIndex = 0 - tableOffsets tableIndex = 1 - tableMatchLengths tableIndex = 2 - - maxLiteralLengthSymbol = 35 - maxOffsetLengthSymbol = 30 - maxMatchLengthSymbol = 52 -) - -// baseOffset is used for calculating transformations. -type baseOffset struct { - baseLine uint32 - addBits uint8 -} - -// fillBase will precalculate base offsets with the given bit distributions. -func fillBase(dst []baseOffset, base uint32, bits ...uint8) { - if len(bits) != len(dst) { - panic(fmt.Sprintf("len(dst) (%d) != len(bits) (%d)", len(dst), len(bits))) - } - for i, bit := range bits { - if base > math.MaxInt32 { - panic("invalid decoding table, base overflows int32") - } - - dst[i] = baseOffset{ - baseLine: base, - addBits: bit, - } - base += 1 << bit - } -} - -var predef sync.Once - -func initPredefined() { - predef.Do(func() { - // Literals length codes - tmp := make([]baseOffset, 36) - for i := range tmp[:16] { - tmp[i] = baseOffset{ - baseLine: uint32(i), - addBits: 0, - } - } - fillBase(tmp[16:], 16, 1, 1, 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) - symbolTableX[tableLiteralLengths] = tmp - - // Match length codes - tmp = make([]baseOffset, 53) - for i := range tmp[:32] { - tmp[i] = baseOffset{ - // The transformation adds the 3 length. - baseLine: uint32(i) + 3, - addBits: 0, - } - } - fillBase(tmp[32:], 35, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) - symbolTableX[tableMatchLengths] = tmp - - // Offset codes - tmp = make([]baseOffset, maxOffsetBits+1) - tmp[1] = baseOffset{ - baseLine: 1, - addBits: 1, - } - fillBase(tmp[2:], 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30) - symbolTableX[tableOffsets] = tmp - - // Fill predefined tables and transform them. - // https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#default-distributions - for i := range fsePredef[:] { - f := &fsePredef[i] - switch tableIndex(i) { - case tableLiteralLengths: - // https://github.com/facebook/zstd/blob/ededcfca57366461021c922720878c81a5854a0a/lib/decompress/zstd_decompress_block.c#L243 - f.actualTableLog = 6 - copy(f.norm[:], []int16{4, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 1, 1, 1, 1, 1, - -1, -1, -1, -1}) - f.symbolLen = 36 - case tableOffsets: - // https://github.com/facebook/zstd/blob/ededcfca57366461021c922720878c81a5854a0a/lib/decompress/zstd_decompress_block.c#L281 - f.actualTableLog = 5 - copy(f.norm[:], []int16{ - 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1}) - f.symbolLen = 29 - case tableMatchLengths: - //https://github.com/facebook/zstd/blob/ededcfca57366461021c922720878c81a5854a0a/lib/decompress/zstd_decompress_block.c#L304 - f.actualTableLog = 6 - copy(f.norm[:], []int16{ - 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, - -1, -1, -1, -1, -1}) - f.symbolLen = 53 - } - if err := f.buildDtable(); err != nil { - panic(fmt.Errorf("building table %v: %v", tableIndex(i), err)) - } - if err := f.transform(symbolTableX[i]); err != nil { - panic(fmt.Errorf("building table %v: %v", tableIndex(i), err)) - } - f.preDefined = true - - // Create encoder as well - enc := &fsePredefEnc[i] - copy(enc.norm[:], f.norm[:]) - enc.symbolLen = f.symbolLen - enc.actualTableLog = f.actualTableLog - if err := enc.buildCTable(); err != nil { - panic(fmt.Errorf("building encoding table %v: %v", tableIndex(i), err)) - } - enc.setBits(bitTables[i]) - enc.preDefined = true - } - }) -} diff --git a/vendor/github.com/klauspost/compress/zstd/hash.go b/vendor/github.com/klauspost/compress/zstd/hash.go deleted file mode 100644 index 5d73c21e..00000000 --- a/vendor/github.com/klauspost/compress/zstd/hash.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -const ( - prime3bytes = 506832829 - prime4bytes = 2654435761 - prime5bytes = 889523592379 - prime6bytes = 227718039650203 - prime7bytes = 58295818150454627 - prime8bytes = 0xcf1bbcdcb7a56463 -) - -// hashLen returns a hash of the lowest mls bytes of with length output bits. -// mls must be >=3 and <=8. Any other value will return hash for 4 bytes. -// length should always be < 32. -// Preferably length and mls should be a constant for inlining. -func hashLen(u uint64, length, mls uint8) uint32 { - switch mls { - case 3: - return (uint32(u<<8) * prime3bytes) >> (32 - length) - case 5: - return uint32(((u << (64 - 40)) * prime5bytes) >> (64 - length)) - case 6: - return uint32(((u << (64 - 48)) * prime6bytes) >> (64 - length)) - case 7: - return uint32(((u << (64 - 56)) * prime7bytes) >> (64 - length)) - case 8: - return uint32((u * prime8bytes) >> (64 - length)) - default: - return (uint32(u) * prime4bytes) >> (32 - length) - } -} diff --git a/vendor/github.com/klauspost/compress/zstd/history.go b/vendor/github.com/klauspost/compress/zstd/history.go deleted file mode 100644 index 09164856..00000000 --- a/vendor/github.com/klauspost/compress/zstd/history.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "github.com/klauspost/compress/huff0" -) - -// history contains the information transferred between blocks. -type history struct { - // Literal decompression - huffTree *huff0.Scratch - - // Sequence decompression - decoders sequenceDecs - recentOffsets [3]int - - // History buffer... - b []byte - - // ignoreBuffer is meant to ignore a number of bytes - // when checking for matches in history - ignoreBuffer int - - windowSize int - allocFrameBuffer int // needed? - error bool - dict *dict -} - -// reset will reset the history to initial state of a frame. -// The history must already have been initialized to the desired size. -func (h *history) reset() { - h.b = h.b[:0] - h.ignoreBuffer = 0 - h.error = false - h.recentOffsets = [3]int{1, 4, 8} - h.decoders.freeDecoders() - h.decoders = sequenceDecs{br: h.decoders.br} - h.freeHuffDecoder() - h.huffTree = nil - h.dict = nil - //printf("history created: %+v (l: %d, c: %d)", *h, len(h.b), cap(h.b)) -} - -func (h *history) freeHuffDecoder() { - if h.huffTree != nil { - if h.dict == nil || h.dict.litEnc != h.huffTree { - huffDecoderPool.Put(h.huffTree) - h.huffTree = nil - } - } -} - -func (h *history) setDict(dict *dict) { - if dict == nil { - return - } - h.dict = dict - h.decoders.litLengths = dict.llDec - h.decoders.offsets = dict.ofDec - h.decoders.matchLengths = dict.mlDec - h.decoders.dict = dict.content - h.recentOffsets = dict.offsets - h.huffTree = dict.litEnc -} - -// append bytes to history. -// This function will make sure there is space for it, -// if the buffer has been allocated with enough extra space. -func (h *history) append(b []byte) { - if len(b) >= h.windowSize { - // Discard all history by simply overwriting - h.b = h.b[:h.windowSize] - copy(h.b, b[len(b)-h.windowSize:]) - return - } - - // If there is space, append it. - if len(b) < cap(h.b)-len(h.b) { - h.b = append(h.b, b...) - return - } - - // Move data down so we only have window size left. - // We know we have less than window size in b at this point. - discard := len(b) + len(h.b) - h.windowSize - copy(h.b, h.b[discard:]) - h.b = h.b[:h.windowSize] - copy(h.b[h.windowSize-len(b):], b) -} - -// ensureBlock will ensure there is space for at least one block... -func (h *history) ensureBlock() { - if cap(h.b) < h.allocFrameBuffer { - h.b = make([]byte, 0, h.allocFrameBuffer) - return - } - - avail := cap(h.b) - len(h.b) - if avail >= h.windowSize || avail > maxCompressedBlockSize { - return - } - // Move data down so we only have window size left. - // We know we have less than window size in b at this point. - discard := len(h.b) - h.windowSize - copy(h.b, h.b[discard:]) - h.b = h.b[:h.windowSize] -} - -// append bytes to history without ever discarding anything. -func (h *history) appendKeep(b []byte) { - h.b = append(h.b, b...) -} diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt deleted file mode 100644 index 24b53065..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2016 Caleb Spare - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.md b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.md deleted file mode 100644 index 777290d4..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# xxhash - -VENDORED: Go to [github.com/cespare/xxhash](https://github.com/cespare/xxhash) for original package. - -xxhash is a Go implementation of the 64-bit [xxHash] algorithm, XXH64. This is a -high-quality hashing algorithm that is much faster than anything in the Go -standard library. - -This package provides a straightforward API: - -``` -func Sum64(b []byte) uint64 -func Sum64String(s string) uint64 -type Digest struct{ ... } - func New() *Digest -``` - -The `Digest` type implements hash.Hash64. Its key methods are: - -``` -func (*Digest) Write([]byte) (int, error) -func (*Digest) WriteString(string) (int, error) -func (*Digest) Sum64() uint64 -``` - -The package is written with optimized pure Go and also contains even faster -assembly implementations for amd64 and arm64. If desired, the `purego` build tag -opts into using the Go code even on those architectures. - -[xxHash]: http://cyan4973.github.io/xxHash/ - -## Compatibility - -This package is in a module and the latest code is in version 2 of the module. -You need a version of Go with at least "minimal module compatibility" to use -github.com/cespare/xxhash/v2: - -* 1.9.7+ for Go 1.9 -* 1.10.3+ for Go 1.10 -* Go 1.11 or later - -I recommend using the latest release of Go. - -## Benchmarks - -Here are some quick benchmarks comparing the pure-Go and assembly -implementations of Sum64. - -| input size | purego | asm | -| ---------- | --------- | --------- | -| 4 B | 1.3 GB/s | 1.2 GB/s | -| 16 B | 2.9 GB/s | 3.5 GB/s | -| 100 B | 6.9 GB/s | 8.1 GB/s | -| 4 KB | 11.7 GB/s | 16.7 GB/s | -| 10 MB | 12.0 GB/s | 17.3 GB/s | - -These numbers were generated on Ubuntu 20.04 with an Intel Xeon Platinum 8252C -CPU using the following commands under Go 1.19.2: - -``` -benchstat <(go test -tags purego -benchtime 500ms -count 15 -bench 'Sum64$') -benchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$') -``` - -## Projects using this package - -- [InfluxDB](https://github.com/influxdata/influxdb) -- [Prometheus](https://github.com/prometheus/prometheus) -- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) -- [FreeCache](https://github.com/coocood/freecache) -- [FastCache](https://github.com/VictoriaMetrics/fastcache) diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.go b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.go deleted file mode 100644 index fc40c820..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash.go +++ /dev/null @@ -1,230 +0,0 @@ -// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described -// at http://cyan4973.github.io/xxHash/. -// THIS IS VENDORED: Go to github.com/cespare/xxhash for original package. - -package xxhash - -import ( - "encoding/binary" - "errors" - "math/bits" -) - -const ( - prime1 uint64 = 11400714785074694791 - prime2 uint64 = 14029467366897019727 - prime3 uint64 = 1609587929392839161 - prime4 uint64 = 9650029242287828579 - prime5 uint64 = 2870177450012600261 -) - -// Store the primes in an array as well. -// -// The consts are used when possible in Go code to avoid MOVs but we need a -// contiguous array of the assembly code. -var primes = [...]uint64{prime1, prime2, prime3, prime4, prime5} - -// Digest implements hash.Hash64. -type Digest struct { - v1 uint64 - v2 uint64 - v3 uint64 - v4 uint64 - total uint64 - mem [32]byte - n int // how much of mem is used -} - -// New creates a new Digest that computes the 64-bit xxHash algorithm. -func New() *Digest { - var d Digest - d.Reset() - return &d -} - -// Reset clears the Digest's state so that it can be reused. -func (d *Digest) Reset() { - d.v1 = primes[0] + prime2 - d.v2 = prime2 - d.v3 = 0 - d.v4 = -primes[0] - d.total = 0 - d.n = 0 -} - -// Size always returns 8 bytes. -func (d *Digest) Size() int { return 8 } - -// BlockSize always returns 32 bytes. -func (d *Digest) BlockSize() int { return 32 } - -// Write adds more data to d. It always returns len(b), nil. -func (d *Digest) Write(b []byte) (n int, err error) { - n = len(b) - d.total += uint64(n) - - memleft := d.mem[d.n&(len(d.mem)-1):] - - if d.n+n < 32 { - // This new data doesn't even fill the current block. - copy(memleft, b) - d.n += n - return - } - - if d.n > 0 { - // Finish off the partial block. - c := copy(memleft, b) - d.v1 = round(d.v1, u64(d.mem[0:8])) - d.v2 = round(d.v2, u64(d.mem[8:16])) - d.v3 = round(d.v3, u64(d.mem[16:24])) - d.v4 = round(d.v4, u64(d.mem[24:32])) - b = b[c:] - d.n = 0 - } - - if len(b) >= 32 { - // One or more full blocks left. - nw := writeBlocks(d, b) - b = b[nw:] - } - - // Store any remaining partial block. - copy(d.mem[:], b) - d.n = len(b) - - return -} - -// Sum appends the current hash to b and returns the resulting slice. -func (d *Digest) Sum(b []byte) []byte { - s := d.Sum64() - return append( - b, - byte(s>>56), - byte(s>>48), - byte(s>>40), - byte(s>>32), - byte(s>>24), - byte(s>>16), - byte(s>>8), - byte(s), - ) -} - -// Sum64 returns the current hash. -func (d *Digest) Sum64() uint64 { - var h uint64 - - if d.total >= 32 { - v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4 - h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) - h = mergeRound(h, v1) - h = mergeRound(h, v2) - h = mergeRound(h, v3) - h = mergeRound(h, v4) - } else { - h = d.v3 + prime5 - } - - h += d.total - - b := d.mem[:d.n&(len(d.mem)-1)] - for ; len(b) >= 8; b = b[8:] { - k1 := round(0, u64(b[:8])) - h ^= k1 - h = rol27(h)*prime1 + prime4 - } - if len(b) >= 4 { - h ^= uint64(u32(b[:4])) * prime1 - h = rol23(h)*prime2 + prime3 - b = b[4:] - } - for ; len(b) > 0; b = b[1:] { - h ^= uint64(b[0]) * prime5 - h = rol11(h) * prime1 - } - - h ^= h >> 33 - h *= prime2 - h ^= h >> 29 - h *= prime3 - h ^= h >> 32 - - return h -} - -const ( - magic = "xxh\x06" - marshaledSize = len(magic) + 8*5 + 32 -) - -// MarshalBinary implements the encoding.BinaryMarshaler interface. -func (d *Digest) MarshalBinary() ([]byte, error) { - b := make([]byte, 0, marshaledSize) - b = append(b, magic...) - b = appendUint64(b, d.v1) - b = appendUint64(b, d.v2) - b = appendUint64(b, d.v3) - b = appendUint64(b, d.v4) - b = appendUint64(b, d.total) - b = append(b, d.mem[:d.n]...) - b = b[:len(b)+len(d.mem)-d.n] - return b, nil -} - -// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface. -func (d *Digest) UnmarshalBinary(b []byte) error { - if len(b) < len(magic) || string(b[:len(magic)]) != magic { - return errors.New("xxhash: invalid hash state identifier") - } - if len(b) != marshaledSize { - return errors.New("xxhash: invalid hash state size") - } - b = b[len(magic):] - b, d.v1 = consumeUint64(b) - b, d.v2 = consumeUint64(b) - b, d.v3 = consumeUint64(b) - b, d.v4 = consumeUint64(b) - b, d.total = consumeUint64(b) - copy(d.mem[:], b) - d.n = int(d.total % uint64(len(d.mem))) - return nil -} - -func appendUint64(b []byte, x uint64) []byte { - var a [8]byte - binary.LittleEndian.PutUint64(a[:], x) - return append(b, a[:]...) -} - -func consumeUint64(b []byte) ([]byte, uint64) { - x := u64(b) - return b[8:], x -} - -func u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) } -func u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) } - -func round(acc, input uint64) uint64 { - acc += input * prime2 - acc = rol31(acc) - acc *= prime1 - return acc -} - -func mergeRound(acc, val uint64) uint64 { - val = round(0, val) - acc ^= val - acc = acc*prime1 + prime4 - return acc -} - -func rol1(x uint64) uint64 { return bits.RotateLeft64(x, 1) } -func rol7(x uint64) uint64 { return bits.RotateLeft64(x, 7) } -func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) } -func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) } -func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) } -func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) } -func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) } -func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) } diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.s b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.s deleted file mode 100644 index ddb63aa9..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_amd64.s +++ /dev/null @@ -1,210 +0,0 @@ -//go:build !appengine && gc && !purego && !noasm -// +build !appengine -// +build gc -// +build !purego -// +build !noasm - -#include "textflag.h" - -// Registers: -#define h AX -#define d AX -#define p SI // pointer to advance through b -#define n DX -#define end BX // loop end -#define v1 R8 -#define v2 R9 -#define v3 R10 -#define v4 R11 -#define x R12 -#define prime1 R13 -#define prime2 R14 -#define prime4 DI - -#define round(acc, x) \ - IMULQ prime2, x \ - ADDQ x, acc \ - ROLQ $31, acc \ - IMULQ prime1, acc - -// round0 performs the operation x = round(0, x). -#define round0(x) \ - IMULQ prime2, x \ - ROLQ $31, x \ - IMULQ prime1, x - -// mergeRound applies a merge round on the two registers acc and x. -// It assumes that prime1, prime2, and prime4 have been loaded. -#define mergeRound(acc, x) \ - round0(x) \ - XORQ x, acc \ - IMULQ prime1, acc \ - ADDQ prime4, acc - -// blockLoop processes as many 32-byte blocks as possible, -// updating v1, v2, v3, and v4. It assumes that there is at least one block -// to process. -#define blockLoop() \ -loop: \ - MOVQ +0(p), x \ - round(v1, x) \ - MOVQ +8(p), x \ - round(v2, x) \ - MOVQ +16(p), x \ - round(v3, x) \ - MOVQ +24(p), x \ - round(v4, x) \ - ADDQ $32, p \ - CMPQ p, end \ - JLE loop - -// func Sum64(b []byte) uint64 -TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32 - // Load fixed primes. - MOVQ ·primes+0(SB), prime1 - MOVQ ·primes+8(SB), prime2 - MOVQ ·primes+24(SB), prime4 - - // Load slice. - MOVQ b_base+0(FP), p - MOVQ b_len+8(FP), n - LEAQ (p)(n*1), end - - // The first loop limit will be len(b)-32. - SUBQ $32, end - - // Check whether we have at least one block. - CMPQ n, $32 - JLT noBlocks - - // Set up initial state (v1, v2, v3, v4). - MOVQ prime1, v1 - ADDQ prime2, v1 - MOVQ prime2, v2 - XORQ v3, v3 - XORQ v4, v4 - SUBQ prime1, v4 - - blockLoop() - - MOVQ v1, h - ROLQ $1, h - MOVQ v2, x - ROLQ $7, x - ADDQ x, h - MOVQ v3, x - ROLQ $12, x - ADDQ x, h - MOVQ v4, x - ROLQ $18, x - ADDQ x, h - - mergeRound(h, v1) - mergeRound(h, v2) - mergeRound(h, v3) - mergeRound(h, v4) - - JMP afterBlocks - -noBlocks: - MOVQ ·primes+32(SB), h - -afterBlocks: - ADDQ n, h - - ADDQ $24, end - CMPQ p, end - JG try4 - -loop8: - MOVQ (p), x - ADDQ $8, p - round0(x) - XORQ x, h - ROLQ $27, h - IMULQ prime1, h - ADDQ prime4, h - - CMPQ p, end - JLE loop8 - -try4: - ADDQ $4, end - CMPQ p, end - JG try1 - - MOVL (p), x - ADDQ $4, p - IMULQ prime1, x - XORQ x, h - - ROLQ $23, h - IMULQ prime2, h - ADDQ ·primes+16(SB), h - -try1: - ADDQ $4, end - CMPQ p, end - JGE finalize - -loop1: - MOVBQZX (p), x - ADDQ $1, p - IMULQ ·primes+32(SB), x - XORQ x, h - ROLQ $11, h - IMULQ prime1, h - - CMPQ p, end - JL loop1 - -finalize: - MOVQ h, x - SHRQ $33, x - XORQ x, h - IMULQ prime2, h - MOVQ h, x - SHRQ $29, x - XORQ x, h - IMULQ ·primes+16(SB), h - MOVQ h, x - SHRQ $32, x - XORQ x, h - - MOVQ h, ret+24(FP) - RET - -// func writeBlocks(d *Digest, b []byte) int -TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 - // Load fixed primes needed for round. - MOVQ ·primes+0(SB), prime1 - MOVQ ·primes+8(SB), prime2 - - // Load slice. - MOVQ b_base+8(FP), p - MOVQ b_len+16(FP), n - LEAQ (p)(n*1), end - SUBQ $32, end - - // Load vN from d. - MOVQ s+0(FP), d - MOVQ 0(d), v1 - MOVQ 8(d), v2 - MOVQ 16(d), v3 - MOVQ 24(d), v4 - - // We don't need to check the loop condition here; this function is - // always called with at least one block of data to process. - blockLoop() - - // Copy vN back to d. - MOVQ v1, 0(d) - MOVQ v2, 8(d) - MOVQ v3, 16(d) - MOVQ v4, 24(d) - - // The number of bytes written is p minus the old base pointer. - SUBQ b_base+8(FP), p - MOVQ p, ret+32(FP) - - RET diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s deleted file mode 100644 index 17901e08..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s +++ /dev/null @@ -1,184 +0,0 @@ -//go:build !appengine && gc && !purego && !noasm -// +build !appengine -// +build gc -// +build !purego -// +build !noasm - -#include "textflag.h" - -// Registers: -#define digest R1 -#define h R2 // return value -#define p R3 // input pointer -#define n R4 // input length -#define nblocks R5 // n / 32 -#define prime1 R7 -#define prime2 R8 -#define prime3 R9 -#define prime4 R10 -#define prime5 R11 -#define v1 R12 -#define v2 R13 -#define v3 R14 -#define v4 R15 -#define x1 R20 -#define x2 R21 -#define x3 R22 -#define x4 R23 - -#define round(acc, x) \ - MADD prime2, acc, x, acc \ - ROR $64-31, acc \ - MUL prime1, acc - -// round0 performs the operation x = round(0, x). -#define round0(x) \ - MUL prime2, x \ - ROR $64-31, x \ - MUL prime1, x - -#define mergeRound(acc, x) \ - round0(x) \ - EOR x, acc \ - MADD acc, prime4, prime1, acc - -// blockLoop processes as many 32-byte blocks as possible, -// updating v1, v2, v3, and v4. It assumes that n >= 32. -#define blockLoop() \ - LSR $5, n, nblocks \ - PCALIGN $16 \ - loop: \ - LDP.P 16(p), (x1, x2) \ - LDP.P 16(p), (x3, x4) \ - round(v1, x1) \ - round(v2, x2) \ - round(v3, x3) \ - round(v4, x4) \ - SUB $1, nblocks \ - CBNZ nblocks, loop - -// func Sum64(b []byte) uint64 -TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32 - LDP b_base+0(FP), (p, n) - - LDP ·primes+0(SB), (prime1, prime2) - LDP ·primes+16(SB), (prime3, prime4) - MOVD ·primes+32(SB), prime5 - - CMP $32, n - CSEL LT, prime5, ZR, h // if n < 32 { h = prime5 } else { h = 0 } - BLT afterLoop - - ADD prime1, prime2, v1 - MOVD prime2, v2 - MOVD $0, v3 - NEG prime1, v4 - - blockLoop() - - ROR $64-1, v1, x1 - ROR $64-7, v2, x2 - ADD x1, x2 - ROR $64-12, v3, x3 - ROR $64-18, v4, x4 - ADD x3, x4 - ADD x2, x4, h - - mergeRound(h, v1) - mergeRound(h, v2) - mergeRound(h, v3) - mergeRound(h, v4) - -afterLoop: - ADD n, h - - TBZ $4, n, try8 - LDP.P 16(p), (x1, x2) - - round0(x1) - - // NOTE: here and below, sequencing the EOR after the ROR (using a - // rotated register) is worth a small but measurable speedup for small - // inputs. - ROR $64-27, h - EOR x1 @> 64-27, h, h - MADD h, prime4, prime1, h - - round0(x2) - ROR $64-27, h - EOR x2 @> 64-27, h, h - MADD h, prime4, prime1, h - -try8: - TBZ $3, n, try4 - MOVD.P 8(p), x1 - - round0(x1) - ROR $64-27, h - EOR x1 @> 64-27, h, h - MADD h, prime4, prime1, h - -try4: - TBZ $2, n, try2 - MOVWU.P 4(p), x2 - - MUL prime1, x2 - ROR $64-23, h - EOR x2 @> 64-23, h, h - MADD h, prime3, prime2, h - -try2: - TBZ $1, n, try1 - MOVHU.P 2(p), x3 - AND $255, x3, x1 - LSR $8, x3, x2 - - MUL prime5, x1 - ROR $64-11, h - EOR x1 @> 64-11, h, h - MUL prime1, h - - MUL prime5, x2 - ROR $64-11, h - EOR x2 @> 64-11, h, h - MUL prime1, h - -try1: - TBZ $0, n, finalize - MOVBU (p), x4 - - MUL prime5, x4 - ROR $64-11, h - EOR x4 @> 64-11, h, h - MUL prime1, h - -finalize: - EOR h >> 33, h - MUL prime2, h - EOR h >> 29, h - MUL prime3, h - EOR h >> 32, h - - MOVD h, ret+24(FP) - RET - -// func writeBlocks(d *Digest, b []byte) int -TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 - LDP ·primes+0(SB), (prime1, prime2) - - // Load state. Assume v[1-4] are stored contiguously. - MOVD d+0(FP), digest - LDP 0(digest), (v1, v2) - LDP 16(digest), (v3, v4) - - LDP b_base+8(FP), (p, n) - - blockLoop() - - // Store updated state. - STP (v1, v2), 0(digest) - STP (v3, v4), 16(digest) - - BIC $31, n - MOVD n, ret+32(FP) - RET diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go deleted file mode 100644 index d4221edf..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_asm.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build (amd64 || arm64) && !appengine && gc && !purego && !noasm -// +build amd64 arm64 -// +build !appengine -// +build gc -// +build !purego -// +build !noasm - -package xxhash - -// Sum64 computes the 64-bit xxHash digest of b. -// -//go:noescape -func Sum64(b []byte) uint64 - -//go:noescape -func writeBlocks(s *Digest, b []byte) int diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.go b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.go deleted file mode 100644 index 0be16cef..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_other.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build (!amd64 && !arm64) || appengine || !gc || purego || noasm -// +build !amd64,!arm64 appengine !gc purego noasm - -package xxhash - -// Sum64 computes the 64-bit xxHash digest of b. -func Sum64(b []byte) uint64 { - // A simpler version would be - // d := New() - // d.Write(b) - // return d.Sum64() - // but this is faster, particularly for small inputs. - - n := len(b) - var h uint64 - - if n >= 32 { - v1 := primes[0] + prime2 - v2 := prime2 - v3 := uint64(0) - v4 := -primes[0] - for len(b) >= 32 { - v1 = round(v1, u64(b[0:8:len(b)])) - v2 = round(v2, u64(b[8:16:len(b)])) - v3 = round(v3, u64(b[16:24:len(b)])) - v4 = round(v4, u64(b[24:32:len(b)])) - b = b[32:len(b):len(b)] - } - h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4) - h = mergeRound(h, v1) - h = mergeRound(h, v2) - h = mergeRound(h, v3) - h = mergeRound(h, v4) - } else { - h = prime5 - } - - h += uint64(n) - - for ; len(b) >= 8; b = b[8:] { - k1 := round(0, u64(b[:8])) - h ^= k1 - h = rol27(h)*prime1 + prime4 - } - if len(b) >= 4 { - h ^= uint64(u32(b[:4])) * prime1 - h = rol23(h)*prime2 + prime3 - b = b[4:] - } - for ; len(b) > 0; b = b[1:] { - h ^= uint64(b[0]) * prime5 - h = rol11(h) * prime1 - } - - h ^= h >> 33 - h *= prime2 - h ^= h >> 29 - h *= prime3 - h ^= h >> 32 - - return h -} - -func writeBlocks(d *Digest, b []byte) int { - v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4 - n := len(b) - for len(b) >= 32 { - v1 = round(v1, u64(b[0:8:len(b)])) - v2 = round(v2, u64(b[8:16:len(b)])) - v3 = round(v3, u64(b[16:24:len(b)])) - v4 = round(v4, u64(b[24:32:len(b)])) - b = b[32:len(b):len(b)] - } - d.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4 - return n - len(b) -} diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go deleted file mode 100644 index 6f3b0cb1..00000000 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_safe.go +++ /dev/null @@ -1,11 +0,0 @@ -package xxhash - -// Sum64String computes the 64-bit xxHash digest of s. -func Sum64String(s string) uint64 { - return Sum64([]byte(s)) -} - -// WriteString adds more data to d. It always returns len(s), nil. -func (d *Digest) WriteString(s string) (n int, err error) { - return d.Write([]byte(s)) -} diff --git a/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go b/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go deleted file mode 100644 index f41932b7..00000000 --- a/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build amd64 && !appengine && !noasm && gc -// +build amd64,!appengine,!noasm,gc - -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. - -package zstd - -// matchLen returns how many bytes match in a and b -// -// It assumes that: -// -// len(a) <= len(b) and len(a) > 0 -// -//go:noescape -func matchLen(a []byte, b []byte) int diff --git a/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s b/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s deleted file mode 100644 index 9a7655c0..00000000 --- a/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s +++ /dev/null @@ -1,68 +0,0 @@ -// Copied from S2 implementation. - -//go:build !appengine && !noasm && gc && !noasm - -#include "textflag.h" - -// func matchLen(a []byte, b []byte) int -// Requires: BMI -TEXT ·matchLen(SB), NOSPLIT, $0-56 - MOVQ a_base+0(FP), AX - MOVQ b_base+24(FP), CX - MOVQ a_len+8(FP), DX - - // matchLen - XORL SI, SI - CMPL DX, $0x08 - JB matchlen_match4_standalone - -matchlen_loopback_standalone: - MOVQ (AX)(SI*1), BX - XORQ (CX)(SI*1), BX - TESTQ BX, BX - JZ matchlen_loop_standalone - -#ifdef GOAMD64_v3 - TZCNTQ BX, BX -#else - BSFQ BX, BX -#endif - SARQ $0x03, BX - LEAL (SI)(BX*1), SI - JMP gen_match_len_end - -matchlen_loop_standalone: - LEAL -8(DX), DX - LEAL 8(SI), SI - CMPL DX, $0x08 - JAE matchlen_loopback_standalone - -matchlen_match4_standalone: - CMPL DX, $0x04 - JB matchlen_match2_standalone - MOVL (AX)(SI*1), BX - CMPL (CX)(SI*1), BX - JNE matchlen_match2_standalone - LEAL -4(DX), DX - LEAL 4(SI), SI - -matchlen_match2_standalone: - CMPL DX, $0x02 - JB matchlen_match1_standalone - MOVW (AX)(SI*1), BX - CMPW (CX)(SI*1), BX - JNE matchlen_match1_standalone - LEAL -2(DX), DX - LEAL 2(SI), SI - -matchlen_match1_standalone: - CMPL DX, $0x01 - JB gen_match_len_end - MOVB (AX)(SI*1), BL - CMPB (CX)(SI*1), BL - JNE gen_match_len_end - INCL SI - -gen_match_len_end: - MOVQ SI, ret+48(FP) - RET diff --git a/vendor/github.com/klauspost/compress/zstd/matchlen_generic.go b/vendor/github.com/klauspost/compress/zstd/matchlen_generic.go deleted file mode 100644 index 57b9c31c..00000000 --- a/vendor/github.com/klauspost/compress/zstd/matchlen_generic.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build !amd64 || appengine || !gc || noasm -// +build !amd64 appengine !gc noasm - -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. - -package zstd - -import ( - "encoding/binary" - "math/bits" -) - -// matchLen returns the maximum common prefix length of a and b. -// a must be the shortest of the two. -func matchLen(a, b []byte) (n int) { - for ; len(a) >= 8 && len(b) >= 8; a, b = a[8:], b[8:] { - diff := binary.LittleEndian.Uint64(a) ^ binary.LittleEndian.Uint64(b) - if diff != 0 { - return n + bits.TrailingZeros64(diff)>>3 - } - n += 8 - } - - for i := range a { - if a[i] != b[i] { - break - } - n++ - } - return n - -} diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec.go b/vendor/github.com/klauspost/compress/zstd/seqdec.go deleted file mode 100644 index d7fe6d82..00000000 --- a/vendor/github.com/klauspost/compress/zstd/seqdec.go +++ /dev/null @@ -1,503 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "errors" - "fmt" - "io" -) - -type seq struct { - litLen uint32 - matchLen uint32 - offset uint32 - - // Codes are stored here for the encoder - // so they only have to be looked up once. - llCode, mlCode, ofCode uint8 -} - -type seqVals struct { - ll, ml, mo int -} - -func (s seq) String() string { - if s.offset <= 3 { - if s.offset == 0 { - return fmt.Sprint("litLen:", s.litLen, ", matchLen:", s.matchLen+zstdMinMatch, ", offset: INVALID (0)") - } - return fmt.Sprint("litLen:", s.litLen, ", matchLen:", s.matchLen+zstdMinMatch, ", offset:", s.offset, " (repeat)") - } - return fmt.Sprint("litLen:", s.litLen, ", matchLen:", s.matchLen+zstdMinMatch, ", offset:", s.offset-3, " (new)") -} - -type seqCompMode uint8 - -const ( - compModePredefined seqCompMode = iota - compModeRLE - compModeFSE - compModeRepeat -) - -type sequenceDec struct { - // decoder keeps track of the current state and updates it from the bitstream. - fse *fseDecoder - state fseState - repeat bool -} - -// init the state of the decoder with input from stream. -func (s *sequenceDec) init(br *bitReader) error { - if s.fse == nil { - return errors.New("sequence decoder not defined") - } - s.state.init(br, s.fse.actualTableLog, s.fse.dt[:1< cap(s.out) { - addBytes := s.seqSize + len(s.out) - s.out = append(s.out, make([]byte, addBytes)...) - s.out = s.out[:len(s.out)-addBytes] - } - - if debugDecoder { - printf("Execute %d seqs with hist %d, dict %d, literals: %d into %d bytes\n", len(seqs), len(hist), len(s.dict), len(s.literals), s.seqSize) - } - - var t = len(s.out) - out := s.out[:t+s.seqSize] - - for _, seq := range seqs { - // Add literals - copy(out[t:], s.literals[:seq.ll]) - t += seq.ll - s.literals = s.literals[seq.ll:] - - // Copy from dictionary... - if seq.mo > t+len(hist) || seq.mo > s.windowSize { - if len(s.dict) == 0 { - return fmt.Errorf("match offset (%d) bigger than current history (%d)", seq.mo, t+len(hist)) - } - - // we may be in dictionary. - dictO := len(s.dict) - (seq.mo - (t + len(hist))) - if dictO < 0 || dictO >= len(s.dict) { - return fmt.Errorf("match offset (%d) bigger than current history+dict (%d)", seq.mo, t+len(hist)+len(s.dict)) - } - end := dictO + seq.ml - if end > len(s.dict) { - n := len(s.dict) - dictO - copy(out[t:], s.dict[dictO:]) - t += n - seq.ml -= n - } else { - copy(out[t:], s.dict[dictO:end]) - t += end - dictO - continue - } - } - - // Copy from history. - if v := seq.mo - t; v > 0 { - // v is the start position in history from end. - start := len(hist) - v - if seq.ml > v { - // Some goes into current block. - // Copy remainder of history - copy(out[t:], hist[start:]) - t += v - seq.ml -= v - } else { - copy(out[t:], hist[start:start+seq.ml]) - t += seq.ml - continue - } - } - // We must be in current buffer now - if seq.ml > 0 { - start := t - seq.mo - if seq.ml <= t-start { - // No overlap - copy(out[t:], out[start:start+seq.ml]) - t += seq.ml - continue - } else { - // Overlapping copy - // Extend destination slice and copy one byte at the time. - src := out[start : start+seq.ml] - dst := out[t:] - dst = dst[:len(src)] - t += len(src) - // Destination is the space we just added. - for i := range src { - dst[i] = src[i] - } - } - } - } - - // Add final literals - copy(out[t:], s.literals) - if debugDecoder { - t += len(s.literals) - if t != len(out) { - panic(fmt.Errorf("length mismatch, want %d, got %d, ss: %d", len(out), t, s.seqSize)) - } - } - s.out = out - - return nil -} - -// decode sequences from the stream with the provided history. -func (s *sequenceDecs) decodeSync(hist []byte) error { - supported, err := s.decodeSyncSimple(hist) - if supported { - return err - } - - br := s.br - seqs := s.nSeqs - startSize := len(s.out) - // Grab full sizes tables, to avoid bounds checks. - llTable, mlTable, ofTable := s.litLengths.fse.dt[:maxTablesize], s.matchLengths.fse.dt[:maxTablesize], s.offsets.fse.dt[:maxTablesize] - llState, mlState, ofState := s.litLengths.state.state, s.matchLengths.state.state, s.offsets.state.state - out := s.out - maxBlockSize := maxCompressedBlockSize - if s.windowSize < maxBlockSize { - maxBlockSize = s.windowSize - } - - if debugDecoder { - println("decodeSync: decoding", seqs, "sequences", br.remain(), "bits remain on stream") - } - for i := seqs - 1; i >= 0; i-- { - if br.overread() { - printf("reading sequence %d, exceeded available data. Overread by %d\n", seqs-i, -br.remain()) - return io.ErrUnexpectedEOF - } - var ll, mo, ml int - if len(br.in) > 4+((maxOffsetBits+16+16)>>3) { - // inlined function: - // ll, mo, ml = s.nextFast(br, llState, mlState, ofState) - - // Final will not read from stream. - var llB, mlB, moB uint8 - ll, llB = llState.final() - ml, mlB = mlState.final() - mo, moB = ofState.final() - - // extra bits are stored in reverse order. - br.fillFast() - mo += br.getBits(moB) - if s.maxBits > 32 { - br.fillFast() - } - ml += br.getBits(mlB) - ll += br.getBits(llB) - - if moB > 1 { - s.prevOffset[2] = s.prevOffset[1] - s.prevOffset[1] = s.prevOffset[0] - s.prevOffset[0] = mo - } else { - // mo = s.adjustOffset(mo, ll, moB) - // Inlined for rather big speedup - if ll == 0 { - // There is an exception though, when current sequence's literals_length = 0. - // In this case, repeated offsets are shifted by one, so an offset_value of 1 means Repeated_Offset2, - // an offset_value of 2 means Repeated_Offset3, and an offset_value of 3 means Repeated_Offset1 - 1_byte. - mo++ - } - - if mo == 0 { - mo = s.prevOffset[0] - } else { - var temp int - if mo == 3 { - temp = s.prevOffset[0] - 1 - } else { - temp = s.prevOffset[mo] - } - - if temp == 0 { - // 0 is not valid; input is corrupted; force offset to 1 - println("WARNING: temp was 0") - temp = 1 - } - - if mo != 1 { - s.prevOffset[2] = s.prevOffset[1] - } - s.prevOffset[1] = s.prevOffset[0] - s.prevOffset[0] = temp - mo = temp - } - } - br.fillFast() - } else { - ll, mo, ml = s.next(br, llState, mlState, ofState) - br.fill() - } - - if debugSequences { - println("Seq", seqs-i-1, "Litlen:", ll, "mo:", mo, "(abs) ml:", ml) - } - - if ll > len(s.literals) { - return fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available", ll, len(s.literals)) - } - size := ll + ml + len(out) - if size-startSize > maxBlockSize { - return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) - } - if size > cap(out) { - // Not enough size, which can happen under high volume block streaming conditions - // but could be if destination slice is too small for sync operations. - // over-allocating here can create a large amount of GC pressure so we try to keep - // it as contained as possible - used := len(out) - startSize - addBytes := 256 + ll + ml + used>>2 - // Clamp to max block size. - if used+addBytes > maxBlockSize { - addBytes = maxBlockSize - used - } - out = append(out, make([]byte, addBytes)...) - out = out[:len(out)-addBytes] - } - if ml > maxMatchLen { - return fmt.Errorf("match len (%d) bigger than max allowed length", ml) - } - - // Add literals - out = append(out, s.literals[:ll]...) - s.literals = s.literals[ll:] - - if mo == 0 && ml > 0 { - return fmt.Errorf("zero matchoff and matchlen (%d) > 0", ml) - } - - if mo > len(out)+len(hist) || mo > s.windowSize { - if len(s.dict) == 0 { - return fmt.Errorf("match offset (%d) bigger than current history (%d)", mo, len(out)+len(hist)-startSize) - } - - // we may be in dictionary. - dictO := len(s.dict) - (mo - (len(out) + len(hist))) - if dictO < 0 || dictO >= len(s.dict) { - return fmt.Errorf("match offset (%d) bigger than current history (%d)", mo, len(out)+len(hist)-startSize) - } - end := dictO + ml - if end > len(s.dict) { - out = append(out, s.dict[dictO:]...) - ml -= len(s.dict) - dictO - } else { - out = append(out, s.dict[dictO:end]...) - mo = 0 - ml = 0 - } - } - - // Copy from history. - // TODO: Blocks without history could be made to ignore this completely. - if v := mo - len(out); v > 0 { - // v is the start position in history from end. - start := len(hist) - v - if ml > v { - // Some goes into current block. - // Copy remainder of history - out = append(out, hist[start:]...) - ml -= v - } else { - out = append(out, hist[start:start+ml]...) - ml = 0 - } - } - // We must be in current buffer now - if ml > 0 { - start := len(out) - mo - if ml <= len(out)-start { - // No overlap - out = append(out, out[start:start+ml]...) - } else { - // Overlapping copy - // Extend destination slice and copy one byte at the time. - out = out[:len(out)+ml] - src := out[start : start+ml] - // Destination is the space we just added. - dst := out[len(out)-ml:] - dst = dst[:len(src)] - for i := range src { - dst[i] = src[i] - } - } - } - if i == 0 { - // This is the last sequence, so we shouldn't update state. - break - } - - // Manually inlined, ~ 5-20% faster - // Update all 3 states at once. Approx 20% faster. - nBits := llState.nbBits() + mlState.nbBits() + ofState.nbBits() - if nBits == 0 { - llState = llTable[llState.newState()&maxTableMask] - mlState = mlTable[mlState.newState()&maxTableMask] - ofState = ofTable[ofState.newState()&maxTableMask] - } else { - bits := br.get32BitsFast(nBits) - - lowBits := uint16(bits >> ((ofState.nbBits() + mlState.nbBits()) & 31)) - llState = llTable[(llState.newState()+lowBits)&maxTableMask] - - lowBits = uint16(bits >> (ofState.nbBits() & 31)) - lowBits &= bitMask[mlState.nbBits()&15] - mlState = mlTable[(mlState.newState()+lowBits)&maxTableMask] - - lowBits = uint16(bits) & bitMask[ofState.nbBits()&15] - ofState = ofTable[(ofState.newState()+lowBits)&maxTableMask] - } - } - - if size := len(s.literals) + len(out) - startSize; size > maxBlockSize { - return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) - } - - // Add final literals - s.out = append(out, s.literals...) - return br.close() -} - -var bitMask [16]uint16 - -func init() { - for i := range bitMask[:] { - bitMask[i] = uint16((1 << uint(i)) - 1) - } -} - -func (s *sequenceDecs) next(br *bitReader, llState, mlState, ofState decSymbol) (ll, mo, ml int) { - // Final will not read from stream. - ll, llB := llState.final() - ml, mlB := mlState.final() - mo, moB := ofState.final() - - // extra bits are stored in reverse order. - br.fill() - mo += br.getBits(moB) - if s.maxBits > 32 { - br.fill() - } - // matchlength+literal length, max 32 bits - ml += br.getBits(mlB) - ll += br.getBits(llB) - mo = s.adjustOffset(mo, ll, moB) - return -} - -func (s *sequenceDecs) adjustOffset(offset, litLen int, offsetB uint8) int { - if offsetB > 1 { - s.prevOffset[2] = s.prevOffset[1] - s.prevOffset[1] = s.prevOffset[0] - s.prevOffset[0] = offset - return offset - } - - if litLen == 0 { - // There is an exception though, when current sequence's literals_length = 0. - // In this case, repeated offsets are shifted by one, so an offset_value of 1 means Repeated_Offset2, - // an offset_value of 2 means Repeated_Offset3, and an offset_value of 3 means Repeated_Offset1 - 1_byte. - offset++ - } - - if offset == 0 { - return s.prevOffset[0] - } - var temp int - if offset == 3 { - temp = s.prevOffset[0] - 1 - } else { - temp = s.prevOffset[offset] - } - - if temp == 0 { - // 0 is not valid; input is corrupted; force offset to 1 - println("temp was 0") - temp = 1 - } - - if offset != 1 { - s.prevOffset[2] = s.prevOffset[1] - } - s.prevOffset[1] = s.prevOffset[0] - s.prevOffset[0] = temp - return temp -} diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go deleted file mode 100644 index 8adabd82..00000000 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.go +++ /dev/null @@ -1,394 +0,0 @@ -//go:build amd64 && !appengine && !noasm && gc -// +build amd64,!appengine,!noasm,gc - -package zstd - -import ( - "fmt" - "io" - - "github.com/klauspost/compress/internal/cpuinfo" -) - -type decodeSyncAsmContext struct { - llTable []decSymbol - mlTable []decSymbol - ofTable []decSymbol - llState uint64 - mlState uint64 - ofState uint64 - iteration int - litRemain int - out []byte - outPosition int - literals []byte - litPosition int - history []byte - windowSize int - ll int // set on error (not for all errors, please refer to _generate/gen.go) - ml int // set on error (not for all errors, please refer to _generate/gen.go) - mo int // set on error (not for all errors, please refer to _generate/gen.go) -} - -// sequenceDecs_decodeSync_amd64 implements the main loop of sequenceDecs.decodeSync in x86 asm. -// -// Please refer to seqdec_generic.go for the reference implementation. -// -//go:noescape -func sequenceDecs_decodeSync_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int - -// sequenceDecs_decodeSync_bmi2 implements the main loop of sequenceDecs.decodeSync in x86 asm with BMI2 extensions. -// -//go:noescape -func sequenceDecs_decodeSync_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int - -// sequenceDecs_decodeSync_safe_amd64 does the same as above, but does not write more than output buffer. -// -//go:noescape -func sequenceDecs_decodeSync_safe_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int - -// sequenceDecs_decodeSync_safe_bmi2 does the same as above, but does not write more than output buffer. -// -//go:noescape -func sequenceDecs_decodeSync_safe_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int - -// decode sequences from the stream with the provided history but without a dictionary. -func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) { - if len(s.dict) > 0 { - return false, nil - } - if s.maxSyncLen == 0 && cap(s.out)-len(s.out) < maxCompressedBlockSize { - return false, nil - } - - // FIXME: Using unsafe memory copies leads to rare, random crashes - // with fuzz testing. It is therefore disabled for now. - const useSafe = true - /* - useSafe := false - if s.maxSyncLen == 0 && cap(s.out)-len(s.out) < maxCompressedBlockSizeAlloc { - useSafe = true - } - if s.maxSyncLen > 0 && cap(s.out)-len(s.out)-compressedBlockOverAlloc < int(s.maxSyncLen) { - useSafe = true - } - if cap(s.literals) < len(s.literals)+compressedBlockOverAlloc { - useSafe = true - } - */ - - br := s.br - - maxBlockSize := maxCompressedBlockSize - if s.windowSize < maxBlockSize { - maxBlockSize = s.windowSize - } - - ctx := decodeSyncAsmContext{ - llTable: s.litLengths.fse.dt[:maxTablesize], - mlTable: s.matchLengths.fse.dt[:maxTablesize], - ofTable: s.offsets.fse.dt[:maxTablesize], - llState: uint64(s.litLengths.state.state), - mlState: uint64(s.matchLengths.state.state), - ofState: uint64(s.offsets.state.state), - iteration: s.nSeqs - 1, - litRemain: len(s.literals), - out: s.out, - outPosition: len(s.out), - literals: s.literals, - windowSize: s.windowSize, - history: hist, - } - - s.seqSize = 0 - startSize := len(s.out) - - var errCode int - if cpuinfo.HasBMI2() { - if useSafe { - errCode = sequenceDecs_decodeSync_safe_bmi2(s, br, &ctx) - } else { - errCode = sequenceDecs_decodeSync_bmi2(s, br, &ctx) - } - } else { - if useSafe { - errCode = sequenceDecs_decodeSync_safe_amd64(s, br, &ctx) - } else { - errCode = sequenceDecs_decodeSync_amd64(s, br, &ctx) - } - } - switch errCode { - case noError: - break - - case errorMatchLenOfsMismatch: - return true, fmt.Errorf("zero matchoff and matchlen (%d) > 0", ctx.ml) - - case errorMatchLenTooBig: - return true, fmt.Errorf("match len (%d) bigger than max allowed length", ctx.ml) - - case errorMatchOffTooBig: - return true, fmt.Errorf("match offset (%d) bigger than current history (%d)", - ctx.mo, ctx.outPosition+len(hist)-startSize) - - case errorNotEnoughLiterals: - return true, fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available", - ctx.ll, ctx.litRemain+ctx.ll) - - case errorOverread: - return true, io.ErrUnexpectedEOF - - case errorNotEnoughSpace: - size := ctx.outPosition + ctx.ll + ctx.ml - if debugDecoder { - println("msl:", s.maxSyncLen, "cap", cap(s.out), "bef:", startSize, "sz:", size-startSize, "mbs:", maxBlockSize, "outsz:", cap(s.out)-startSize) - } - return true, fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) - - default: - return true, fmt.Errorf("sequenceDecs_decode returned erronous code %d", errCode) - } - - s.seqSize += ctx.litRemain - if s.seqSize > maxBlockSize { - return true, fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) - } - err := br.close() - if err != nil { - printf("Closing sequences: %v, %+v\n", err, *br) - return true, err - } - - s.literals = s.literals[ctx.litPosition:] - t := ctx.outPosition - s.out = s.out[:t] - - // Add final literals - s.out = append(s.out, s.literals...) - if debugDecoder { - t += len(s.literals) - if t != len(s.out) { - panic(fmt.Errorf("length mismatch, want %d, got %d", len(s.out), t)) - } - } - - return true, nil -} - -// -------------------------------------------------------------------------------- - -type decodeAsmContext struct { - llTable []decSymbol - mlTable []decSymbol - ofTable []decSymbol - llState uint64 - mlState uint64 - ofState uint64 - iteration int - seqs []seqVals - litRemain int -} - -const noError = 0 - -// error reported when mo == 0 && ml > 0 -const errorMatchLenOfsMismatch = 1 - -// error reported when ml > maxMatchLen -const errorMatchLenTooBig = 2 - -// error reported when mo > available history or mo > s.windowSize -const errorMatchOffTooBig = 3 - -// error reported when the sum of literal lengths exeeceds the literal buffer size -const errorNotEnoughLiterals = 4 - -// error reported when capacity of `out` is too small -const errorNotEnoughSpace = 5 - -// error reported when bits are overread. -const errorOverread = 6 - -// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm. -// -// Please refer to seqdec_generic.go for the reference implementation. -// -//go:noescape -func sequenceDecs_decode_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int - -// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm. -// -// Please refer to seqdec_generic.go for the reference implementation. -// -//go:noescape -func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int - -// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm with BMI2 extensions. -// -//go:noescape -func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int - -// sequenceDecs_decode implements the main loop of sequenceDecs in x86 asm with BMI2 extensions. -// -//go:noescape -func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int - -// decode sequences from the stream without the provided history. -func (s *sequenceDecs) decode(seqs []seqVals) error { - br := s.br - - maxBlockSize := maxCompressedBlockSize - if s.windowSize < maxBlockSize { - maxBlockSize = s.windowSize - } - - ctx := decodeAsmContext{ - llTable: s.litLengths.fse.dt[:maxTablesize], - mlTable: s.matchLengths.fse.dt[:maxTablesize], - ofTable: s.offsets.fse.dt[:maxTablesize], - llState: uint64(s.litLengths.state.state), - mlState: uint64(s.matchLengths.state.state), - ofState: uint64(s.offsets.state.state), - seqs: seqs, - iteration: len(seqs) - 1, - litRemain: len(s.literals), - } - - if debugDecoder { - println("decode: decoding", len(seqs), "sequences", br.remain(), "bits remain on stream") - } - - s.seqSize = 0 - lte56bits := s.maxBits+s.offsets.fse.actualTableLog+s.matchLengths.fse.actualTableLog+s.litLengths.fse.actualTableLog <= 56 - var errCode int - if cpuinfo.HasBMI2() { - if lte56bits { - errCode = sequenceDecs_decode_56_bmi2(s, br, &ctx) - } else { - errCode = sequenceDecs_decode_bmi2(s, br, &ctx) - } - } else { - if lte56bits { - errCode = sequenceDecs_decode_56_amd64(s, br, &ctx) - } else { - errCode = sequenceDecs_decode_amd64(s, br, &ctx) - } - } - if errCode != 0 { - i := len(seqs) - ctx.iteration - 1 - switch errCode { - case errorMatchLenOfsMismatch: - ml := ctx.seqs[i].ml - return fmt.Errorf("zero matchoff and matchlen (%d) > 0", ml) - - case errorMatchLenTooBig: - ml := ctx.seqs[i].ml - return fmt.Errorf("match len (%d) bigger than max allowed length", ml) - - case errorNotEnoughLiterals: - ll := ctx.seqs[i].ll - return fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available", ll, ctx.litRemain+ll) - case errorOverread: - return io.ErrUnexpectedEOF - } - - return fmt.Errorf("sequenceDecs_decode_amd64 returned erronous code %d", errCode) - } - - if ctx.litRemain < 0 { - return fmt.Errorf("literal count is too big: total available %d, total requested %d", - len(s.literals), len(s.literals)-ctx.litRemain) - } - - s.seqSize += ctx.litRemain - if s.seqSize > maxBlockSize { - return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) - } - if debugDecoder { - println("decode: ", br.remain(), "bits remain on stream. code:", errCode) - } - err := br.close() - if err != nil { - printf("Closing sequences: %v, %+v\n", err, *br) - } - return err -} - -// -------------------------------------------------------------------------------- - -type executeAsmContext struct { - seqs []seqVals - seqIndex int - out []byte - history []byte - literals []byte - outPosition int - litPosition int - windowSize int -} - -// sequenceDecs_executeSimple_amd64 implements the main loop of sequenceDecs.executeSimple in x86 asm. -// -// Returns false if a match offset is too big. -// -// Please refer to seqdec_generic.go for the reference implementation. -// -//go:noescape -func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool - -// Same as above, but with safe memcopies -// -//go:noescape -func sequenceDecs_executeSimple_safe_amd64(ctx *executeAsmContext) bool - -// executeSimple handles cases when dictionary is not used. -func (s *sequenceDecs) executeSimple(seqs []seqVals, hist []byte) error { - // Ensure we have enough output size... - if len(s.out)+s.seqSize+compressedBlockOverAlloc > cap(s.out) { - addBytes := s.seqSize + len(s.out) + compressedBlockOverAlloc - s.out = append(s.out, make([]byte, addBytes)...) - s.out = s.out[:len(s.out)-addBytes] - } - - if debugDecoder { - printf("Execute %d seqs with literals: %d into %d bytes\n", len(seqs), len(s.literals), s.seqSize) - } - - var t = len(s.out) - out := s.out[:t+s.seqSize] - - ctx := executeAsmContext{ - seqs: seqs, - seqIndex: 0, - out: out, - history: hist, - outPosition: t, - litPosition: 0, - literals: s.literals, - windowSize: s.windowSize, - } - var ok bool - if cap(s.literals) < len(s.literals)+compressedBlockOverAlloc { - ok = sequenceDecs_executeSimple_safe_amd64(&ctx) - } else { - ok = sequenceDecs_executeSimple_amd64(&ctx) - } - if !ok { - return fmt.Errorf("match offset (%d) bigger than current history (%d)", - seqs[ctx.seqIndex].mo, ctx.outPosition+len(hist)) - } - s.literals = s.literals[ctx.litPosition:] - t = ctx.outPosition - - // Add final literals - copy(out[t:], s.literals) - if debugDecoder { - t += len(s.literals) - if t != len(out) { - panic(fmt.Errorf("length mismatch, want %d, got %d, ss: %d", len(out), t, s.seqSize)) - } - } - s.out = out - - return nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s deleted file mode 100644 index 974b9972..00000000 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s +++ /dev/null @@ -1,4175 +0,0 @@ -// Code generated by command: go run gen.go -out ../seqdec_amd64.s -pkg=zstd. DO NOT EDIT. - -//go:build !appengine && !noasm && gc && !noasm - -// func sequenceDecs_decode_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int -// Requires: CMOV -TEXT ·sequenceDecs_decode_amd64(SB), $8-32 - MOVQ br+8(FP), CX - MOVQ 24(CX), DX - MOVBQZX 32(CX), BX - MOVQ (CX), AX - MOVQ 8(CX), SI - ADDQ SI, AX - MOVQ AX, (SP) - MOVQ ctx+16(FP), AX - MOVQ 72(AX), DI - MOVQ 80(AX), R8 - MOVQ 88(AX), R9 - MOVQ 104(AX), R10 - MOVQ s+0(FP), AX - MOVQ 144(AX), R11 - MOVQ 152(AX), R12 - MOVQ 160(AX), R13 - -sequenceDecs_decode_amd64_main_loop: - MOVQ (SP), R14 - - // Fill bitreader to have enough for the offset and match length. - CMPQ SI, $0x08 - JL sequenceDecs_decode_amd64_fill_byte_by_byte - MOVQ BX, AX - SHRQ $0x03, AX - SUBQ AX, R14 - MOVQ (R14), DX - SUBQ AX, SI - ANDQ $0x07, BX - JMP sequenceDecs_decode_amd64_fill_end - -sequenceDecs_decode_amd64_fill_byte_by_byte: - CMPQ SI, $0x00 - JLE sequenceDecs_decode_amd64_fill_check_overread - CMPQ BX, $0x07 - JLE sequenceDecs_decode_amd64_fill_end - SHLQ $0x08, DX - SUBQ $0x01, R14 - SUBQ $0x01, SI - SUBQ $0x08, BX - MOVBQZX (R14), AX - ORQ AX, DX - JMP sequenceDecs_decode_amd64_fill_byte_by_byte - -sequenceDecs_decode_amd64_fill_check_overread: - CMPQ BX, $0x40 - JA error_overread - -sequenceDecs_decode_amd64_fill_end: - // Update offset - MOVQ R9, AX - MOVQ BX, CX - MOVQ DX, R15 - SHLQ CL, R15 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decode_amd64_of_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decode_amd64_of_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decode_amd64_of_update_zero - NEGQ CX - SHRQ CL, R15 - ADDQ R15, AX - -sequenceDecs_decode_amd64_of_update_zero: - MOVQ AX, 16(R10) - - // Update match length - MOVQ R8, AX - MOVQ BX, CX - MOVQ DX, R15 - SHLQ CL, R15 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decode_amd64_ml_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decode_amd64_ml_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decode_amd64_ml_update_zero - NEGQ CX - SHRQ CL, R15 - ADDQ R15, AX - -sequenceDecs_decode_amd64_ml_update_zero: - MOVQ AX, 8(R10) - - // Fill bitreader to have enough for the remaining - CMPQ SI, $0x08 - JL sequenceDecs_decode_amd64_fill_2_byte_by_byte - MOVQ BX, AX - SHRQ $0x03, AX - SUBQ AX, R14 - MOVQ (R14), DX - SUBQ AX, SI - ANDQ $0x07, BX - JMP sequenceDecs_decode_amd64_fill_2_end - -sequenceDecs_decode_amd64_fill_2_byte_by_byte: - CMPQ SI, $0x00 - JLE sequenceDecs_decode_amd64_fill_2_check_overread - CMPQ BX, $0x07 - JLE sequenceDecs_decode_amd64_fill_2_end - SHLQ $0x08, DX - SUBQ $0x01, R14 - SUBQ $0x01, SI - SUBQ $0x08, BX - MOVBQZX (R14), AX - ORQ AX, DX - JMP sequenceDecs_decode_amd64_fill_2_byte_by_byte - -sequenceDecs_decode_amd64_fill_2_check_overread: - CMPQ BX, $0x40 - JA error_overread - -sequenceDecs_decode_amd64_fill_2_end: - // Update literal length - MOVQ DI, AX - MOVQ BX, CX - MOVQ DX, R15 - SHLQ CL, R15 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decode_amd64_ll_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decode_amd64_ll_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decode_amd64_ll_update_zero - NEGQ CX - SHRQ CL, R15 - ADDQ R15, AX - -sequenceDecs_decode_amd64_ll_update_zero: - MOVQ AX, (R10) - - // Fill bitreader for state updates - MOVQ R14, (SP) - MOVQ R9, AX - SHRQ $0x08, AX - MOVBQZX AL, AX - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decode_amd64_skip_update - - // Update Literal Length State - MOVBQZX DI, R14 - SHRQ $0x10, DI - MOVWQZX DI, DI - LEAQ (BX)(R14*1), CX - MOVQ DX, R15 - MOVQ CX, BX - ROLQ CL, R15 - MOVL $0x00000001, BP - MOVB R14, CL - SHLL CL, BP - DECL BP - ANDQ BP, R15 - ADDQ R15, DI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(DI*8), DI - - // Update Match Length State - MOVBQZX R8, R14 - SHRQ $0x10, R8 - MOVWQZX R8, R8 - LEAQ (BX)(R14*1), CX - MOVQ DX, R15 - MOVQ CX, BX - ROLQ CL, R15 - MOVL $0x00000001, BP - MOVB R14, CL - SHLL CL, BP - DECL BP - ANDQ BP, R15 - ADDQ R15, R8 - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Offset State - MOVBQZX R9, R14 - SHRQ $0x10, R9 - MOVWQZX R9, R9 - LEAQ (BX)(R14*1), CX - MOVQ DX, R15 - MOVQ CX, BX - ROLQ CL, R15 - MOVL $0x00000001, BP - MOVB R14, CL - SHLL CL, BP - DECL BP - ANDQ BP, R15 - ADDQ R15, R9 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R9*8), R9 - -sequenceDecs_decode_amd64_skip_update: - // Adjust offset - MOVQ 16(R10), CX - CMPQ AX, $0x01 - JBE sequenceDecs_decode_amd64_adjust_offsetB_1_or_0 - MOVQ R12, R13 - MOVQ R11, R12 - MOVQ CX, R11 - JMP sequenceDecs_decode_amd64_after_adjust - -sequenceDecs_decode_amd64_adjust_offsetB_1_or_0: - CMPQ (R10), $0x00000000 - JNE sequenceDecs_decode_amd64_adjust_offset_maybezero - INCQ CX - JMP sequenceDecs_decode_amd64_adjust_offset_nonzero - -sequenceDecs_decode_amd64_adjust_offset_maybezero: - TESTQ CX, CX - JNZ sequenceDecs_decode_amd64_adjust_offset_nonzero - MOVQ R11, CX - JMP sequenceDecs_decode_amd64_after_adjust - -sequenceDecs_decode_amd64_adjust_offset_nonzero: - CMPQ CX, $0x01 - JB sequenceDecs_decode_amd64_adjust_zero - JEQ sequenceDecs_decode_amd64_adjust_one - CMPQ CX, $0x02 - JA sequenceDecs_decode_amd64_adjust_three - JMP sequenceDecs_decode_amd64_adjust_two - -sequenceDecs_decode_amd64_adjust_zero: - MOVQ R11, AX - JMP sequenceDecs_decode_amd64_adjust_test_temp_valid - -sequenceDecs_decode_amd64_adjust_one: - MOVQ R12, AX - JMP sequenceDecs_decode_amd64_adjust_test_temp_valid - -sequenceDecs_decode_amd64_adjust_two: - MOVQ R13, AX - JMP sequenceDecs_decode_amd64_adjust_test_temp_valid - -sequenceDecs_decode_amd64_adjust_three: - LEAQ -1(R11), AX - -sequenceDecs_decode_amd64_adjust_test_temp_valid: - TESTQ AX, AX - JNZ sequenceDecs_decode_amd64_adjust_temp_valid - MOVQ $0x00000001, AX - -sequenceDecs_decode_amd64_adjust_temp_valid: - CMPQ CX, $0x01 - CMOVQNE R12, R13 - MOVQ R11, R12 - MOVQ AX, R11 - MOVQ AX, CX - -sequenceDecs_decode_amd64_after_adjust: - MOVQ CX, 16(R10) - - // Check values - MOVQ 8(R10), AX - MOVQ (R10), R14 - LEAQ (AX)(R14*1), R15 - MOVQ s+0(FP), BP - ADDQ R15, 256(BP) - MOVQ ctx+16(FP), R15 - SUBQ R14, 128(R15) - JS error_not_enough_literals - CMPQ AX, $0x00020002 - JA sequenceDecs_decode_amd64_error_match_len_too_big - TESTQ CX, CX - JNZ sequenceDecs_decode_amd64_match_len_ofs_ok - TESTQ AX, AX - JNZ sequenceDecs_decode_amd64_error_match_len_ofs_mismatch - -sequenceDecs_decode_amd64_match_len_ofs_ok: - ADDQ $0x18, R10 - MOVQ ctx+16(FP), AX - DECQ 96(AX) - JNS sequenceDecs_decode_amd64_main_loop - MOVQ s+0(FP), AX - MOVQ R11, 144(AX) - MOVQ R12, 152(AX) - MOVQ R13, 160(AX) - MOVQ br+8(FP), AX - MOVQ DX, 24(AX) - MOVB BL, 32(AX) - MOVQ SI, 8(AX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decode_amd64_error_match_len_ofs_mismatch: - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decode_amd64_error_match_len_too_big: - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - -// func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int -// Requires: CMOV -TEXT ·sequenceDecs_decode_56_amd64(SB), $8-32 - MOVQ br+8(FP), CX - MOVQ 24(CX), DX - MOVBQZX 32(CX), BX - MOVQ (CX), AX - MOVQ 8(CX), SI - ADDQ SI, AX - MOVQ AX, (SP) - MOVQ ctx+16(FP), AX - MOVQ 72(AX), DI - MOVQ 80(AX), R8 - MOVQ 88(AX), R9 - MOVQ 104(AX), R10 - MOVQ s+0(FP), AX - MOVQ 144(AX), R11 - MOVQ 152(AX), R12 - MOVQ 160(AX), R13 - -sequenceDecs_decode_56_amd64_main_loop: - MOVQ (SP), R14 - - // Fill bitreader to have enough for the offset and match length. - CMPQ SI, $0x08 - JL sequenceDecs_decode_56_amd64_fill_byte_by_byte - MOVQ BX, AX - SHRQ $0x03, AX - SUBQ AX, R14 - MOVQ (R14), DX - SUBQ AX, SI - ANDQ $0x07, BX - JMP sequenceDecs_decode_56_amd64_fill_end - -sequenceDecs_decode_56_amd64_fill_byte_by_byte: - CMPQ SI, $0x00 - JLE sequenceDecs_decode_56_amd64_fill_check_overread - CMPQ BX, $0x07 - JLE sequenceDecs_decode_56_amd64_fill_end - SHLQ $0x08, DX - SUBQ $0x01, R14 - SUBQ $0x01, SI - SUBQ $0x08, BX - MOVBQZX (R14), AX - ORQ AX, DX - JMP sequenceDecs_decode_56_amd64_fill_byte_by_byte - -sequenceDecs_decode_56_amd64_fill_check_overread: - CMPQ BX, $0x40 - JA error_overread - -sequenceDecs_decode_56_amd64_fill_end: - // Update offset - MOVQ R9, AX - MOVQ BX, CX - MOVQ DX, R15 - SHLQ CL, R15 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decode_56_amd64_of_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decode_56_amd64_of_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decode_56_amd64_of_update_zero - NEGQ CX - SHRQ CL, R15 - ADDQ R15, AX - -sequenceDecs_decode_56_amd64_of_update_zero: - MOVQ AX, 16(R10) - - // Update match length - MOVQ R8, AX - MOVQ BX, CX - MOVQ DX, R15 - SHLQ CL, R15 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decode_56_amd64_ml_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decode_56_amd64_ml_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decode_56_amd64_ml_update_zero - NEGQ CX - SHRQ CL, R15 - ADDQ R15, AX - -sequenceDecs_decode_56_amd64_ml_update_zero: - MOVQ AX, 8(R10) - - // Update literal length - MOVQ DI, AX - MOVQ BX, CX - MOVQ DX, R15 - SHLQ CL, R15 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decode_56_amd64_ll_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decode_56_amd64_ll_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decode_56_amd64_ll_update_zero - NEGQ CX - SHRQ CL, R15 - ADDQ R15, AX - -sequenceDecs_decode_56_amd64_ll_update_zero: - MOVQ AX, (R10) - - // Fill bitreader for state updates - MOVQ R14, (SP) - MOVQ R9, AX - SHRQ $0x08, AX - MOVBQZX AL, AX - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decode_56_amd64_skip_update - - // Update Literal Length State - MOVBQZX DI, R14 - SHRQ $0x10, DI - MOVWQZX DI, DI - LEAQ (BX)(R14*1), CX - MOVQ DX, R15 - MOVQ CX, BX - ROLQ CL, R15 - MOVL $0x00000001, BP - MOVB R14, CL - SHLL CL, BP - DECL BP - ANDQ BP, R15 - ADDQ R15, DI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(DI*8), DI - - // Update Match Length State - MOVBQZX R8, R14 - SHRQ $0x10, R8 - MOVWQZX R8, R8 - LEAQ (BX)(R14*1), CX - MOVQ DX, R15 - MOVQ CX, BX - ROLQ CL, R15 - MOVL $0x00000001, BP - MOVB R14, CL - SHLL CL, BP - DECL BP - ANDQ BP, R15 - ADDQ R15, R8 - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Offset State - MOVBQZX R9, R14 - SHRQ $0x10, R9 - MOVWQZX R9, R9 - LEAQ (BX)(R14*1), CX - MOVQ DX, R15 - MOVQ CX, BX - ROLQ CL, R15 - MOVL $0x00000001, BP - MOVB R14, CL - SHLL CL, BP - DECL BP - ANDQ BP, R15 - ADDQ R15, R9 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R9*8), R9 - -sequenceDecs_decode_56_amd64_skip_update: - // Adjust offset - MOVQ 16(R10), CX - CMPQ AX, $0x01 - JBE sequenceDecs_decode_56_amd64_adjust_offsetB_1_or_0 - MOVQ R12, R13 - MOVQ R11, R12 - MOVQ CX, R11 - JMP sequenceDecs_decode_56_amd64_after_adjust - -sequenceDecs_decode_56_amd64_adjust_offsetB_1_or_0: - CMPQ (R10), $0x00000000 - JNE sequenceDecs_decode_56_amd64_adjust_offset_maybezero - INCQ CX - JMP sequenceDecs_decode_56_amd64_adjust_offset_nonzero - -sequenceDecs_decode_56_amd64_adjust_offset_maybezero: - TESTQ CX, CX - JNZ sequenceDecs_decode_56_amd64_adjust_offset_nonzero - MOVQ R11, CX - JMP sequenceDecs_decode_56_amd64_after_adjust - -sequenceDecs_decode_56_amd64_adjust_offset_nonzero: - CMPQ CX, $0x01 - JB sequenceDecs_decode_56_amd64_adjust_zero - JEQ sequenceDecs_decode_56_amd64_adjust_one - CMPQ CX, $0x02 - JA sequenceDecs_decode_56_amd64_adjust_three - JMP sequenceDecs_decode_56_amd64_adjust_two - -sequenceDecs_decode_56_amd64_adjust_zero: - MOVQ R11, AX - JMP sequenceDecs_decode_56_amd64_adjust_test_temp_valid - -sequenceDecs_decode_56_amd64_adjust_one: - MOVQ R12, AX - JMP sequenceDecs_decode_56_amd64_adjust_test_temp_valid - -sequenceDecs_decode_56_amd64_adjust_two: - MOVQ R13, AX - JMP sequenceDecs_decode_56_amd64_adjust_test_temp_valid - -sequenceDecs_decode_56_amd64_adjust_three: - LEAQ -1(R11), AX - -sequenceDecs_decode_56_amd64_adjust_test_temp_valid: - TESTQ AX, AX - JNZ sequenceDecs_decode_56_amd64_adjust_temp_valid - MOVQ $0x00000001, AX - -sequenceDecs_decode_56_amd64_adjust_temp_valid: - CMPQ CX, $0x01 - CMOVQNE R12, R13 - MOVQ R11, R12 - MOVQ AX, R11 - MOVQ AX, CX - -sequenceDecs_decode_56_amd64_after_adjust: - MOVQ CX, 16(R10) - - // Check values - MOVQ 8(R10), AX - MOVQ (R10), R14 - LEAQ (AX)(R14*1), R15 - MOVQ s+0(FP), BP - ADDQ R15, 256(BP) - MOVQ ctx+16(FP), R15 - SUBQ R14, 128(R15) - JS error_not_enough_literals - CMPQ AX, $0x00020002 - JA sequenceDecs_decode_56_amd64_error_match_len_too_big - TESTQ CX, CX - JNZ sequenceDecs_decode_56_amd64_match_len_ofs_ok - TESTQ AX, AX - JNZ sequenceDecs_decode_56_amd64_error_match_len_ofs_mismatch - -sequenceDecs_decode_56_amd64_match_len_ofs_ok: - ADDQ $0x18, R10 - MOVQ ctx+16(FP), AX - DECQ 96(AX) - JNS sequenceDecs_decode_56_amd64_main_loop - MOVQ s+0(FP), AX - MOVQ R11, 144(AX) - MOVQ R12, 152(AX) - MOVQ R13, 160(AX) - MOVQ br+8(FP), AX - MOVQ DX, 24(AX) - MOVB BL, 32(AX) - MOVQ SI, 8(AX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decode_56_amd64_error_match_len_ofs_mismatch: - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decode_56_amd64_error_match_len_too_big: - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - -// func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int -// Requires: BMI, BMI2, CMOV -TEXT ·sequenceDecs_decode_bmi2(SB), $8-32 - MOVQ br+8(FP), BX - MOVQ 24(BX), AX - MOVBQZX 32(BX), DX - MOVQ (BX), CX - MOVQ 8(BX), BX - ADDQ BX, CX - MOVQ CX, (SP) - MOVQ ctx+16(FP), CX - MOVQ 72(CX), SI - MOVQ 80(CX), DI - MOVQ 88(CX), R8 - MOVQ 104(CX), R9 - MOVQ s+0(FP), CX - MOVQ 144(CX), R10 - MOVQ 152(CX), R11 - MOVQ 160(CX), R12 - -sequenceDecs_decode_bmi2_main_loop: - MOVQ (SP), R13 - - // Fill bitreader to have enough for the offset and match length. - CMPQ BX, $0x08 - JL sequenceDecs_decode_bmi2_fill_byte_by_byte - MOVQ DX, CX - SHRQ $0x03, CX - SUBQ CX, R13 - MOVQ (R13), AX - SUBQ CX, BX - ANDQ $0x07, DX - JMP sequenceDecs_decode_bmi2_fill_end - -sequenceDecs_decode_bmi2_fill_byte_by_byte: - CMPQ BX, $0x00 - JLE sequenceDecs_decode_bmi2_fill_check_overread - CMPQ DX, $0x07 - JLE sequenceDecs_decode_bmi2_fill_end - SHLQ $0x08, AX - SUBQ $0x01, R13 - SUBQ $0x01, BX - SUBQ $0x08, DX - MOVBQZX (R13), CX - ORQ CX, AX - JMP sequenceDecs_decode_bmi2_fill_byte_by_byte - -sequenceDecs_decode_bmi2_fill_check_overread: - CMPQ DX, $0x40 - JA error_overread - -sequenceDecs_decode_bmi2_fill_end: - // Update offset - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R14 - MOVQ AX, R15 - LEAQ (DX)(R14*1), CX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - MOVQ CX, DX - MOVQ R8, CX - SHRQ $0x20, CX - ADDQ R15, CX - MOVQ CX, 16(R9) - - // Update match length - MOVQ $0x00000808, CX - BEXTRQ CX, DI, R14 - MOVQ AX, R15 - LEAQ (DX)(R14*1), CX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - MOVQ CX, DX - MOVQ DI, CX - SHRQ $0x20, CX - ADDQ R15, CX - MOVQ CX, 8(R9) - - // Fill bitreader to have enough for the remaining - CMPQ BX, $0x08 - JL sequenceDecs_decode_bmi2_fill_2_byte_by_byte - MOVQ DX, CX - SHRQ $0x03, CX - SUBQ CX, R13 - MOVQ (R13), AX - SUBQ CX, BX - ANDQ $0x07, DX - JMP sequenceDecs_decode_bmi2_fill_2_end - -sequenceDecs_decode_bmi2_fill_2_byte_by_byte: - CMPQ BX, $0x00 - JLE sequenceDecs_decode_bmi2_fill_2_check_overread - CMPQ DX, $0x07 - JLE sequenceDecs_decode_bmi2_fill_2_end - SHLQ $0x08, AX - SUBQ $0x01, R13 - SUBQ $0x01, BX - SUBQ $0x08, DX - MOVBQZX (R13), CX - ORQ CX, AX - JMP sequenceDecs_decode_bmi2_fill_2_byte_by_byte - -sequenceDecs_decode_bmi2_fill_2_check_overread: - CMPQ DX, $0x40 - JA error_overread - -sequenceDecs_decode_bmi2_fill_2_end: - // Update literal length - MOVQ $0x00000808, CX - BEXTRQ CX, SI, R14 - MOVQ AX, R15 - LEAQ (DX)(R14*1), CX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - MOVQ CX, DX - MOVQ SI, CX - SHRQ $0x20, CX - ADDQ R15, CX - MOVQ CX, (R9) - - // Fill bitreader for state updates - MOVQ R13, (SP) - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R13 - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decode_bmi2_skip_update - LEAQ (SI)(DI*1), R14 - ADDQ R8, R14 - MOVBQZX R14, R14 - LEAQ (DX)(R14*1), CX - MOVQ AX, R15 - MOVQ CX, DX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - - // Update Offset State - BZHIQ R8, R15, CX - SHRXQ R8, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, R8, R8 - ADDQ CX, R8 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Match Length State - BZHIQ DI, R15, CX - SHRXQ DI, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, DI, DI - ADDQ CX, DI - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(DI*8), DI - - // Update Literal Length State - BZHIQ SI, R15, CX - MOVQ $0x00001010, R14 - BEXTRQ R14, SI, SI - ADDQ CX, SI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(SI*8), SI - -sequenceDecs_decode_bmi2_skip_update: - // Adjust offset - MOVQ 16(R9), CX - CMPQ R13, $0x01 - JBE sequenceDecs_decode_bmi2_adjust_offsetB_1_or_0 - MOVQ R11, R12 - MOVQ R10, R11 - MOVQ CX, R10 - JMP sequenceDecs_decode_bmi2_after_adjust - -sequenceDecs_decode_bmi2_adjust_offsetB_1_or_0: - CMPQ (R9), $0x00000000 - JNE sequenceDecs_decode_bmi2_adjust_offset_maybezero - INCQ CX - JMP sequenceDecs_decode_bmi2_adjust_offset_nonzero - -sequenceDecs_decode_bmi2_adjust_offset_maybezero: - TESTQ CX, CX - JNZ sequenceDecs_decode_bmi2_adjust_offset_nonzero - MOVQ R10, CX - JMP sequenceDecs_decode_bmi2_after_adjust - -sequenceDecs_decode_bmi2_adjust_offset_nonzero: - CMPQ CX, $0x01 - JB sequenceDecs_decode_bmi2_adjust_zero - JEQ sequenceDecs_decode_bmi2_adjust_one - CMPQ CX, $0x02 - JA sequenceDecs_decode_bmi2_adjust_three - JMP sequenceDecs_decode_bmi2_adjust_two - -sequenceDecs_decode_bmi2_adjust_zero: - MOVQ R10, R13 - JMP sequenceDecs_decode_bmi2_adjust_test_temp_valid - -sequenceDecs_decode_bmi2_adjust_one: - MOVQ R11, R13 - JMP sequenceDecs_decode_bmi2_adjust_test_temp_valid - -sequenceDecs_decode_bmi2_adjust_two: - MOVQ R12, R13 - JMP sequenceDecs_decode_bmi2_adjust_test_temp_valid - -sequenceDecs_decode_bmi2_adjust_three: - LEAQ -1(R10), R13 - -sequenceDecs_decode_bmi2_adjust_test_temp_valid: - TESTQ R13, R13 - JNZ sequenceDecs_decode_bmi2_adjust_temp_valid - MOVQ $0x00000001, R13 - -sequenceDecs_decode_bmi2_adjust_temp_valid: - CMPQ CX, $0x01 - CMOVQNE R11, R12 - MOVQ R10, R11 - MOVQ R13, R10 - MOVQ R13, CX - -sequenceDecs_decode_bmi2_after_adjust: - MOVQ CX, 16(R9) - - // Check values - MOVQ 8(R9), R13 - MOVQ (R9), R14 - LEAQ (R13)(R14*1), R15 - MOVQ s+0(FP), BP - ADDQ R15, 256(BP) - MOVQ ctx+16(FP), R15 - SUBQ R14, 128(R15) - JS error_not_enough_literals - CMPQ R13, $0x00020002 - JA sequenceDecs_decode_bmi2_error_match_len_too_big - TESTQ CX, CX - JNZ sequenceDecs_decode_bmi2_match_len_ofs_ok - TESTQ R13, R13 - JNZ sequenceDecs_decode_bmi2_error_match_len_ofs_mismatch - -sequenceDecs_decode_bmi2_match_len_ofs_ok: - ADDQ $0x18, R9 - MOVQ ctx+16(FP), CX - DECQ 96(CX) - JNS sequenceDecs_decode_bmi2_main_loop - MOVQ s+0(FP), CX - MOVQ R10, 144(CX) - MOVQ R11, 152(CX) - MOVQ R12, 160(CX) - MOVQ br+8(FP), CX - MOVQ AX, 24(CX) - MOVB DL, 32(CX) - MOVQ BX, 8(CX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decode_bmi2_error_match_len_ofs_mismatch: - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decode_bmi2_error_match_len_too_big: - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - -// func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int -// Requires: BMI, BMI2, CMOV -TEXT ·sequenceDecs_decode_56_bmi2(SB), $8-32 - MOVQ br+8(FP), BX - MOVQ 24(BX), AX - MOVBQZX 32(BX), DX - MOVQ (BX), CX - MOVQ 8(BX), BX - ADDQ BX, CX - MOVQ CX, (SP) - MOVQ ctx+16(FP), CX - MOVQ 72(CX), SI - MOVQ 80(CX), DI - MOVQ 88(CX), R8 - MOVQ 104(CX), R9 - MOVQ s+0(FP), CX - MOVQ 144(CX), R10 - MOVQ 152(CX), R11 - MOVQ 160(CX), R12 - -sequenceDecs_decode_56_bmi2_main_loop: - MOVQ (SP), R13 - - // Fill bitreader to have enough for the offset and match length. - CMPQ BX, $0x08 - JL sequenceDecs_decode_56_bmi2_fill_byte_by_byte - MOVQ DX, CX - SHRQ $0x03, CX - SUBQ CX, R13 - MOVQ (R13), AX - SUBQ CX, BX - ANDQ $0x07, DX - JMP sequenceDecs_decode_56_bmi2_fill_end - -sequenceDecs_decode_56_bmi2_fill_byte_by_byte: - CMPQ BX, $0x00 - JLE sequenceDecs_decode_56_bmi2_fill_check_overread - CMPQ DX, $0x07 - JLE sequenceDecs_decode_56_bmi2_fill_end - SHLQ $0x08, AX - SUBQ $0x01, R13 - SUBQ $0x01, BX - SUBQ $0x08, DX - MOVBQZX (R13), CX - ORQ CX, AX - JMP sequenceDecs_decode_56_bmi2_fill_byte_by_byte - -sequenceDecs_decode_56_bmi2_fill_check_overread: - CMPQ DX, $0x40 - JA error_overread - -sequenceDecs_decode_56_bmi2_fill_end: - // Update offset - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R14 - MOVQ AX, R15 - LEAQ (DX)(R14*1), CX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - MOVQ CX, DX - MOVQ R8, CX - SHRQ $0x20, CX - ADDQ R15, CX - MOVQ CX, 16(R9) - - // Update match length - MOVQ $0x00000808, CX - BEXTRQ CX, DI, R14 - MOVQ AX, R15 - LEAQ (DX)(R14*1), CX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - MOVQ CX, DX - MOVQ DI, CX - SHRQ $0x20, CX - ADDQ R15, CX - MOVQ CX, 8(R9) - - // Update literal length - MOVQ $0x00000808, CX - BEXTRQ CX, SI, R14 - MOVQ AX, R15 - LEAQ (DX)(R14*1), CX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - MOVQ CX, DX - MOVQ SI, CX - SHRQ $0x20, CX - ADDQ R15, CX - MOVQ CX, (R9) - - // Fill bitreader for state updates - MOVQ R13, (SP) - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R13 - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decode_56_bmi2_skip_update - LEAQ (SI)(DI*1), R14 - ADDQ R8, R14 - MOVBQZX R14, R14 - LEAQ (DX)(R14*1), CX - MOVQ AX, R15 - MOVQ CX, DX - ROLQ CL, R15 - BZHIQ R14, R15, R15 - - // Update Offset State - BZHIQ R8, R15, CX - SHRXQ R8, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, R8, R8 - ADDQ CX, R8 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Match Length State - BZHIQ DI, R15, CX - SHRXQ DI, R15, R15 - MOVQ $0x00001010, R14 - BEXTRQ R14, DI, DI - ADDQ CX, DI - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(DI*8), DI - - // Update Literal Length State - BZHIQ SI, R15, CX - MOVQ $0x00001010, R14 - BEXTRQ R14, SI, SI - ADDQ CX, SI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(SI*8), SI - -sequenceDecs_decode_56_bmi2_skip_update: - // Adjust offset - MOVQ 16(R9), CX - CMPQ R13, $0x01 - JBE sequenceDecs_decode_56_bmi2_adjust_offsetB_1_or_0 - MOVQ R11, R12 - MOVQ R10, R11 - MOVQ CX, R10 - JMP sequenceDecs_decode_56_bmi2_after_adjust - -sequenceDecs_decode_56_bmi2_adjust_offsetB_1_or_0: - CMPQ (R9), $0x00000000 - JNE sequenceDecs_decode_56_bmi2_adjust_offset_maybezero - INCQ CX - JMP sequenceDecs_decode_56_bmi2_adjust_offset_nonzero - -sequenceDecs_decode_56_bmi2_adjust_offset_maybezero: - TESTQ CX, CX - JNZ sequenceDecs_decode_56_bmi2_adjust_offset_nonzero - MOVQ R10, CX - JMP sequenceDecs_decode_56_bmi2_after_adjust - -sequenceDecs_decode_56_bmi2_adjust_offset_nonzero: - CMPQ CX, $0x01 - JB sequenceDecs_decode_56_bmi2_adjust_zero - JEQ sequenceDecs_decode_56_bmi2_adjust_one - CMPQ CX, $0x02 - JA sequenceDecs_decode_56_bmi2_adjust_three - JMP sequenceDecs_decode_56_bmi2_adjust_two - -sequenceDecs_decode_56_bmi2_adjust_zero: - MOVQ R10, R13 - JMP sequenceDecs_decode_56_bmi2_adjust_test_temp_valid - -sequenceDecs_decode_56_bmi2_adjust_one: - MOVQ R11, R13 - JMP sequenceDecs_decode_56_bmi2_adjust_test_temp_valid - -sequenceDecs_decode_56_bmi2_adjust_two: - MOVQ R12, R13 - JMP sequenceDecs_decode_56_bmi2_adjust_test_temp_valid - -sequenceDecs_decode_56_bmi2_adjust_three: - LEAQ -1(R10), R13 - -sequenceDecs_decode_56_bmi2_adjust_test_temp_valid: - TESTQ R13, R13 - JNZ sequenceDecs_decode_56_bmi2_adjust_temp_valid - MOVQ $0x00000001, R13 - -sequenceDecs_decode_56_bmi2_adjust_temp_valid: - CMPQ CX, $0x01 - CMOVQNE R11, R12 - MOVQ R10, R11 - MOVQ R13, R10 - MOVQ R13, CX - -sequenceDecs_decode_56_bmi2_after_adjust: - MOVQ CX, 16(R9) - - // Check values - MOVQ 8(R9), R13 - MOVQ (R9), R14 - LEAQ (R13)(R14*1), R15 - MOVQ s+0(FP), BP - ADDQ R15, 256(BP) - MOVQ ctx+16(FP), R15 - SUBQ R14, 128(R15) - JS error_not_enough_literals - CMPQ R13, $0x00020002 - JA sequenceDecs_decode_56_bmi2_error_match_len_too_big - TESTQ CX, CX - JNZ sequenceDecs_decode_56_bmi2_match_len_ofs_ok - TESTQ R13, R13 - JNZ sequenceDecs_decode_56_bmi2_error_match_len_ofs_mismatch - -sequenceDecs_decode_56_bmi2_match_len_ofs_ok: - ADDQ $0x18, R9 - MOVQ ctx+16(FP), CX - DECQ 96(CX) - JNS sequenceDecs_decode_56_bmi2_main_loop - MOVQ s+0(FP), CX - MOVQ R10, 144(CX) - MOVQ R11, 152(CX) - MOVQ R12, 160(CX) - MOVQ br+8(FP), CX - MOVQ AX, 24(CX) - MOVB DL, 32(CX) - MOVQ BX, 8(CX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decode_56_bmi2_error_match_len_ofs_mismatch: - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decode_56_bmi2_error_match_len_too_big: - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - -// func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool -// Requires: SSE -TEXT ·sequenceDecs_executeSimple_amd64(SB), $8-9 - MOVQ ctx+0(FP), R10 - MOVQ 8(R10), CX - TESTQ CX, CX - JZ empty_seqs - MOVQ (R10), AX - MOVQ 24(R10), DX - MOVQ 32(R10), BX - MOVQ 80(R10), SI - MOVQ 104(R10), DI - MOVQ 120(R10), R8 - MOVQ 56(R10), R9 - MOVQ 64(R10), R10 - ADDQ R10, R9 - - // seqsBase += 24 * seqIndex - LEAQ (DX)(DX*2), R11 - SHLQ $0x03, R11 - ADDQ R11, AX - - // outBase += outPosition - ADDQ DI, BX - -main_loop: - MOVQ (AX), R11 - MOVQ 16(AX), R12 - MOVQ 8(AX), R13 - - // Copy literals - TESTQ R11, R11 - JZ check_offset - XORQ R14, R14 - -copy_1: - MOVUPS (SI)(R14*1), X0 - MOVUPS X0, (BX)(R14*1) - ADDQ $0x10, R14 - CMPQ R14, R11 - JB copy_1 - ADDQ R11, SI - ADDQ R11, BX - ADDQ R11, DI - - // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) -check_offset: - LEAQ (DI)(R10*1), R11 - CMPQ R12, R11 - JG error_match_off_too_big - CMPQ R12, R8 - JG error_match_off_too_big - - // Copy match from history - MOVQ R12, R11 - SUBQ DI, R11 - JLS copy_match - MOVQ R9, R14 - SUBQ R11, R14 - CMPQ R13, R11 - JG copy_all_from_history - MOVQ R13, R11 - SUBQ $0x10, R11 - JB copy_4_small - -copy_4_loop: - MOVUPS (R14), X0 - MOVUPS X0, (BX) - ADDQ $0x10, R14 - ADDQ $0x10, BX - SUBQ $0x10, R11 - JAE copy_4_loop - LEAQ 16(R14)(R11*1), R14 - LEAQ 16(BX)(R11*1), BX - MOVUPS -16(R14), X0 - MOVUPS X0, -16(BX) - JMP copy_4_end - -copy_4_small: - CMPQ R13, $0x03 - JE copy_4_move_3 - CMPQ R13, $0x08 - JB copy_4_move_4through7 - JMP copy_4_move_8through16 - -copy_4_move_3: - MOVW (R14), R11 - MOVB 2(R14), R12 - MOVW R11, (BX) - MOVB R12, 2(BX) - ADDQ R13, R14 - ADDQ R13, BX - JMP copy_4_end - -copy_4_move_4through7: - MOVL (R14), R11 - MOVL -4(R14)(R13*1), R12 - MOVL R11, (BX) - MOVL R12, -4(BX)(R13*1) - ADDQ R13, R14 - ADDQ R13, BX - JMP copy_4_end - -copy_4_move_8through16: - MOVQ (R14), R11 - MOVQ -8(R14)(R13*1), R12 - MOVQ R11, (BX) - MOVQ R12, -8(BX)(R13*1) - ADDQ R13, R14 - ADDQ R13, BX - -copy_4_end: - ADDQ R13, DI - ADDQ $0x18, AX - INCQ DX - CMPQ DX, CX - JB main_loop - JMP loop_finished - -copy_all_from_history: - MOVQ R11, R15 - SUBQ $0x10, R15 - JB copy_5_small - -copy_5_loop: - MOVUPS (R14), X0 - MOVUPS X0, (BX) - ADDQ $0x10, R14 - ADDQ $0x10, BX - SUBQ $0x10, R15 - JAE copy_5_loop - LEAQ 16(R14)(R15*1), R14 - LEAQ 16(BX)(R15*1), BX - MOVUPS -16(R14), X0 - MOVUPS X0, -16(BX) - JMP copy_5_end - -copy_5_small: - CMPQ R11, $0x03 - JE copy_5_move_3 - JB copy_5_move_1or2 - CMPQ R11, $0x08 - JB copy_5_move_4through7 - JMP copy_5_move_8through16 - -copy_5_move_1or2: - MOVB (R14), R15 - MOVB -1(R14)(R11*1), BP - MOVB R15, (BX) - MOVB BP, -1(BX)(R11*1) - ADDQ R11, R14 - ADDQ R11, BX - JMP copy_5_end - -copy_5_move_3: - MOVW (R14), R15 - MOVB 2(R14), BP - MOVW R15, (BX) - MOVB BP, 2(BX) - ADDQ R11, R14 - ADDQ R11, BX - JMP copy_5_end - -copy_5_move_4through7: - MOVL (R14), R15 - MOVL -4(R14)(R11*1), BP - MOVL R15, (BX) - MOVL BP, -4(BX)(R11*1) - ADDQ R11, R14 - ADDQ R11, BX - JMP copy_5_end - -copy_5_move_8through16: - MOVQ (R14), R15 - MOVQ -8(R14)(R11*1), BP - MOVQ R15, (BX) - MOVQ BP, -8(BX)(R11*1) - ADDQ R11, R14 - ADDQ R11, BX - -copy_5_end: - ADDQ R11, DI - SUBQ R11, R13 - - // Copy match from the current buffer -copy_match: - MOVQ BX, R11 - SUBQ R12, R11 - - // ml <= mo - CMPQ R13, R12 - JA copy_overlapping_match - - // Copy non-overlapping match - ADDQ R13, DI - MOVQ BX, R12 - ADDQ R13, BX - -copy_2: - MOVUPS (R11), X0 - MOVUPS X0, (R12) - ADDQ $0x10, R11 - ADDQ $0x10, R12 - SUBQ $0x10, R13 - JHI copy_2 - JMP handle_loop - - // Copy overlapping match -copy_overlapping_match: - ADDQ R13, DI - -copy_slow_3: - MOVB (R11), R12 - MOVB R12, (BX) - INCQ R11 - INCQ BX - DECQ R13 - JNZ copy_slow_3 - -handle_loop: - ADDQ $0x18, AX - INCQ DX - CMPQ DX, CX - JB main_loop - -loop_finished: - // Return value - MOVB $0x01, ret+8(FP) - - // Update the context - MOVQ ctx+0(FP), AX - MOVQ DX, 24(AX) - MOVQ DI, 104(AX) - SUBQ 80(AX), SI - MOVQ SI, 112(AX) - RET - -error_match_off_too_big: - // Return value - MOVB $0x00, ret+8(FP) - - // Update the context - MOVQ ctx+0(FP), AX - MOVQ DX, 24(AX) - MOVQ DI, 104(AX) - SUBQ 80(AX), SI - MOVQ SI, 112(AX) - RET - -empty_seqs: - // Return value - MOVB $0x01, ret+8(FP) - RET - -// func sequenceDecs_executeSimple_safe_amd64(ctx *executeAsmContext) bool -// Requires: SSE -TEXT ·sequenceDecs_executeSimple_safe_amd64(SB), $8-9 - MOVQ ctx+0(FP), R10 - MOVQ 8(R10), CX - TESTQ CX, CX - JZ empty_seqs - MOVQ (R10), AX - MOVQ 24(R10), DX - MOVQ 32(R10), BX - MOVQ 80(R10), SI - MOVQ 104(R10), DI - MOVQ 120(R10), R8 - MOVQ 56(R10), R9 - MOVQ 64(R10), R10 - ADDQ R10, R9 - - // seqsBase += 24 * seqIndex - LEAQ (DX)(DX*2), R11 - SHLQ $0x03, R11 - ADDQ R11, AX - - // outBase += outPosition - ADDQ DI, BX - -main_loop: - MOVQ (AX), R11 - MOVQ 16(AX), R12 - MOVQ 8(AX), R13 - - // Copy literals - TESTQ R11, R11 - JZ check_offset - MOVQ R11, R14 - SUBQ $0x10, R14 - JB copy_1_small - -copy_1_loop: - MOVUPS (SI), X0 - MOVUPS X0, (BX) - ADDQ $0x10, SI - ADDQ $0x10, BX - SUBQ $0x10, R14 - JAE copy_1_loop - LEAQ 16(SI)(R14*1), SI - LEAQ 16(BX)(R14*1), BX - MOVUPS -16(SI), X0 - MOVUPS X0, -16(BX) - JMP copy_1_end - -copy_1_small: - CMPQ R11, $0x03 - JE copy_1_move_3 - JB copy_1_move_1or2 - CMPQ R11, $0x08 - JB copy_1_move_4through7 - JMP copy_1_move_8through16 - -copy_1_move_1or2: - MOVB (SI), R14 - MOVB -1(SI)(R11*1), R15 - MOVB R14, (BX) - MOVB R15, -1(BX)(R11*1) - ADDQ R11, SI - ADDQ R11, BX - JMP copy_1_end - -copy_1_move_3: - MOVW (SI), R14 - MOVB 2(SI), R15 - MOVW R14, (BX) - MOVB R15, 2(BX) - ADDQ R11, SI - ADDQ R11, BX - JMP copy_1_end - -copy_1_move_4through7: - MOVL (SI), R14 - MOVL -4(SI)(R11*1), R15 - MOVL R14, (BX) - MOVL R15, -4(BX)(R11*1) - ADDQ R11, SI - ADDQ R11, BX - JMP copy_1_end - -copy_1_move_8through16: - MOVQ (SI), R14 - MOVQ -8(SI)(R11*1), R15 - MOVQ R14, (BX) - MOVQ R15, -8(BX)(R11*1) - ADDQ R11, SI - ADDQ R11, BX - -copy_1_end: - ADDQ R11, DI - - // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) -check_offset: - LEAQ (DI)(R10*1), R11 - CMPQ R12, R11 - JG error_match_off_too_big - CMPQ R12, R8 - JG error_match_off_too_big - - // Copy match from history - MOVQ R12, R11 - SUBQ DI, R11 - JLS copy_match - MOVQ R9, R14 - SUBQ R11, R14 - CMPQ R13, R11 - JG copy_all_from_history - MOVQ R13, R11 - SUBQ $0x10, R11 - JB copy_4_small - -copy_4_loop: - MOVUPS (R14), X0 - MOVUPS X0, (BX) - ADDQ $0x10, R14 - ADDQ $0x10, BX - SUBQ $0x10, R11 - JAE copy_4_loop - LEAQ 16(R14)(R11*1), R14 - LEAQ 16(BX)(R11*1), BX - MOVUPS -16(R14), X0 - MOVUPS X0, -16(BX) - JMP copy_4_end - -copy_4_small: - CMPQ R13, $0x03 - JE copy_4_move_3 - CMPQ R13, $0x08 - JB copy_4_move_4through7 - JMP copy_4_move_8through16 - -copy_4_move_3: - MOVW (R14), R11 - MOVB 2(R14), R12 - MOVW R11, (BX) - MOVB R12, 2(BX) - ADDQ R13, R14 - ADDQ R13, BX - JMP copy_4_end - -copy_4_move_4through7: - MOVL (R14), R11 - MOVL -4(R14)(R13*1), R12 - MOVL R11, (BX) - MOVL R12, -4(BX)(R13*1) - ADDQ R13, R14 - ADDQ R13, BX - JMP copy_4_end - -copy_4_move_8through16: - MOVQ (R14), R11 - MOVQ -8(R14)(R13*1), R12 - MOVQ R11, (BX) - MOVQ R12, -8(BX)(R13*1) - ADDQ R13, R14 - ADDQ R13, BX - -copy_4_end: - ADDQ R13, DI - ADDQ $0x18, AX - INCQ DX - CMPQ DX, CX - JB main_loop - JMP loop_finished - -copy_all_from_history: - MOVQ R11, R15 - SUBQ $0x10, R15 - JB copy_5_small - -copy_5_loop: - MOVUPS (R14), X0 - MOVUPS X0, (BX) - ADDQ $0x10, R14 - ADDQ $0x10, BX - SUBQ $0x10, R15 - JAE copy_5_loop - LEAQ 16(R14)(R15*1), R14 - LEAQ 16(BX)(R15*1), BX - MOVUPS -16(R14), X0 - MOVUPS X0, -16(BX) - JMP copy_5_end - -copy_5_small: - CMPQ R11, $0x03 - JE copy_5_move_3 - JB copy_5_move_1or2 - CMPQ R11, $0x08 - JB copy_5_move_4through7 - JMP copy_5_move_8through16 - -copy_5_move_1or2: - MOVB (R14), R15 - MOVB -1(R14)(R11*1), BP - MOVB R15, (BX) - MOVB BP, -1(BX)(R11*1) - ADDQ R11, R14 - ADDQ R11, BX - JMP copy_5_end - -copy_5_move_3: - MOVW (R14), R15 - MOVB 2(R14), BP - MOVW R15, (BX) - MOVB BP, 2(BX) - ADDQ R11, R14 - ADDQ R11, BX - JMP copy_5_end - -copy_5_move_4through7: - MOVL (R14), R15 - MOVL -4(R14)(R11*1), BP - MOVL R15, (BX) - MOVL BP, -4(BX)(R11*1) - ADDQ R11, R14 - ADDQ R11, BX - JMP copy_5_end - -copy_5_move_8through16: - MOVQ (R14), R15 - MOVQ -8(R14)(R11*1), BP - MOVQ R15, (BX) - MOVQ BP, -8(BX)(R11*1) - ADDQ R11, R14 - ADDQ R11, BX - -copy_5_end: - ADDQ R11, DI - SUBQ R11, R13 - - // Copy match from the current buffer -copy_match: - MOVQ BX, R11 - SUBQ R12, R11 - - // ml <= mo - CMPQ R13, R12 - JA copy_overlapping_match - - // Copy non-overlapping match - ADDQ R13, DI - MOVQ R13, R12 - SUBQ $0x10, R12 - JB copy_2_small - -copy_2_loop: - MOVUPS (R11), X0 - MOVUPS X0, (BX) - ADDQ $0x10, R11 - ADDQ $0x10, BX - SUBQ $0x10, R12 - JAE copy_2_loop - LEAQ 16(R11)(R12*1), R11 - LEAQ 16(BX)(R12*1), BX - MOVUPS -16(R11), X0 - MOVUPS X0, -16(BX) - JMP copy_2_end - -copy_2_small: - CMPQ R13, $0x03 - JE copy_2_move_3 - JB copy_2_move_1or2 - CMPQ R13, $0x08 - JB copy_2_move_4through7 - JMP copy_2_move_8through16 - -copy_2_move_1or2: - MOVB (R11), R12 - MOVB -1(R11)(R13*1), R14 - MOVB R12, (BX) - MOVB R14, -1(BX)(R13*1) - ADDQ R13, R11 - ADDQ R13, BX - JMP copy_2_end - -copy_2_move_3: - MOVW (R11), R12 - MOVB 2(R11), R14 - MOVW R12, (BX) - MOVB R14, 2(BX) - ADDQ R13, R11 - ADDQ R13, BX - JMP copy_2_end - -copy_2_move_4through7: - MOVL (R11), R12 - MOVL -4(R11)(R13*1), R14 - MOVL R12, (BX) - MOVL R14, -4(BX)(R13*1) - ADDQ R13, R11 - ADDQ R13, BX - JMP copy_2_end - -copy_2_move_8through16: - MOVQ (R11), R12 - MOVQ -8(R11)(R13*1), R14 - MOVQ R12, (BX) - MOVQ R14, -8(BX)(R13*1) - ADDQ R13, R11 - ADDQ R13, BX - -copy_2_end: - JMP handle_loop - - // Copy overlapping match -copy_overlapping_match: - ADDQ R13, DI - -copy_slow_3: - MOVB (R11), R12 - MOVB R12, (BX) - INCQ R11 - INCQ BX - DECQ R13 - JNZ copy_slow_3 - -handle_loop: - ADDQ $0x18, AX - INCQ DX - CMPQ DX, CX - JB main_loop - -loop_finished: - // Return value - MOVB $0x01, ret+8(FP) - - // Update the context - MOVQ ctx+0(FP), AX - MOVQ DX, 24(AX) - MOVQ DI, 104(AX) - SUBQ 80(AX), SI - MOVQ SI, 112(AX) - RET - -error_match_off_too_big: - // Return value - MOVB $0x00, ret+8(FP) - - // Update the context - MOVQ ctx+0(FP), AX - MOVQ DX, 24(AX) - MOVQ DI, 104(AX) - SUBQ 80(AX), SI - MOVQ SI, 112(AX) - RET - -empty_seqs: - // Return value - MOVB $0x01, ret+8(FP) - RET - -// func sequenceDecs_decodeSync_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int -// Requires: CMOV, SSE -TEXT ·sequenceDecs_decodeSync_amd64(SB), $64-32 - MOVQ br+8(FP), CX - MOVQ 24(CX), DX - MOVBQZX 32(CX), BX - MOVQ (CX), AX - MOVQ 8(CX), SI - ADDQ SI, AX - MOVQ AX, (SP) - MOVQ ctx+16(FP), AX - MOVQ 72(AX), DI - MOVQ 80(AX), R8 - MOVQ 88(AX), R9 - XORQ CX, CX - MOVQ CX, 8(SP) - MOVQ CX, 16(SP) - MOVQ CX, 24(SP) - MOVQ 112(AX), R10 - MOVQ 128(AX), CX - MOVQ CX, 32(SP) - MOVQ 144(AX), R11 - MOVQ 136(AX), R12 - MOVQ 200(AX), CX - MOVQ CX, 56(SP) - MOVQ 176(AX), CX - MOVQ CX, 48(SP) - MOVQ 184(AX), AX - MOVQ AX, 40(SP) - MOVQ 40(SP), AX - ADDQ AX, 48(SP) - - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) - ADDQ R10, 32(SP) - - // outBase += outPosition - ADDQ R12, R10 - -sequenceDecs_decodeSync_amd64_main_loop: - MOVQ (SP), R13 - - // Fill bitreader to have enough for the offset and match length. - CMPQ SI, $0x08 - JL sequenceDecs_decodeSync_amd64_fill_byte_by_byte - MOVQ BX, AX - SHRQ $0x03, AX - SUBQ AX, R13 - MOVQ (R13), DX - SUBQ AX, SI - ANDQ $0x07, BX - JMP sequenceDecs_decodeSync_amd64_fill_end - -sequenceDecs_decodeSync_amd64_fill_byte_by_byte: - CMPQ SI, $0x00 - JLE sequenceDecs_decodeSync_amd64_fill_check_overread - CMPQ BX, $0x07 - JLE sequenceDecs_decodeSync_amd64_fill_end - SHLQ $0x08, DX - SUBQ $0x01, R13 - SUBQ $0x01, SI - SUBQ $0x08, BX - MOVBQZX (R13), AX - ORQ AX, DX - JMP sequenceDecs_decodeSync_amd64_fill_byte_by_byte - -sequenceDecs_decodeSync_amd64_fill_check_overread: - CMPQ BX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_amd64_fill_end: - // Update offset - MOVQ R9, AX - MOVQ BX, CX - MOVQ DX, R14 - SHLQ CL, R14 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decodeSync_amd64_of_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decodeSync_amd64_of_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decodeSync_amd64_of_update_zero - NEGQ CX - SHRQ CL, R14 - ADDQ R14, AX - -sequenceDecs_decodeSync_amd64_of_update_zero: - MOVQ AX, 8(SP) - - // Update match length - MOVQ R8, AX - MOVQ BX, CX - MOVQ DX, R14 - SHLQ CL, R14 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decodeSync_amd64_ml_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decodeSync_amd64_ml_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decodeSync_amd64_ml_update_zero - NEGQ CX - SHRQ CL, R14 - ADDQ R14, AX - -sequenceDecs_decodeSync_amd64_ml_update_zero: - MOVQ AX, 16(SP) - - // Fill bitreader to have enough for the remaining - CMPQ SI, $0x08 - JL sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte - MOVQ BX, AX - SHRQ $0x03, AX - SUBQ AX, R13 - MOVQ (R13), DX - SUBQ AX, SI - ANDQ $0x07, BX - JMP sequenceDecs_decodeSync_amd64_fill_2_end - -sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte: - CMPQ SI, $0x00 - JLE sequenceDecs_decodeSync_amd64_fill_2_check_overread - CMPQ BX, $0x07 - JLE sequenceDecs_decodeSync_amd64_fill_2_end - SHLQ $0x08, DX - SUBQ $0x01, R13 - SUBQ $0x01, SI - SUBQ $0x08, BX - MOVBQZX (R13), AX - ORQ AX, DX - JMP sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte - -sequenceDecs_decodeSync_amd64_fill_2_check_overread: - CMPQ BX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_amd64_fill_2_end: - // Update literal length - MOVQ DI, AX - MOVQ BX, CX - MOVQ DX, R14 - SHLQ CL, R14 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decodeSync_amd64_ll_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decodeSync_amd64_ll_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decodeSync_amd64_ll_update_zero - NEGQ CX - SHRQ CL, R14 - ADDQ R14, AX - -sequenceDecs_decodeSync_amd64_ll_update_zero: - MOVQ AX, 24(SP) - - // Fill bitreader for state updates - MOVQ R13, (SP) - MOVQ R9, AX - SHRQ $0x08, AX - MOVBQZX AL, AX - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decodeSync_amd64_skip_update - - // Update Literal Length State - MOVBQZX DI, R13 - SHRQ $0x10, DI - MOVWQZX DI, DI - LEAQ (BX)(R13*1), CX - MOVQ DX, R14 - MOVQ CX, BX - ROLQ CL, R14 - MOVL $0x00000001, R15 - MOVB R13, CL - SHLL CL, R15 - DECL R15 - ANDQ R15, R14 - ADDQ R14, DI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(DI*8), DI - - // Update Match Length State - MOVBQZX R8, R13 - SHRQ $0x10, R8 - MOVWQZX R8, R8 - LEAQ (BX)(R13*1), CX - MOVQ DX, R14 - MOVQ CX, BX - ROLQ CL, R14 - MOVL $0x00000001, R15 - MOVB R13, CL - SHLL CL, R15 - DECL R15 - ANDQ R15, R14 - ADDQ R14, R8 - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Offset State - MOVBQZX R9, R13 - SHRQ $0x10, R9 - MOVWQZX R9, R9 - LEAQ (BX)(R13*1), CX - MOVQ DX, R14 - MOVQ CX, BX - ROLQ CL, R14 - MOVL $0x00000001, R15 - MOVB R13, CL - SHLL CL, R15 - DECL R15 - ANDQ R15, R14 - ADDQ R14, R9 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R9*8), R9 - -sequenceDecs_decodeSync_amd64_skip_update: - // Adjust offset - MOVQ s+0(FP), CX - MOVQ 8(SP), R13 - CMPQ AX, $0x01 - JBE sequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0 - MOVUPS 144(CX), X0 - MOVQ R13, 144(CX) - MOVUPS X0, 152(CX) - JMP sequenceDecs_decodeSync_amd64_after_adjust - -sequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0: - CMPQ 24(SP), $0x00000000 - JNE sequenceDecs_decodeSync_amd64_adjust_offset_maybezero - INCQ R13 - JMP sequenceDecs_decodeSync_amd64_adjust_offset_nonzero - -sequenceDecs_decodeSync_amd64_adjust_offset_maybezero: - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_amd64_adjust_offset_nonzero - MOVQ 144(CX), R13 - JMP sequenceDecs_decodeSync_amd64_after_adjust - -sequenceDecs_decodeSync_amd64_adjust_offset_nonzero: - MOVQ R13, AX - XORQ R14, R14 - MOVQ $-1, R15 - CMPQ R13, $0x03 - CMOVQEQ R14, AX - CMOVQEQ R15, R14 - ADDQ 144(CX)(AX*8), R14 - JNZ sequenceDecs_decodeSync_amd64_adjust_temp_valid - MOVQ $0x00000001, R14 - -sequenceDecs_decodeSync_amd64_adjust_temp_valid: - CMPQ R13, $0x01 - JZ sequenceDecs_decodeSync_amd64_adjust_skip - MOVQ 152(CX), AX - MOVQ AX, 160(CX) - -sequenceDecs_decodeSync_amd64_adjust_skip: - MOVQ 144(CX), AX - MOVQ AX, 152(CX) - MOVQ R14, 144(CX) - MOVQ R14, R13 - -sequenceDecs_decodeSync_amd64_after_adjust: - MOVQ R13, 8(SP) - - // Check values - MOVQ 16(SP), AX - MOVQ 24(SP), CX - LEAQ (AX)(CX*1), R14 - MOVQ s+0(FP), R15 - ADDQ R14, 256(R15) - MOVQ ctx+16(FP), R14 - SUBQ CX, 104(R14) - JS error_not_enough_literals - CMPQ AX, $0x00020002 - JA sequenceDecs_decodeSync_amd64_error_match_len_too_big - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_amd64_match_len_ofs_ok - TESTQ AX, AX - JNZ sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch - -sequenceDecs_decodeSync_amd64_match_len_ofs_ok: - MOVQ 24(SP), AX - MOVQ 8(SP), CX - MOVQ 16(SP), R13 - - // Check if we have enough space in s.out - LEAQ (AX)(R13*1), R14 - ADDQ R10, R14 - CMPQ R14, 32(SP) - JA error_not_enough_space - - // Copy literals - TESTQ AX, AX - JZ check_offset - XORQ R14, R14 - -copy_1: - MOVUPS (R11)(R14*1), X0 - MOVUPS X0, (R10)(R14*1) - ADDQ $0x10, R14 - CMPQ R14, AX - JB copy_1 - ADDQ AX, R11 - ADDQ AX, R10 - ADDQ AX, R12 - - // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) -check_offset: - MOVQ R12, AX - ADDQ 40(SP), AX - CMPQ CX, AX - JG error_match_off_too_big - CMPQ CX, 56(SP) - JG error_match_off_too_big - - // Copy match from history - MOVQ CX, AX - SUBQ R12, AX - JLS copy_match - MOVQ 48(SP), R14 - SUBQ AX, R14 - CMPQ R13, AX - JG copy_all_from_history - MOVQ R13, AX - SUBQ $0x10, AX - JB copy_4_small - -copy_4_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R10) - ADDQ $0x10, R14 - ADDQ $0x10, R10 - SUBQ $0x10, AX - JAE copy_4_loop - LEAQ 16(R14)(AX*1), R14 - LEAQ 16(R10)(AX*1), R10 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R10) - JMP copy_4_end - -copy_4_small: - CMPQ R13, $0x03 - JE copy_4_move_3 - CMPQ R13, $0x08 - JB copy_4_move_4through7 - JMP copy_4_move_8through16 - -copy_4_move_3: - MOVW (R14), AX - MOVB 2(R14), CL - MOVW AX, (R10) - MOVB CL, 2(R10) - ADDQ R13, R14 - ADDQ R13, R10 - JMP copy_4_end - -copy_4_move_4through7: - MOVL (R14), AX - MOVL -4(R14)(R13*1), CX - MOVL AX, (R10) - MOVL CX, -4(R10)(R13*1) - ADDQ R13, R14 - ADDQ R13, R10 - JMP copy_4_end - -copy_4_move_8through16: - MOVQ (R14), AX - MOVQ -8(R14)(R13*1), CX - MOVQ AX, (R10) - MOVQ CX, -8(R10)(R13*1) - ADDQ R13, R14 - ADDQ R13, R10 - -copy_4_end: - ADDQ R13, R12 - JMP handle_loop - JMP loop_finished - -copy_all_from_history: - MOVQ AX, R15 - SUBQ $0x10, R15 - JB copy_5_small - -copy_5_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R10) - ADDQ $0x10, R14 - ADDQ $0x10, R10 - SUBQ $0x10, R15 - JAE copy_5_loop - LEAQ 16(R14)(R15*1), R14 - LEAQ 16(R10)(R15*1), R10 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R10) - JMP copy_5_end - -copy_5_small: - CMPQ AX, $0x03 - JE copy_5_move_3 - JB copy_5_move_1or2 - CMPQ AX, $0x08 - JB copy_5_move_4through7 - JMP copy_5_move_8through16 - -copy_5_move_1or2: - MOVB (R14), R15 - MOVB -1(R14)(AX*1), BP - MOVB R15, (R10) - MOVB BP, -1(R10)(AX*1) - ADDQ AX, R14 - ADDQ AX, R10 - JMP copy_5_end - -copy_5_move_3: - MOVW (R14), R15 - MOVB 2(R14), BP - MOVW R15, (R10) - MOVB BP, 2(R10) - ADDQ AX, R14 - ADDQ AX, R10 - JMP copy_5_end - -copy_5_move_4through7: - MOVL (R14), R15 - MOVL -4(R14)(AX*1), BP - MOVL R15, (R10) - MOVL BP, -4(R10)(AX*1) - ADDQ AX, R14 - ADDQ AX, R10 - JMP copy_5_end - -copy_5_move_8through16: - MOVQ (R14), R15 - MOVQ -8(R14)(AX*1), BP - MOVQ R15, (R10) - MOVQ BP, -8(R10)(AX*1) - ADDQ AX, R14 - ADDQ AX, R10 - -copy_5_end: - ADDQ AX, R12 - SUBQ AX, R13 - - // Copy match from the current buffer -copy_match: - MOVQ R10, AX - SUBQ CX, AX - - // ml <= mo - CMPQ R13, CX - JA copy_overlapping_match - - // Copy non-overlapping match - ADDQ R13, R12 - MOVQ R10, CX - ADDQ R13, R10 - -copy_2: - MOVUPS (AX), X0 - MOVUPS X0, (CX) - ADDQ $0x10, AX - ADDQ $0x10, CX - SUBQ $0x10, R13 - JHI copy_2 - JMP handle_loop - - // Copy overlapping match -copy_overlapping_match: - ADDQ R13, R12 - -copy_slow_3: - MOVB (AX), CL - MOVB CL, (R10) - INCQ AX - INCQ R10 - DECQ R13 - JNZ copy_slow_3 - -handle_loop: - MOVQ ctx+16(FP), AX - DECQ 96(AX) - JNS sequenceDecs_decodeSync_amd64_main_loop - -loop_finished: - MOVQ br+8(FP), AX - MOVQ DX, 24(AX) - MOVB BL, 32(AX) - MOVQ SI, 8(AX) - - // Update the context - MOVQ ctx+16(FP), AX - MOVQ R12, 136(AX) - MOVQ 144(AX), CX - SUBQ CX, R11 - MOVQ R11, 168(AX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch: - MOVQ 16(SP), AX - MOVQ ctx+16(FP), CX - MOVQ AX, 216(CX) - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decodeSync_amd64_error_match_len_too_big: - MOVQ ctx+16(FP), AX - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error -error_match_off_too_big: - MOVQ ctx+16(FP), AX - MOVQ 8(SP), CX - MOVQ CX, 224(AX) - MOVQ R12, 136(AX) - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - - // Return with not enough output space error -error_not_enough_space: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ R12, 136(AX) - MOVQ $0x00000005, ret+24(FP) - RET - -// func sequenceDecs_decodeSync_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int -// Requires: BMI, BMI2, CMOV, SSE -TEXT ·sequenceDecs_decodeSync_bmi2(SB), $64-32 - MOVQ br+8(FP), BX - MOVQ 24(BX), AX - MOVBQZX 32(BX), DX - MOVQ (BX), CX - MOVQ 8(BX), BX - ADDQ BX, CX - MOVQ CX, (SP) - MOVQ ctx+16(FP), CX - MOVQ 72(CX), SI - MOVQ 80(CX), DI - MOVQ 88(CX), R8 - XORQ R9, R9 - MOVQ R9, 8(SP) - MOVQ R9, 16(SP) - MOVQ R9, 24(SP) - MOVQ 112(CX), R9 - MOVQ 128(CX), R10 - MOVQ R10, 32(SP) - MOVQ 144(CX), R10 - MOVQ 136(CX), R11 - MOVQ 200(CX), R12 - MOVQ R12, 56(SP) - MOVQ 176(CX), R12 - MOVQ R12, 48(SP) - MOVQ 184(CX), CX - MOVQ CX, 40(SP) - MOVQ 40(SP), CX - ADDQ CX, 48(SP) - - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) - ADDQ R9, 32(SP) - - // outBase += outPosition - ADDQ R11, R9 - -sequenceDecs_decodeSync_bmi2_main_loop: - MOVQ (SP), R12 - - // Fill bitreader to have enough for the offset and match length. - CMPQ BX, $0x08 - JL sequenceDecs_decodeSync_bmi2_fill_byte_by_byte - MOVQ DX, CX - SHRQ $0x03, CX - SUBQ CX, R12 - MOVQ (R12), AX - SUBQ CX, BX - ANDQ $0x07, DX - JMP sequenceDecs_decodeSync_bmi2_fill_end - -sequenceDecs_decodeSync_bmi2_fill_byte_by_byte: - CMPQ BX, $0x00 - JLE sequenceDecs_decodeSync_bmi2_fill_check_overread - CMPQ DX, $0x07 - JLE sequenceDecs_decodeSync_bmi2_fill_end - SHLQ $0x08, AX - SUBQ $0x01, R12 - SUBQ $0x01, BX - SUBQ $0x08, DX - MOVBQZX (R12), CX - ORQ CX, AX - JMP sequenceDecs_decodeSync_bmi2_fill_byte_by_byte - -sequenceDecs_decodeSync_bmi2_fill_check_overread: - CMPQ DX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_bmi2_fill_end: - // Update offset - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R13 - MOVQ AX, R14 - LEAQ (DX)(R13*1), CX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - MOVQ CX, DX - MOVQ R8, CX - SHRQ $0x20, CX - ADDQ R14, CX - MOVQ CX, 8(SP) - - // Update match length - MOVQ $0x00000808, CX - BEXTRQ CX, DI, R13 - MOVQ AX, R14 - LEAQ (DX)(R13*1), CX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - MOVQ CX, DX - MOVQ DI, CX - SHRQ $0x20, CX - ADDQ R14, CX - MOVQ CX, 16(SP) - - // Fill bitreader to have enough for the remaining - CMPQ BX, $0x08 - JL sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte - MOVQ DX, CX - SHRQ $0x03, CX - SUBQ CX, R12 - MOVQ (R12), AX - SUBQ CX, BX - ANDQ $0x07, DX - JMP sequenceDecs_decodeSync_bmi2_fill_2_end - -sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte: - CMPQ BX, $0x00 - JLE sequenceDecs_decodeSync_bmi2_fill_2_check_overread - CMPQ DX, $0x07 - JLE sequenceDecs_decodeSync_bmi2_fill_2_end - SHLQ $0x08, AX - SUBQ $0x01, R12 - SUBQ $0x01, BX - SUBQ $0x08, DX - MOVBQZX (R12), CX - ORQ CX, AX - JMP sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte - -sequenceDecs_decodeSync_bmi2_fill_2_check_overread: - CMPQ DX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_bmi2_fill_2_end: - // Update literal length - MOVQ $0x00000808, CX - BEXTRQ CX, SI, R13 - MOVQ AX, R14 - LEAQ (DX)(R13*1), CX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - MOVQ CX, DX - MOVQ SI, CX - SHRQ $0x20, CX - ADDQ R14, CX - MOVQ CX, 24(SP) - - // Fill bitreader for state updates - MOVQ R12, (SP) - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R12 - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decodeSync_bmi2_skip_update - LEAQ (SI)(DI*1), R13 - ADDQ R8, R13 - MOVBQZX R13, R13 - LEAQ (DX)(R13*1), CX - MOVQ AX, R14 - MOVQ CX, DX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - - // Update Offset State - BZHIQ R8, R14, CX - SHRXQ R8, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, R8, R8 - ADDQ CX, R8 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Match Length State - BZHIQ DI, R14, CX - SHRXQ DI, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, DI, DI - ADDQ CX, DI - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(DI*8), DI - - // Update Literal Length State - BZHIQ SI, R14, CX - MOVQ $0x00001010, R13 - BEXTRQ R13, SI, SI - ADDQ CX, SI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(SI*8), SI - -sequenceDecs_decodeSync_bmi2_skip_update: - // Adjust offset - MOVQ s+0(FP), CX - MOVQ 8(SP), R13 - CMPQ R12, $0x01 - JBE sequenceDecs_decodeSync_bmi2_adjust_offsetB_1_or_0 - MOVUPS 144(CX), X0 - MOVQ R13, 144(CX) - MOVUPS X0, 152(CX) - JMP sequenceDecs_decodeSync_bmi2_after_adjust - -sequenceDecs_decodeSync_bmi2_adjust_offsetB_1_or_0: - CMPQ 24(SP), $0x00000000 - JNE sequenceDecs_decodeSync_bmi2_adjust_offset_maybezero - INCQ R13 - JMP sequenceDecs_decodeSync_bmi2_adjust_offset_nonzero - -sequenceDecs_decodeSync_bmi2_adjust_offset_maybezero: - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_bmi2_adjust_offset_nonzero - MOVQ 144(CX), R13 - JMP sequenceDecs_decodeSync_bmi2_after_adjust - -sequenceDecs_decodeSync_bmi2_adjust_offset_nonzero: - MOVQ R13, R12 - XORQ R14, R14 - MOVQ $-1, R15 - CMPQ R13, $0x03 - CMOVQEQ R14, R12 - CMOVQEQ R15, R14 - ADDQ 144(CX)(R12*8), R14 - JNZ sequenceDecs_decodeSync_bmi2_adjust_temp_valid - MOVQ $0x00000001, R14 - -sequenceDecs_decodeSync_bmi2_adjust_temp_valid: - CMPQ R13, $0x01 - JZ sequenceDecs_decodeSync_bmi2_adjust_skip - MOVQ 152(CX), R12 - MOVQ R12, 160(CX) - -sequenceDecs_decodeSync_bmi2_adjust_skip: - MOVQ 144(CX), R12 - MOVQ R12, 152(CX) - MOVQ R14, 144(CX) - MOVQ R14, R13 - -sequenceDecs_decodeSync_bmi2_after_adjust: - MOVQ R13, 8(SP) - - // Check values - MOVQ 16(SP), CX - MOVQ 24(SP), R12 - LEAQ (CX)(R12*1), R14 - MOVQ s+0(FP), R15 - ADDQ R14, 256(R15) - MOVQ ctx+16(FP), R14 - SUBQ R12, 104(R14) - JS error_not_enough_literals - CMPQ CX, $0x00020002 - JA sequenceDecs_decodeSync_bmi2_error_match_len_too_big - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_bmi2_match_len_ofs_ok - TESTQ CX, CX - JNZ sequenceDecs_decodeSync_bmi2_error_match_len_ofs_mismatch - -sequenceDecs_decodeSync_bmi2_match_len_ofs_ok: - MOVQ 24(SP), CX - MOVQ 8(SP), R12 - MOVQ 16(SP), R13 - - // Check if we have enough space in s.out - LEAQ (CX)(R13*1), R14 - ADDQ R9, R14 - CMPQ R14, 32(SP) - JA error_not_enough_space - - // Copy literals - TESTQ CX, CX - JZ check_offset - XORQ R14, R14 - -copy_1: - MOVUPS (R10)(R14*1), X0 - MOVUPS X0, (R9)(R14*1) - ADDQ $0x10, R14 - CMPQ R14, CX - JB copy_1 - ADDQ CX, R10 - ADDQ CX, R9 - ADDQ CX, R11 - - // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) -check_offset: - MOVQ R11, CX - ADDQ 40(SP), CX - CMPQ R12, CX - JG error_match_off_too_big - CMPQ R12, 56(SP) - JG error_match_off_too_big - - // Copy match from history - MOVQ R12, CX - SUBQ R11, CX - JLS copy_match - MOVQ 48(SP), R14 - SUBQ CX, R14 - CMPQ R13, CX - JG copy_all_from_history - MOVQ R13, CX - SUBQ $0x10, CX - JB copy_4_small - -copy_4_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R9) - ADDQ $0x10, R14 - ADDQ $0x10, R9 - SUBQ $0x10, CX - JAE copy_4_loop - LEAQ 16(R14)(CX*1), R14 - LEAQ 16(R9)(CX*1), R9 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R9) - JMP copy_4_end - -copy_4_small: - CMPQ R13, $0x03 - JE copy_4_move_3 - CMPQ R13, $0x08 - JB copy_4_move_4through7 - JMP copy_4_move_8through16 - -copy_4_move_3: - MOVW (R14), CX - MOVB 2(R14), R12 - MOVW CX, (R9) - MOVB R12, 2(R9) - ADDQ R13, R14 - ADDQ R13, R9 - JMP copy_4_end - -copy_4_move_4through7: - MOVL (R14), CX - MOVL -4(R14)(R13*1), R12 - MOVL CX, (R9) - MOVL R12, -4(R9)(R13*1) - ADDQ R13, R14 - ADDQ R13, R9 - JMP copy_4_end - -copy_4_move_8through16: - MOVQ (R14), CX - MOVQ -8(R14)(R13*1), R12 - MOVQ CX, (R9) - MOVQ R12, -8(R9)(R13*1) - ADDQ R13, R14 - ADDQ R13, R9 - -copy_4_end: - ADDQ R13, R11 - JMP handle_loop - JMP loop_finished - -copy_all_from_history: - MOVQ CX, R15 - SUBQ $0x10, R15 - JB copy_5_small - -copy_5_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R9) - ADDQ $0x10, R14 - ADDQ $0x10, R9 - SUBQ $0x10, R15 - JAE copy_5_loop - LEAQ 16(R14)(R15*1), R14 - LEAQ 16(R9)(R15*1), R9 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R9) - JMP copy_5_end - -copy_5_small: - CMPQ CX, $0x03 - JE copy_5_move_3 - JB copy_5_move_1or2 - CMPQ CX, $0x08 - JB copy_5_move_4through7 - JMP copy_5_move_8through16 - -copy_5_move_1or2: - MOVB (R14), R15 - MOVB -1(R14)(CX*1), BP - MOVB R15, (R9) - MOVB BP, -1(R9)(CX*1) - ADDQ CX, R14 - ADDQ CX, R9 - JMP copy_5_end - -copy_5_move_3: - MOVW (R14), R15 - MOVB 2(R14), BP - MOVW R15, (R9) - MOVB BP, 2(R9) - ADDQ CX, R14 - ADDQ CX, R9 - JMP copy_5_end - -copy_5_move_4through7: - MOVL (R14), R15 - MOVL -4(R14)(CX*1), BP - MOVL R15, (R9) - MOVL BP, -4(R9)(CX*1) - ADDQ CX, R14 - ADDQ CX, R9 - JMP copy_5_end - -copy_5_move_8through16: - MOVQ (R14), R15 - MOVQ -8(R14)(CX*1), BP - MOVQ R15, (R9) - MOVQ BP, -8(R9)(CX*1) - ADDQ CX, R14 - ADDQ CX, R9 - -copy_5_end: - ADDQ CX, R11 - SUBQ CX, R13 - - // Copy match from the current buffer -copy_match: - MOVQ R9, CX - SUBQ R12, CX - - // ml <= mo - CMPQ R13, R12 - JA copy_overlapping_match - - // Copy non-overlapping match - ADDQ R13, R11 - MOVQ R9, R12 - ADDQ R13, R9 - -copy_2: - MOVUPS (CX), X0 - MOVUPS X0, (R12) - ADDQ $0x10, CX - ADDQ $0x10, R12 - SUBQ $0x10, R13 - JHI copy_2 - JMP handle_loop - - // Copy overlapping match -copy_overlapping_match: - ADDQ R13, R11 - -copy_slow_3: - MOVB (CX), R12 - MOVB R12, (R9) - INCQ CX - INCQ R9 - DECQ R13 - JNZ copy_slow_3 - -handle_loop: - MOVQ ctx+16(FP), CX - DECQ 96(CX) - JNS sequenceDecs_decodeSync_bmi2_main_loop - -loop_finished: - MOVQ br+8(FP), CX - MOVQ AX, 24(CX) - MOVB DL, 32(CX) - MOVQ BX, 8(CX) - - // Update the context - MOVQ ctx+16(FP), AX - MOVQ R11, 136(AX) - MOVQ 144(AX), CX - SUBQ CX, R10 - MOVQ R10, 168(AX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decodeSync_bmi2_error_match_len_ofs_mismatch: - MOVQ 16(SP), AX - MOVQ ctx+16(FP), CX - MOVQ AX, 216(CX) - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decodeSync_bmi2_error_match_len_too_big: - MOVQ ctx+16(FP), AX - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error -error_match_off_too_big: - MOVQ ctx+16(FP), AX - MOVQ 8(SP), CX - MOVQ CX, 224(AX) - MOVQ R11, 136(AX) - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - - // Return with not enough output space error -error_not_enough_space: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ R11, 136(AX) - MOVQ $0x00000005, ret+24(FP) - RET - -// func sequenceDecs_decodeSync_safe_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int -// Requires: CMOV, SSE -TEXT ·sequenceDecs_decodeSync_safe_amd64(SB), $64-32 - MOVQ br+8(FP), CX - MOVQ 24(CX), DX - MOVBQZX 32(CX), BX - MOVQ (CX), AX - MOVQ 8(CX), SI - ADDQ SI, AX - MOVQ AX, (SP) - MOVQ ctx+16(FP), AX - MOVQ 72(AX), DI - MOVQ 80(AX), R8 - MOVQ 88(AX), R9 - XORQ CX, CX - MOVQ CX, 8(SP) - MOVQ CX, 16(SP) - MOVQ CX, 24(SP) - MOVQ 112(AX), R10 - MOVQ 128(AX), CX - MOVQ CX, 32(SP) - MOVQ 144(AX), R11 - MOVQ 136(AX), R12 - MOVQ 200(AX), CX - MOVQ CX, 56(SP) - MOVQ 176(AX), CX - MOVQ CX, 48(SP) - MOVQ 184(AX), AX - MOVQ AX, 40(SP) - MOVQ 40(SP), AX - ADDQ AX, 48(SP) - - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) - ADDQ R10, 32(SP) - - // outBase += outPosition - ADDQ R12, R10 - -sequenceDecs_decodeSync_safe_amd64_main_loop: - MOVQ (SP), R13 - - // Fill bitreader to have enough for the offset and match length. - CMPQ SI, $0x08 - JL sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte - MOVQ BX, AX - SHRQ $0x03, AX - SUBQ AX, R13 - MOVQ (R13), DX - SUBQ AX, SI - ANDQ $0x07, BX - JMP sequenceDecs_decodeSync_safe_amd64_fill_end - -sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte: - CMPQ SI, $0x00 - JLE sequenceDecs_decodeSync_safe_amd64_fill_check_overread - CMPQ BX, $0x07 - JLE sequenceDecs_decodeSync_safe_amd64_fill_end - SHLQ $0x08, DX - SUBQ $0x01, R13 - SUBQ $0x01, SI - SUBQ $0x08, BX - MOVBQZX (R13), AX - ORQ AX, DX - JMP sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte - -sequenceDecs_decodeSync_safe_amd64_fill_check_overread: - CMPQ BX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_safe_amd64_fill_end: - // Update offset - MOVQ R9, AX - MOVQ BX, CX - MOVQ DX, R14 - SHLQ CL, R14 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decodeSync_safe_amd64_of_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decodeSync_safe_amd64_of_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decodeSync_safe_amd64_of_update_zero - NEGQ CX - SHRQ CL, R14 - ADDQ R14, AX - -sequenceDecs_decodeSync_safe_amd64_of_update_zero: - MOVQ AX, 8(SP) - - // Update match length - MOVQ R8, AX - MOVQ BX, CX - MOVQ DX, R14 - SHLQ CL, R14 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decodeSync_safe_amd64_ml_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decodeSync_safe_amd64_ml_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decodeSync_safe_amd64_ml_update_zero - NEGQ CX - SHRQ CL, R14 - ADDQ R14, AX - -sequenceDecs_decodeSync_safe_amd64_ml_update_zero: - MOVQ AX, 16(SP) - - // Fill bitreader to have enough for the remaining - CMPQ SI, $0x08 - JL sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte - MOVQ BX, AX - SHRQ $0x03, AX - SUBQ AX, R13 - MOVQ (R13), DX - SUBQ AX, SI - ANDQ $0x07, BX - JMP sequenceDecs_decodeSync_safe_amd64_fill_2_end - -sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte: - CMPQ SI, $0x00 - JLE sequenceDecs_decodeSync_safe_amd64_fill_2_check_overread - CMPQ BX, $0x07 - JLE sequenceDecs_decodeSync_safe_amd64_fill_2_end - SHLQ $0x08, DX - SUBQ $0x01, R13 - SUBQ $0x01, SI - SUBQ $0x08, BX - MOVBQZX (R13), AX - ORQ AX, DX - JMP sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte - -sequenceDecs_decodeSync_safe_amd64_fill_2_check_overread: - CMPQ BX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_safe_amd64_fill_2_end: - // Update literal length - MOVQ DI, AX - MOVQ BX, CX - MOVQ DX, R14 - SHLQ CL, R14 - MOVB AH, CL - SHRQ $0x20, AX - TESTQ CX, CX - JZ sequenceDecs_decodeSync_safe_amd64_ll_update_zero - ADDQ CX, BX - CMPQ BX, $0x40 - JA sequenceDecs_decodeSync_safe_amd64_ll_update_zero - CMPQ CX, $0x40 - JAE sequenceDecs_decodeSync_safe_amd64_ll_update_zero - NEGQ CX - SHRQ CL, R14 - ADDQ R14, AX - -sequenceDecs_decodeSync_safe_amd64_ll_update_zero: - MOVQ AX, 24(SP) - - // Fill bitreader for state updates - MOVQ R13, (SP) - MOVQ R9, AX - SHRQ $0x08, AX - MOVBQZX AL, AX - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decodeSync_safe_amd64_skip_update - - // Update Literal Length State - MOVBQZX DI, R13 - SHRQ $0x10, DI - MOVWQZX DI, DI - LEAQ (BX)(R13*1), CX - MOVQ DX, R14 - MOVQ CX, BX - ROLQ CL, R14 - MOVL $0x00000001, R15 - MOVB R13, CL - SHLL CL, R15 - DECL R15 - ANDQ R15, R14 - ADDQ R14, DI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(DI*8), DI - - // Update Match Length State - MOVBQZX R8, R13 - SHRQ $0x10, R8 - MOVWQZX R8, R8 - LEAQ (BX)(R13*1), CX - MOVQ DX, R14 - MOVQ CX, BX - ROLQ CL, R14 - MOVL $0x00000001, R15 - MOVB R13, CL - SHLL CL, R15 - DECL R15 - ANDQ R15, R14 - ADDQ R14, R8 - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Offset State - MOVBQZX R9, R13 - SHRQ $0x10, R9 - MOVWQZX R9, R9 - LEAQ (BX)(R13*1), CX - MOVQ DX, R14 - MOVQ CX, BX - ROLQ CL, R14 - MOVL $0x00000001, R15 - MOVB R13, CL - SHLL CL, R15 - DECL R15 - ANDQ R15, R14 - ADDQ R14, R9 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R9*8), R9 - -sequenceDecs_decodeSync_safe_amd64_skip_update: - // Adjust offset - MOVQ s+0(FP), CX - MOVQ 8(SP), R13 - CMPQ AX, $0x01 - JBE sequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0 - MOVUPS 144(CX), X0 - MOVQ R13, 144(CX) - MOVUPS X0, 152(CX) - JMP sequenceDecs_decodeSync_safe_amd64_after_adjust - -sequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0: - CMPQ 24(SP), $0x00000000 - JNE sequenceDecs_decodeSync_safe_amd64_adjust_offset_maybezero - INCQ R13 - JMP sequenceDecs_decodeSync_safe_amd64_adjust_offset_nonzero - -sequenceDecs_decodeSync_safe_amd64_adjust_offset_maybezero: - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_safe_amd64_adjust_offset_nonzero - MOVQ 144(CX), R13 - JMP sequenceDecs_decodeSync_safe_amd64_after_adjust - -sequenceDecs_decodeSync_safe_amd64_adjust_offset_nonzero: - MOVQ R13, AX - XORQ R14, R14 - MOVQ $-1, R15 - CMPQ R13, $0x03 - CMOVQEQ R14, AX - CMOVQEQ R15, R14 - ADDQ 144(CX)(AX*8), R14 - JNZ sequenceDecs_decodeSync_safe_amd64_adjust_temp_valid - MOVQ $0x00000001, R14 - -sequenceDecs_decodeSync_safe_amd64_adjust_temp_valid: - CMPQ R13, $0x01 - JZ sequenceDecs_decodeSync_safe_amd64_adjust_skip - MOVQ 152(CX), AX - MOVQ AX, 160(CX) - -sequenceDecs_decodeSync_safe_amd64_adjust_skip: - MOVQ 144(CX), AX - MOVQ AX, 152(CX) - MOVQ R14, 144(CX) - MOVQ R14, R13 - -sequenceDecs_decodeSync_safe_amd64_after_adjust: - MOVQ R13, 8(SP) - - // Check values - MOVQ 16(SP), AX - MOVQ 24(SP), CX - LEAQ (AX)(CX*1), R14 - MOVQ s+0(FP), R15 - ADDQ R14, 256(R15) - MOVQ ctx+16(FP), R14 - SUBQ CX, 104(R14) - JS error_not_enough_literals - CMPQ AX, $0x00020002 - JA sequenceDecs_decodeSync_safe_amd64_error_match_len_too_big - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_safe_amd64_match_len_ofs_ok - TESTQ AX, AX - JNZ sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch - -sequenceDecs_decodeSync_safe_amd64_match_len_ofs_ok: - MOVQ 24(SP), AX - MOVQ 8(SP), CX - MOVQ 16(SP), R13 - - // Check if we have enough space in s.out - LEAQ (AX)(R13*1), R14 - ADDQ R10, R14 - CMPQ R14, 32(SP) - JA error_not_enough_space - - // Copy literals - TESTQ AX, AX - JZ check_offset - MOVQ AX, R14 - SUBQ $0x10, R14 - JB copy_1_small - -copy_1_loop: - MOVUPS (R11), X0 - MOVUPS X0, (R10) - ADDQ $0x10, R11 - ADDQ $0x10, R10 - SUBQ $0x10, R14 - JAE copy_1_loop - LEAQ 16(R11)(R14*1), R11 - LEAQ 16(R10)(R14*1), R10 - MOVUPS -16(R11), X0 - MOVUPS X0, -16(R10) - JMP copy_1_end - -copy_1_small: - CMPQ AX, $0x03 - JE copy_1_move_3 - JB copy_1_move_1or2 - CMPQ AX, $0x08 - JB copy_1_move_4through7 - JMP copy_1_move_8through16 - -copy_1_move_1or2: - MOVB (R11), R14 - MOVB -1(R11)(AX*1), R15 - MOVB R14, (R10) - MOVB R15, -1(R10)(AX*1) - ADDQ AX, R11 - ADDQ AX, R10 - JMP copy_1_end - -copy_1_move_3: - MOVW (R11), R14 - MOVB 2(R11), R15 - MOVW R14, (R10) - MOVB R15, 2(R10) - ADDQ AX, R11 - ADDQ AX, R10 - JMP copy_1_end - -copy_1_move_4through7: - MOVL (R11), R14 - MOVL -4(R11)(AX*1), R15 - MOVL R14, (R10) - MOVL R15, -4(R10)(AX*1) - ADDQ AX, R11 - ADDQ AX, R10 - JMP copy_1_end - -copy_1_move_8through16: - MOVQ (R11), R14 - MOVQ -8(R11)(AX*1), R15 - MOVQ R14, (R10) - MOVQ R15, -8(R10)(AX*1) - ADDQ AX, R11 - ADDQ AX, R10 - -copy_1_end: - ADDQ AX, R12 - - // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) -check_offset: - MOVQ R12, AX - ADDQ 40(SP), AX - CMPQ CX, AX - JG error_match_off_too_big - CMPQ CX, 56(SP) - JG error_match_off_too_big - - // Copy match from history - MOVQ CX, AX - SUBQ R12, AX - JLS copy_match - MOVQ 48(SP), R14 - SUBQ AX, R14 - CMPQ R13, AX - JG copy_all_from_history - MOVQ R13, AX - SUBQ $0x10, AX - JB copy_4_small - -copy_4_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R10) - ADDQ $0x10, R14 - ADDQ $0x10, R10 - SUBQ $0x10, AX - JAE copy_4_loop - LEAQ 16(R14)(AX*1), R14 - LEAQ 16(R10)(AX*1), R10 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R10) - JMP copy_4_end - -copy_4_small: - CMPQ R13, $0x03 - JE copy_4_move_3 - CMPQ R13, $0x08 - JB copy_4_move_4through7 - JMP copy_4_move_8through16 - -copy_4_move_3: - MOVW (R14), AX - MOVB 2(R14), CL - MOVW AX, (R10) - MOVB CL, 2(R10) - ADDQ R13, R14 - ADDQ R13, R10 - JMP copy_4_end - -copy_4_move_4through7: - MOVL (R14), AX - MOVL -4(R14)(R13*1), CX - MOVL AX, (R10) - MOVL CX, -4(R10)(R13*1) - ADDQ R13, R14 - ADDQ R13, R10 - JMP copy_4_end - -copy_4_move_8through16: - MOVQ (R14), AX - MOVQ -8(R14)(R13*1), CX - MOVQ AX, (R10) - MOVQ CX, -8(R10)(R13*1) - ADDQ R13, R14 - ADDQ R13, R10 - -copy_4_end: - ADDQ R13, R12 - JMP handle_loop - JMP loop_finished - -copy_all_from_history: - MOVQ AX, R15 - SUBQ $0x10, R15 - JB copy_5_small - -copy_5_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R10) - ADDQ $0x10, R14 - ADDQ $0x10, R10 - SUBQ $0x10, R15 - JAE copy_5_loop - LEAQ 16(R14)(R15*1), R14 - LEAQ 16(R10)(R15*1), R10 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R10) - JMP copy_5_end - -copy_5_small: - CMPQ AX, $0x03 - JE copy_5_move_3 - JB copy_5_move_1or2 - CMPQ AX, $0x08 - JB copy_5_move_4through7 - JMP copy_5_move_8through16 - -copy_5_move_1or2: - MOVB (R14), R15 - MOVB -1(R14)(AX*1), BP - MOVB R15, (R10) - MOVB BP, -1(R10)(AX*1) - ADDQ AX, R14 - ADDQ AX, R10 - JMP copy_5_end - -copy_5_move_3: - MOVW (R14), R15 - MOVB 2(R14), BP - MOVW R15, (R10) - MOVB BP, 2(R10) - ADDQ AX, R14 - ADDQ AX, R10 - JMP copy_5_end - -copy_5_move_4through7: - MOVL (R14), R15 - MOVL -4(R14)(AX*1), BP - MOVL R15, (R10) - MOVL BP, -4(R10)(AX*1) - ADDQ AX, R14 - ADDQ AX, R10 - JMP copy_5_end - -copy_5_move_8through16: - MOVQ (R14), R15 - MOVQ -8(R14)(AX*1), BP - MOVQ R15, (R10) - MOVQ BP, -8(R10)(AX*1) - ADDQ AX, R14 - ADDQ AX, R10 - -copy_5_end: - ADDQ AX, R12 - SUBQ AX, R13 - - // Copy match from the current buffer -copy_match: - MOVQ R10, AX - SUBQ CX, AX - - // ml <= mo - CMPQ R13, CX - JA copy_overlapping_match - - // Copy non-overlapping match - ADDQ R13, R12 - MOVQ R13, CX - SUBQ $0x10, CX - JB copy_2_small - -copy_2_loop: - MOVUPS (AX), X0 - MOVUPS X0, (R10) - ADDQ $0x10, AX - ADDQ $0x10, R10 - SUBQ $0x10, CX - JAE copy_2_loop - LEAQ 16(AX)(CX*1), AX - LEAQ 16(R10)(CX*1), R10 - MOVUPS -16(AX), X0 - MOVUPS X0, -16(R10) - JMP copy_2_end - -copy_2_small: - CMPQ R13, $0x03 - JE copy_2_move_3 - JB copy_2_move_1or2 - CMPQ R13, $0x08 - JB copy_2_move_4through7 - JMP copy_2_move_8through16 - -copy_2_move_1or2: - MOVB (AX), CL - MOVB -1(AX)(R13*1), R14 - MOVB CL, (R10) - MOVB R14, -1(R10)(R13*1) - ADDQ R13, AX - ADDQ R13, R10 - JMP copy_2_end - -copy_2_move_3: - MOVW (AX), CX - MOVB 2(AX), R14 - MOVW CX, (R10) - MOVB R14, 2(R10) - ADDQ R13, AX - ADDQ R13, R10 - JMP copy_2_end - -copy_2_move_4through7: - MOVL (AX), CX - MOVL -4(AX)(R13*1), R14 - MOVL CX, (R10) - MOVL R14, -4(R10)(R13*1) - ADDQ R13, AX - ADDQ R13, R10 - JMP copy_2_end - -copy_2_move_8through16: - MOVQ (AX), CX - MOVQ -8(AX)(R13*1), R14 - MOVQ CX, (R10) - MOVQ R14, -8(R10)(R13*1) - ADDQ R13, AX - ADDQ R13, R10 - -copy_2_end: - JMP handle_loop - - // Copy overlapping match -copy_overlapping_match: - ADDQ R13, R12 - -copy_slow_3: - MOVB (AX), CL - MOVB CL, (R10) - INCQ AX - INCQ R10 - DECQ R13 - JNZ copy_slow_3 - -handle_loop: - MOVQ ctx+16(FP), AX - DECQ 96(AX) - JNS sequenceDecs_decodeSync_safe_amd64_main_loop - -loop_finished: - MOVQ br+8(FP), AX - MOVQ DX, 24(AX) - MOVB BL, 32(AX) - MOVQ SI, 8(AX) - - // Update the context - MOVQ ctx+16(FP), AX - MOVQ R12, 136(AX) - MOVQ 144(AX), CX - SUBQ CX, R11 - MOVQ R11, 168(AX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch: - MOVQ 16(SP), AX - MOVQ ctx+16(FP), CX - MOVQ AX, 216(CX) - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decodeSync_safe_amd64_error_match_len_too_big: - MOVQ ctx+16(FP), AX - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error -error_match_off_too_big: - MOVQ ctx+16(FP), AX - MOVQ 8(SP), CX - MOVQ CX, 224(AX) - MOVQ R12, 136(AX) - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - - // Return with not enough output space error -error_not_enough_space: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ R12, 136(AX) - MOVQ $0x00000005, ret+24(FP) - RET - -// func sequenceDecs_decodeSync_safe_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int -// Requires: BMI, BMI2, CMOV, SSE -TEXT ·sequenceDecs_decodeSync_safe_bmi2(SB), $64-32 - MOVQ br+8(FP), BX - MOVQ 24(BX), AX - MOVBQZX 32(BX), DX - MOVQ (BX), CX - MOVQ 8(BX), BX - ADDQ BX, CX - MOVQ CX, (SP) - MOVQ ctx+16(FP), CX - MOVQ 72(CX), SI - MOVQ 80(CX), DI - MOVQ 88(CX), R8 - XORQ R9, R9 - MOVQ R9, 8(SP) - MOVQ R9, 16(SP) - MOVQ R9, 24(SP) - MOVQ 112(CX), R9 - MOVQ 128(CX), R10 - MOVQ R10, 32(SP) - MOVQ 144(CX), R10 - MOVQ 136(CX), R11 - MOVQ 200(CX), R12 - MOVQ R12, 56(SP) - MOVQ 176(CX), R12 - MOVQ R12, 48(SP) - MOVQ 184(CX), CX - MOVQ CX, 40(SP) - MOVQ 40(SP), CX - ADDQ CX, 48(SP) - - // Calculate poiter to s.out[cap(s.out)] (a past-end pointer) - ADDQ R9, 32(SP) - - // outBase += outPosition - ADDQ R11, R9 - -sequenceDecs_decodeSync_safe_bmi2_main_loop: - MOVQ (SP), R12 - - // Fill bitreader to have enough for the offset and match length. - CMPQ BX, $0x08 - JL sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte - MOVQ DX, CX - SHRQ $0x03, CX - SUBQ CX, R12 - MOVQ (R12), AX - SUBQ CX, BX - ANDQ $0x07, DX - JMP sequenceDecs_decodeSync_safe_bmi2_fill_end - -sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte: - CMPQ BX, $0x00 - JLE sequenceDecs_decodeSync_safe_bmi2_fill_check_overread - CMPQ DX, $0x07 - JLE sequenceDecs_decodeSync_safe_bmi2_fill_end - SHLQ $0x08, AX - SUBQ $0x01, R12 - SUBQ $0x01, BX - SUBQ $0x08, DX - MOVBQZX (R12), CX - ORQ CX, AX - JMP sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte - -sequenceDecs_decodeSync_safe_bmi2_fill_check_overread: - CMPQ DX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_safe_bmi2_fill_end: - // Update offset - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R13 - MOVQ AX, R14 - LEAQ (DX)(R13*1), CX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - MOVQ CX, DX - MOVQ R8, CX - SHRQ $0x20, CX - ADDQ R14, CX - MOVQ CX, 8(SP) - - // Update match length - MOVQ $0x00000808, CX - BEXTRQ CX, DI, R13 - MOVQ AX, R14 - LEAQ (DX)(R13*1), CX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - MOVQ CX, DX - MOVQ DI, CX - SHRQ $0x20, CX - ADDQ R14, CX - MOVQ CX, 16(SP) - - // Fill bitreader to have enough for the remaining - CMPQ BX, $0x08 - JL sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte - MOVQ DX, CX - SHRQ $0x03, CX - SUBQ CX, R12 - MOVQ (R12), AX - SUBQ CX, BX - ANDQ $0x07, DX - JMP sequenceDecs_decodeSync_safe_bmi2_fill_2_end - -sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte: - CMPQ BX, $0x00 - JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread - CMPQ DX, $0x07 - JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_end - SHLQ $0x08, AX - SUBQ $0x01, R12 - SUBQ $0x01, BX - SUBQ $0x08, DX - MOVBQZX (R12), CX - ORQ CX, AX - JMP sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte - -sequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread: - CMPQ DX, $0x40 - JA error_overread - -sequenceDecs_decodeSync_safe_bmi2_fill_2_end: - // Update literal length - MOVQ $0x00000808, CX - BEXTRQ CX, SI, R13 - MOVQ AX, R14 - LEAQ (DX)(R13*1), CX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - MOVQ CX, DX - MOVQ SI, CX - SHRQ $0x20, CX - ADDQ R14, CX - MOVQ CX, 24(SP) - - // Fill bitreader for state updates - MOVQ R12, (SP) - MOVQ $0x00000808, CX - BEXTRQ CX, R8, R12 - MOVQ ctx+16(FP), CX - CMPQ 96(CX), $0x00 - JZ sequenceDecs_decodeSync_safe_bmi2_skip_update - LEAQ (SI)(DI*1), R13 - ADDQ R8, R13 - MOVBQZX R13, R13 - LEAQ (DX)(R13*1), CX - MOVQ AX, R14 - MOVQ CX, DX - ROLQ CL, R14 - BZHIQ R13, R14, R14 - - // Update Offset State - BZHIQ R8, R14, CX - SHRXQ R8, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, R8, R8 - ADDQ CX, R8 - - // Load ctx.ofTable - MOVQ ctx+16(FP), CX - MOVQ 48(CX), CX - MOVQ (CX)(R8*8), R8 - - // Update Match Length State - BZHIQ DI, R14, CX - SHRXQ DI, R14, R14 - MOVQ $0x00001010, R13 - BEXTRQ R13, DI, DI - ADDQ CX, DI - - // Load ctx.mlTable - MOVQ ctx+16(FP), CX - MOVQ 24(CX), CX - MOVQ (CX)(DI*8), DI - - // Update Literal Length State - BZHIQ SI, R14, CX - MOVQ $0x00001010, R13 - BEXTRQ R13, SI, SI - ADDQ CX, SI - - // Load ctx.llTable - MOVQ ctx+16(FP), CX - MOVQ (CX), CX - MOVQ (CX)(SI*8), SI - -sequenceDecs_decodeSync_safe_bmi2_skip_update: - // Adjust offset - MOVQ s+0(FP), CX - MOVQ 8(SP), R13 - CMPQ R12, $0x01 - JBE sequenceDecs_decodeSync_safe_bmi2_adjust_offsetB_1_or_0 - MOVUPS 144(CX), X0 - MOVQ R13, 144(CX) - MOVUPS X0, 152(CX) - JMP sequenceDecs_decodeSync_safe_bmi2_after_adjust - -sequenceDecs_decodeSync_safe_bmi2_adjust_offsetB_1_or_0: - CMPQ 24(SP), $0x00000000 - JNE sequenceDecs_decodeSync_safe_bmi2_adjust_offset_maybezero - INCQ R13 - JMP sequenceDecs_decodeSync_safe_bmi2_adjust_offset_nonzero - -sequenceDecs_decodeSync_safe_bmi2_adjust_offset_maybezero: - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_safe_bmi2_adjust_offset_nonzero - MOVQ 144(CX), R13 - JMP sequenceDecs_decodeSync_safe_bmi2_after_adjust - -sequenceDecs_decodeSync_safe_bmi2_adjust_offset_nonzero: - MOVQ R13, R12 - XORQ R14, R14 - MOVQ $-1, R15 - CMPQ R13, $0x03 - CMOVQEQ R14, R12 - CMOVQEQ R15, R14 - ADDQ 144(CX)(R12*8), R14 - JNZ sequenceDecs_decodeSync_safe_bmi2_adjust_temp_valid - MOVQ $0x00000001, R14 - -sequenceDecs_decodeSync_safe_bmi2_adjust_temp_valid: - CMPQ R13, $0x01 - JZ sequenceDecs_decodeSync_safe_bmi2_adjust_skip - MOVQ 152(CX), R12 - MOVQ R12, 160(CX) - -sequenceDecs_decodeSync_safe_bmi2_adjust_skip: - MOVQ 144(CX), R12 - MOVQ R12, 152(CX) - MOVQ R14, 144(CX) - MOVQ R14, R13 - -sequenceDecs_decodeSync_safe_bmi2_after_adjust: - MOVQ R13, 8(SP) - - // Check values - MOVQ 16(SP), CX - MOVQ 24(SP), R12 - LEAQ (CX)(R12*1), R14 - MOVQ s+0(FP), R15 - ADDQ R14, 256(R15) - MOVQ ctx+16(FP), R14 - SUBQ R12, 104(R14) - JS error_not_enough_literals - CMPQ CX, $0x00020002 - JA sequenceDecs_decodeSync_safe_bmi2_error_match_len_too_big - TESTQ R13, R13 - JNZ sequenceDecs_decodeSync_safe_bmi2_match_len_ofs_ok - TESTQ CX, CX - JNZ sequenceDecs_decodeSync_safe_bmi2_error_match_len_ofs_mismatch - -sequenceDecs_decodeSync_safe_bmi2_match_len_ofs_ok: - MOVQ 24(SP), CX - MOVQ 8(SP), R12 - MOVQ 16(SP), R13 - - // Check if we have enough space in s.out - LEAQ (CX)(R13*1), R14 - ADDQ R9, R14 - CMPQ R14, 32(SP) - JA error_not_enough_space - - // Copy literals - TESTQ CX, CX - JZ check_offset - MOVQ CX, R14 - SUBQ $0x10, R14 - JB copy_1_small - -copy_1_loop: - MOVUPS (R10), X0 - MOVUPS X0, (R9) - ADDQ $0x10, R10 - ADDQ $0x10, R9 - SUBQ $0x10, R14 - JAE copy_1_loop - LEAQ 16(R10)(R14*1), R10 - LEAQ 16(R9)(R14*1), R9 - MOVUPS -16(R10), X0 - MOVUPS X0, -16(R9) - JMP copy_1_end - -copy_1_small: - CMPQ CX, $0x03 - JE copy_1_move_3 - JB copy_1_move_1or2 - CMPQ CX, $0x08 - JB copy_1_move_4through7 - JMP copy_1_move_8through16 - -copy_1_move_1or2: - MOVB (R10), R14 - MOVB -1(R10)(CX*1), R15 - MOVB R14, (R9) - MOVB R15, -1(R9)(CX*1) - ADDQ CX, R10 - ADDQ CX, R9 - JMP copy_1_end - -copy_1_move_3: - MOVW (R10), R14 - MOVB 2(R10), R15 - MOVW R14, (R9) - MOVB R15, 2(R9) - ADDQ CX, R10 - ADDQ CX, R9 - JMP copy_1_end - -copy_1_move_4through7: - MOVL (R10), R14 - MOVL -4(R10)(CX*1), R15 - MOVL R14, (R9) - MOVL R15, -4(R9)(CX*1) - ADDQ CX, R10 - ADDQ CX, R9 - JMP copy_1_end - -copy_1_move_8through16: - MOVQ (R10), R14 - MOVQ -8(R10)(CX*1), R15 - MOVQ R14, (R9) - MOVQ R15, -8(R9)(CX*1) - ADDQ CX, R10 - ADDQ CX, R9 - -copy_1_end: - ADDQ CX, R11 - - // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) -check_offset: - MOVQ R11, CX - ADDQ 40(SP), CX - CMPQ R12, CX - JG error_match_off_too_big - CMPQ R12, 56(SP) - JG error_match_off_too_big - - // Copy match from history - MOVQ R12, CX - SUBQ R11, CX - JLS copy_match - MOVQ 48(SP), R14 - SUBQ CX, R14 - CMPQ R13, CX - JG copy_all_from_history - MOVQ R13, CX - SUBQ $0x10, CX - JB copy_4_small - -copy_4_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R9) - ADDQ $0x10, R14 - ADDQ $0x10, R9 - SUBQ $0x10, CX - JAE copy_4_loop - LEAQ 16(R14)(CX*1), R14 - LEAQ 16(R9)(CX*1), R9 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R9) - JMP copy_4_end - -copy_4_small: - CMPQ R13, $0x03 - JE copy_4_move_3 - CMPQ R13, $0x08 - JB copy_4_move_4through7 - JMP copy_4_move_8through16 - -copy_4_move_3: - MOVW (R14), CX - MOVB 2(R14), R12 - MOVW CX, (R9) - MOVB R12, 2(R9) - ADDQ R13, R14 - ADDQ R13, R9 - JMP copy_4_end - -copy_4_move_4through7: - MOVL (R14), CX - MOVL -4(R14)(R13*1), R12 - MOVL CX, (R9) - MOVL R12, -4(R9)(R13*1) - ADDQ R13, R14 - ADDQ R13, R9 - JMP copy_4_end - -copy_4_move_8through16: - MOVQ (R14), CX - MOVQ -8(R14)(R13*1), R12 - MOVQ CX, (R9) - MOVQ R12, -8(R9)(R13*1) - ADDQ R13, R14 - ADDQ R13, R9 - -copy_4_end: - ADDQ R13, R11 - JMP handle_loop - JMP loop_finished - -copy_all_from_history: - MOVQ CX, R15 - SUBQ $0x10, R15 - JB copy_5_small - -copy_5_loop: - MOVUPS (R14), X0 - MOVUPS X0, (R9) - ADDQ $0x10, R14 - ADDQ $0x10, R9 - SUBQ $0x10, R15 - JAE copy_5_loop - LEAQ 16(R14)(R15*1), R14 - LEAQ 16(R9)(R15*1), R9 - MOVUPS -16(R14), X0 - MOVUPS X0, -16(R9) - JMP copy_5_end - -copy_5_small: - CMPQ CX, $0x03 - JE copy_5_move_3 - JB copy_5_move_1or2 - CMPQ CX, $0x08 - JB copy_5_move_4through7 - JMP copy_5_move_8through16 - -copy_5_move_1or2: - MOVB (R14), R15 - MOVB -1(R14)(CX*1), BP - MOVB R15, (R9) - MOVB BP, -1(R9)(CX*1) - ADDQ CX, R14 - ADDQ CX, R9 - JMP copy_5_end - -copy_5_move_3: - MOVW (R14), R15 - MOVB 2(R14), BP - MOVW R15, (R9) - MOVB BP, 2(R9) - ADDQ CX, R14 - ADDQ CX, R9 - JMP copy_5_end - -copy_5_move_4through7: - MOVL (R14), R15 - MOVL -4(R14)(CX*1), BP - MOVL R15, (R9) - MOVL BP, -4(R9)(CX*1) - ADDQ CX, R14 - ADDQ CX, R9 - JMP copy_5_end - -copy_5_move_8through16: - MOVQ (R14), R15 - MOVQ -8(R14)(CX*1), BP - MOVQ R15, (R9) - MOVQ BP, -8(R9)(CX*1) - ADDQ CX, R14 - ADDQ CX, R9 - -copy_5_end: - ADDQ CX, R11 - SUBQ CX, R13 - - // Copy match from the current buffer -copy_match: - MOVQ R9, CX - SUBQ R12, CX - - // ml <= mo - CMPQ R13, R12 - JA copy_overlapping_match - - // Copy non-overlapping match - ADDQ R13, R11 - MOVQ R13, R12 - SUBQ $0x10, R12 - JB copy_2_small - -copy_2_loop: - MOVUPS (CX), X0 - MOVUPS X0, (R9) - ADDQ $0x10, CX - ADDQ $0x10, R9 - SUBQ $0x10, R12 - JAE copy_2_loop - LEAQ 16(CX)(R12*1), CX - LEAQ 16(R9)(R12*1), R9 - MOVUPS -16(CX), X0 - MOVUPS X0, -16(R9) - JMP copy_2_end - -copy_2_small: - CMPQ R13, $0x03 - JE copy_2_move_3 - JB copy_2_move_1or2 - CMPQ R13, $0x08 - JB copy_2_move_4through7 - JMP copy_2_move_8through16 - -copy_2_move_1or2: - MOVB (CX), R12 - MOVB -1(CX)(R13*1), R14 - MOVB R12, (R9) - MOVB R14, -1(R9)(R13*1) - ADDQ R13, CX - ADDQ R13, R9 - JMP copy_2_end - -copy_2_move_3: - MOVW (CX), R12 - MOVB 2(CX), R14 - MOVW R12, (R9) - MOVB R14, 2(R9) - ADDQ R13, CX - ADDQ R13, R9 - JMP copy_2_end - -copy_2_move_4through7: - MOVL (CX), R12 - MOVL -4(CX)(R13*1), R14 - MOVL R12, (R9) - MOVL R14, -4(R9)(R13*1) - ADDQ R13, CX - ADDQ R13, R9 - JMP copy_2_end - -copy_2_move_8through16: - MOVQ (CX), R12 - MOVQ -8(CX)(R13*1), R14 - MOVQ R12, (R9) - MOVQ R14, -8(R9)(R13*1) - ADDQ R13, CX - ADDQ R13, R9 - -copy_2_end: - JMP handle_loop - - // Copy overlapping match -copy_overlapping_match: - ADDQ R13, R11 - -copy_slow_3: - MOVB (CX), R12 - MOVB R12, (R9) - INCQ CX - INCQ R9 - DECQ R13 - JNZ copy_slow_3 - -handle_loop: - MOVQ ctx+16(FP), CX - DECQ 96(CX) - JNS sequenceDecs_decodeSync_safe_bmi2_main_loop - -loop_finished: - MOVQ br+8(FP), CX - MOVQ AX, 24(CX) - MOVB DL, 32(CX) - MOVQ BX, 8(CX) - - // Update the context - MOVQ ctx+16(FP), AX - MOVQ R11, 136(AX) - MOVQ 144(AX), CX - SUBQ CX, R10 - MOVQ R10, 168(AX) - - // Return success - MOVQ $0x00000000, ret+24(FP) - RET - - // Return with match length error -sequenceDecs_decodeSync_safe_bmi2_error_match_len_ofs_mismatch: - MOVQ 16(SP), AX - MOVQ ctx+16(FP), CX - MOVQ AX, 216(CX) - MOVQ $0x00000001, ret+24(FP) - RET - - // Return with match too long error -sequenceDecs_decodeSync_safe_bmi2_error_match_len_too_big: - MOVQ ctx+16(FP), AX - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ $0x00000002, ret+24(FP) - RET - - // Return with match offset too long error -error_match_off_too_big: - MOVQ ctx+16(FP), AX - MOVQ 8(SP), CX - MOVQ CX, 224(AX) - MOVQ R11, 136(AX) - MOVQ $0x00000003, ret+24(FP) - RET - - // Return with not enough literals error -error_not_enough_literals: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ $0x00000004, ret+24(FP) - RET - - // Return with overread error -error_overread: - MOVQ $0x00000006, ret+24(FP) - RET - - // Return with not enough output space error -error_not_enough_space: - MOVQ ctx+16(FP), AX - MOVQ 24(SP), CX - MOVQ CX, 208(AX) - MOVQ 16(SP), CX - MOVQ CX, 216(AX) - MOVQ R11, 136(AX) - MOVQ $0x00000005, ret+24(FP) - RET diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_generic.go b/vendor/github.com/klauspost/compress/zstd/seqdec_generic.go deleted file mode 100644 index 2fb35b78..00000000 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_generic.go +++ /dev/null @@ -1,237 +0,0 @@ -//go:build !amd64 || appengine || !gc || noasm -// +build !amd64 appengine !gc noasm - -package zstd - -import ( - "fmt" - "io" -) - -// decode sequences from the stream with the provided history but without dictionary. -func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) { - return false, nil -} - -// decode sequences from the stream without the provided history. -func (s *sequenceDecs) decode(seqs []seqVals) error { - br := s.br - - // Grab full sizes tables, to avoid bounds checks. - llTable, mlTable, ofTable := s.litLengths.fse.dt[:maxTablesize], s.matchLengths.fse.dt[:maxTablesize], s.offsets.fse.dt[:maxTablesize] - llState, mlState, ofState := s.litLengths.state.state, s.matchLengths.state.state, s.offsets.state.state - s.seqSize = 0 - litRemain := len(s.literals) - - maxBlockSize := maxCompressedBlockSize - if s.windowSize < maxBlockSize { - maxBlockSize = s.windowSize - } - for i := range seqs { - var ll, mo, ml int - if len(br.in) > 4+((maxOffsetBits+16+16)>>3) { - // inlined function: - // ll, mo, ml = s.nextFast(br, llState, mlState, ofState) - - // Final will not read from stream. - var llB, mlB, moB uint8 - ll, llB = llState.final() - ml, mlB = mlState.final() - mo, moB = ofState.final() - - // extra bits are stored in reverse order. - br.fillFast() - mo += br.getBits(moB) - if s.maxBits > 32 { - br.fillFast() - } - ml += br.getBits(mlB) - ll += br.getBits(llB) - - if moB > 1 { - s.prevOffset[2] = s.prevOffset[1] - s.prevOffset[1] = s.prevOffset[0] - s.prevOffset[0] = mo - } else { - // mo = s.adjustOffset(mo, ll, moB) - // Inlined for rather big speedup - if ll == 0 { - // There is an exception though, when current sequence's literals_length = 0. - // In this case, repeated offsets are shifted by one, so an offset_value of 1 means Repeated_Offset2, - // an offset_value of 2 means Repeated_Offset3, and an offset_value of 3 means Repeated_Offset1 - 1_byte. - mo++ - } - - if mo == 0 { - mo = s.prevOffset[0] - } else { - var temp int - if mo == 3 { - temp = s.prevOffset[0] - 1 - } else { - temp = s.prevOffset[mo] - } - - if temp == 0 { - // 0 is not valid; input is corrupted; force offset to 1 - println("WARNING: temp was 0") - temp = 1 - } - - if mo != 1 { - s.prevOffset[2] = s.prevOffset[1] - } - s.prevOffset[1] = s.prevOffset[0] - s.prevOffset[0] = temp - mo = temp - } - } - br.fillFast() - } else { - if br.overread() { - if debugDecoder { - printf("reading sequence %d, exceeded available data\n", i) - } - return io.ErrUnexpectedEOF - } - ll, mo, ml = s.next(br, llState, mlState, ofState) - br.fill() - } - - if debugSequences { - println("Seq", i, "Litlen:", ll, "mo:", mo, "(abs) ml:", ml) - } - // Evaluate. - // We might be doing this async, so do it early. - if mo == 0 && ml > 0 { - return fmt.Errorf("zero matchoff and matchlen (%d) > 0", ml) - } - if ml > maxMatchLen { - return fmt.Errorf("match len (%d) bigger than max allowed length", ml) - } - s.seqSize += ll + ml - if s.seqSize > maxBlockSize { - return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) - } - litRemain -= ll - if litRemain < 0 { - return fmt.Errorf("unexpected literal count, want %d bytes, but only %d is available", ll, litRemain+ll) - } - seqs[i] = seqVals{ - ll: ll, - ml: ml, - mo: mo, - } - if i == len(seqs)-1 { - // This is the last sequence, so we shouldn't update state. - break - } - - // Manually inlined, ~ 5-20% faster - // Update all 3 states at once. Approx 20% faster. - nBits := llState.nbBits() + mlState.nbBits() + ofState.nbBits() - if nBits == 0 { - llState = llTable[llState.newState()&maxTableMask] - mlState = mlTable[mlState.newState()&maxTableMask] - ofState = ofTable[ofState.newState()&maxTableMask] - } else { - bits := br.get32BitsFast(nBits) - lowBits := uint16(bits >> ((ofState.nbBits() + mlState.nbBits()) & 31)) - llState = llTable[(llState.newState()+lowBits)&maxTableMask] - - lowBits = uint16(bits >> (ofState.nbBits() & 31)) - lowBits &= bitMask[mlState.nbBits()&15] - mlState = mlTable[(mlState.newState()+lowBits)&maxTableMask] - - lowBits = uint16(bits) & bitMask[ofState.nbBits()&15] - ofState = ofTable[(ofState.newState()+lowBits)&maxTableMask] - } - } - s.seqSize += litRemain - if s.seqSize > maxBlockSize { - return fmt.Errorf("output bigger than max block size (%d)", maxBlockSize) - } - err := br.close() - if err != nil { - printf("Closing sequences: %v, %+v\n", err, *br) - } - return err -} - -// executeSimple handles cases when a dictionary is not used. -func (s *sequenceDecs) executeSimple(seqs []seqVals, hist []byte) error { - // Ensure we have enough output size... - if len(s.out)+s.seqSize > cap(s.out) { - addBytes := s.seqSize + len(s.out) - s.out = append(s.out, make([]byte, addBytes)...) - s.out = s.out[:len(s.out)-addBytes] - } - - if debugDecoder { - printf("Execute %d seqs with literals: %d into %d bytes\n", len(seqs), len(s.literals), s.seqSize) - } - - var t = len(s.out) - out := s.out[:t+s.seqSize] - - for _, seq := range seqs { - // Add literals - copy(out[t:], s.literals[:seq.ll]) - t += seq.ll - s.literals = s.literals[seq.ll:] - - // Malformed input - if seq.mo > t+len(hist) || seq.mo > s.windowSize { - return fmt.Errorf("match offset (%d) bigger than current history (%d)", seq.mo, t+len(hist)) - } - - // Copy from history. - if v := seq.mo - t; v > 0 { - // v is the start position in history from end. - start := len(hist) - v - if seq.ml > v { - // Some goes into the current block. - // Copy remainder of history - copy(out[t:], hist[start:]) - t += v - seq.ml -= v - } else { - copy(out[t:], hist[start:start+seq.ml]) - t += seq.ml - continue - } - } - - // We must be in the current buffer now - if seq.ml > 0 { - start := t - seq.mo - if seq.ml <= t-start { - // No overlap - copy(out[t:], out[start:start+seq.ml]) - t += seq.ml - } else { - // Overlapping copy - // Extend destination slice and copy one byte at the time. - src := out[start : start+seq.ml] - dst := out[t:] - dst = dst[:len(src)] - t += len(src) - // Destination is the space we just added. - for i := range src { - dst[i] = src[i] - } - } - } - } - // Add final literals - copy(out[t:], s.literals) - if debugDecoder { - t += len(s.literals) - if t != len(out) { - panic(fmt.Errorf("length mismatch, want %d, got %d, ss: %d", len(out), t, s.seqSize)) - } - } - s.out = out - - return nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/seqenc.go b/vendor/github.com/klauspost/compress/zstd/seqenc.go deleted file mode 100644 index 8014174a..00000000 --- a/vendor/github.com/klauspost/compress/zstd/seqenc.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import "math/bits" - -type seqCoders struct { - llEnc, ofEnc, mlEnc *fseEncoder - llPrev, ofPrev, mlPrev *fseEncoder -} - -// swap coders with another (block). -func (s *seqCoders) swap(other *seqCoders) { - *s, *other = *other, *s -} - -// setPrev will update the previous encoders to the actually used ones -// and make sure a fresh one is in the main slot. -func (s *seqCoders) setPrev(ll, ml, of *fseEncoder) { - compareSwap := func(used *fseEncoder, current, prev **fseEncoder) { - // We used the new one, more current to history and reuse the previous history - if *current == used { - *prev, *current = *current, *prev - c := *current - p := *prev - c.reUsed = false - p.reUsed = true - return - } - if used == *prev { - return - } - // Ensure we cannot reuse by accident - prevEnc := *prev - prevEnc.symbolLen = 0 - } - compareSwap(ll, &s.llEnc, &s.llPrev) - compareSwap(ml, &s.mlEnc, &s.mlPrev) - compareSwap(of, &s.ofEnc, &s.ofPrev) -} - -func highBit(val uint32) (n uint32) { - return uint32(bits.Len32(val) - 1) -} - -var llCodeTable = [64]byte{0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, - 16, 16, 17, 17, 18, 18, 19, 19, - 20, 20, 20, 20, 21, 21, 21, 21, - 22, 22, 22, 22, 22, 22, 22, 22, - 23, 23, 23, 23, 23, 23, 23, 23, - 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24} - -// Up to 6 bits -const maxLLCode = 35 - -// llBitsTable translates from ll code to number of bits. -var llBitsTable = [maxLLCode + 1]byte{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 2, 2, 3, 3, - 4, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16} - -// llCode returns the code that represents the literal length requested. -func llCode(litLength uint32) uint8 { - const llDeltaCode = 19 - if litLength <= 63 { - // Compiler insists on bounds check (Go 1.12) - return llCodeTable[litLength&63] - } - return uint8(highBit(litLength)) + llDeltaCode -} - -var mlCodeTable = [128]byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37, - 38, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42} - -// Up to 6 bits -const maxMLCode = 52 - -// mlBitsTable translates from ml code to number of bits. -var mlBitsTable = [maxMLCode + 1]byte{ - 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, - 1, 1, 1, 1, 2, 2, 3, 3, - 4, 4, 5, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16} - -// note : mlBase = matchLength - MINMATCH; -// because it's the format it's stored in seqStore->sequences -func mlCode(mlBase uint32) uint8 { - const mlDeltaCode = 36 - if mlBase <= 127 { - // Compiler insists on bounds check (Go 1.12) - return mlCodeTable[mlBase&127] - } - return uint8(highBit(mlBase)) + mlDeltaCode -} - -func ofCode(offset uint32) uint8 { - // A valid offset will always be > 0. - return uint8(bits.Len32(offset) - 1) -} diff --git a/vendor/github.com/klauspost/compress/zstd/snappy.go b/vendor/github.com/klauspost/compress/zstd/snappy.go deleted file mode 100644 index ec13594e..00000000 --- a/vendor/github.com/klauspost/compress/zstd/snappy.go +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. -// Based on work by Yann Collet, released under BSD License. - -package zstd - -import ( - "encoding/binary" - "errors" - "hash/crc32" - "io" - - "github.com/klauspost/compress/huff0" - snappy "github.com/klauspost/compress/internal/snapref" -) - -const ( - snappyTagLiteral = 0x00 - snappyTagCopy1 = 0x01 - snappyTagCopy2 = 0x02 - snappyTagCopy4 = 0x03 -) - -const ( - snappyChecksumSize = 4 - snappyMagicBody = "sNaPpY" - - // snappyMaxBlockSize is the maximum size of the input to encodeBlock. It is not - // part of the wire format per se, but some parts of the encoder assume - // that an offset fits into a uint16. - // - // Also, for the framing format (Writer type instead of Encode function), - // https://github.com/google/snappy/blob/master/framing_format.txt says - // that "the uncompressed data in a chunk must be no longer than 65536 - // bytes". - snappyMaxBlockSize = 65536 - - // snappyMaxEncodedLenOfMaxBlockSize equals MaxEncodedLen(snappyMaxBlockSize), but is - // hard coded to be a const instead of a variable, so that obufLen can also - // be a const. Their equivalence is confirmed by - // TestMaxEncodedLenOfMaxBlockSize. - snappyMaxEncodedLenOfMaxBlockSize = 76490 -) - -const ( - chunkTypeCompressedData = 0x00 - chunkTypeUncompressedData = 0x01 - chunkTypePadding = 0xfe - chunkTypeStreamIdentifier = 0xff -) - -var ( - // ErrSnappyCorrupt reports that the input is invalid. - ErrSnappyCorrupt = errors.New("snappy: corrupt input") - // ErrSnappyTooLarge reports that the uncompressed length is too large. - ErrSnappyTooLarge = errors.New("snappy: decoded block is too large") - // ErrSnappyUnsupported reports that the input isn't supported. - ErrSnappyUnsupported = errors.New("snappy: unsupported input") - - errUnsupportedLiteralLength = errors.New("snappy: unsupported literal length") -) - -// SnappyConverter can read SnappyConverter-compressed streams and convert them to zstd. -// Conversion is done by converting the stream directly from Snappy without intermediate -// full decoding. -// Therefore the compression ratio is much less than what can be done by a full decompression -// and compression, and a faulty Snappy stream may lead to a faulty Zstandard stream without -// any errors being generated. -// No CRC value is being generated and not all CRC values of the Snappy stream are checked. -// However, it provides really fast recompression of Snappy streams. -// The converter can be reused to avoid allocations, even after errors. -type SnappyConverter struct { - r io.Reader - err error - buf []byte - block *blockEnc -} - -// Convert the Snappy stream supplied in 'in' and write the zStandard stream to 'w'. -// If any error is detected on the Snappy stream it is returned. -// The number of bytes written is returned. -func (r *SnappyConverter) Convert(in io.Reader, w io.Writer) (int64, error) { - initPredefined() - r.err = nil - r.r = in - if r.block == nil { - r.block = &blockEnc{} - r.block.init() - } - r.block.initNewEncode() - if len(r.buf) != snappyMaxEncodedLenOfMaxBlockSize+snappyChecksumSize { - r.buf = make([]byte, snappyMaxEncodedLenOfMaxBlockSize+snappyChecksumSize) - } - r.block.litEnc.Reuse = huff0.ReusePolicyNone - var written int64 - var readHeader bool - { - header := frameHeader{WindowSize: snappyMaxBlockSize}.appendTo(r.buf[:0]) - - var n int - n, r.err = w.Write(header) - if r.err != nil { - return written, r.err - } - written += int64(n) - } - - for { - if !r.readFull(r.buf[:4], true) { - // Add empty last block - r.block.reset(nil) - r.block.last = true - err := r.block.encodeLits(r.block.literals, false) - if err != nil { - return written, err - } - n, err := w.Write(r.block.output) - if err != nil { - return written, err - } - written += int64(n) - - return written, r.err - } - chunkType := r.buf[0] - if !readHeader { - if chunkType != chunkTypeStreamIdentifier { - println("chunkType != chunkTypeStreamIdentifier", chunkType) - r.err = ErrSnappyCorrupt - return written, r.err - } - readHeader = true - } - chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16 - if chunkLen > len(r.buf) { - println("chunkLen > len(r.buf)", chunkType) - r.err = ErrSnappyUnsupported - return written, r.err - } - - // The chunk types are specified at - // https://github.com/google/snappy/blob/master/framing_format.txt - switch chunkType { - case chunkTypeCompressedData: - // Section 4.2. Compressed data (chunk type 0x00). - if chunkLen < snappyChecksumSize { - println("chunkLen < snappyChecksumSize", chunkLen, snappyChecksumSize) - r.err = ErrSnappyCorrupt - return written, r.err - } - buf := r.buf[:chunkLen] - if !r.readFull(buf, false) { - return written, r.err - } - //checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 - buf = buf[snappyChecksumSize:] - - n, hdr, err := snappyDecodedLen(buf) - if err != nil { - r.err = err - return written, r.err - } - buf = buf[hdr:] - if n > snappyMaxBlockSize { - println("n > snappyMaxBlockSize", n, snappyMaxBlockSize) - r.err = ErrSnappyCorrupt - return written, r.err - } - r.block.reset(nil) - r.block.pushOffsets() - if err := decodeSnappy(r.block, buf); err != nil { - r.err = err - return written, r.err - } - if r.block.size+r.block.extraLits != n { - printf("invalid size, want %d, got %d\n", n, r.block.size+r.block.extraLits) - r.err = ErrSnappyCorrupt - return written, r.err - } - err = r.block.encode(nil, false, false) - switch err { - case errIncompressible: - r.block.popOffsets() - r.block.reset(nil) - r.block.literals, err = snappy.Decode(r.block.literals[:n], r.buf[snappyChecksumSize:chunkLen]) - if err != nil { - return written, err - } - err = r.block.encodeLits(r.block.literals, false) - if err != nil { - return written, err - } - case nil: - default: - return written, err - } - - n, r.err = w.Write(r.block.output) - if r.err != nil { - return written, err - } - written += int64(n) - continue - case chunkTypeUncompressedData: - if debugEncoder { - println("Uncompressed, chunklen", chunkLen) - } - // Section 4.3. Uncompressed data (chunk type 0x01). - if chunkLen < snappyChecksumSize { - println("chunkLen < snappyChecksumSize", chunkLen, snappyChecksumSize) - r.err = ErrSnappyCorrupt - return written, r.err - } - r.block.reset(nil) - buf := r.buf[:snappyChecksumSize] - if !r.readFull(buf, false) { - return written, r.err - } - checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 - // Read directly into r.decoded instead of via r.buf. - n := chunkLen - snappyChecksumSize - if n > snappyMaxBlockSize { - println("n > snappyMaxBlockSize", n, snappyMaxBlockSize) - r.err = ErrSnappyCorrupt - return written, r.err - } - r.block.literals = r.block.literals[:n] - if !r.readFull(r.block.literals, false) { - return written, r.err - } - if snappyCRC(r.block.literals) != checksum { - println("literals crc mismatch") - r.err = ErrSnappyCorrupt - return written, r.err - } - err := r.block.encodeLits(r.block.literals, false) - if err != nil { - return written, err - } - n, r.err = w.Write(r.block.output) - if r.err != nil { - return written, err - } - written += int64(n) - continue - - case chunkTypeStreamIdentifier: - if debugEncoder { - println("stream id", chunkLen, len(snappyMagicBody)) - } - // Section 4.1. Stream identifier (chunk type 0xff). - if chunkLen != len(snappyMagicBody) { - println("chunkLen != len(snappyMagicBody)", chunkLen, len(snappyMagicBody)) - r.err = ErrSnappyCorrupt - return written, r.err - } - if !r.readFull(r.buf[:len(snappyMagicBody)], false) { - return written, r.err - } - for i := 0; i < len(snappyMagicBody); i++ { - if r.buf[i] != snappyMagicBody[i] { - println("r.buf[i] != snappyMagicBody[i]", r.buf[i], snappyMagicBody[i], i) - r.err = ErrSnappyCorrupt - return written, r.err - } - } - continue - } - - if chunkType <= 0x7f { - // Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f). - println("chunkType <= 0x7f") - r.err = ErrSnappyUnsupported - return written, r.err - } - // Section 4.4 Padding (chunk type 0xfe). - // Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd). - if !r.readFull(r.buf[:chunkLen], false) { - return written, r.err - } - } -} - -// decodeSnappy writes the decoding of src to dst. It assumes that the varint-encoded -// length of the decompressed bytes has already been read. -func decodeSnappy(blk *blockEnc, src []byte) error { - //decodeRef(make([]byte, snappyMaxBlockSize), src) - var s, length int - lits := blk.extraLits - var offset uint32 - for s < len(src) { - switch src[s] & 0x03 { - case snappyTagLiteral: - x := uint32(src[s] >> 2) - switch { - case x < 60: - s++ - case x == 60: - s += 2 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - println("uint(s) > uint(len(src)", s, src) - return ErrSnappyCorrupt - } - x = uint32(src[s-1]) - case x == 61: - s += 3 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - println("uint(s) > uint(len(src)", s, src) - return ErrSnappyCorrupt - } - x = uint32(src[s-2]) | uint32(src[s-1])<<8 - case x == 62: - s += 4 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - println("uint(s) > uint(len(src)", s, src) - return ErrSnappyCorrupt - } - x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16 - case x == 63: - s += 5 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - println("uint(s) > uint(len(src)", s, src) - return ErrSnappyCorrupt - } - x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24 - } - if x > snappyMaxBlockSize { - println("x > snappyMaxBlockSize", x, snappyMaxBlockSize) - return ErrSnappyCorrupt - } - length = int(x) + 1 - if length <= 0 { - println("length <= 0 ", length) - - return errUnsupportedLiteralLength - } - //if length > snappyMaxBlockSize-d || uint32(length) > len(src)-s { - // return ErrSnappyCorrupt - //} - - blk.literals = append(blk.literals, src[s:s+length]...) - //println(length, "litLen") - lits += length - s += length - continue - - case snappyTagCopy1: - s += 2 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - println("uint(s) > uint(len(src)", s, len(src)) - return ErrSnappyCorrupt - } - length = 4 + int(src[s-2])>>2&0x7 - offset = uint32(src[s-2])&0xe0<<3 | uint32(src[s-1]) - - case snappyTagCopy2: - s += 3 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - println("uint(s) > uint(len(src)", s, len(src)) - return ErrSnappyCorrupt - } - length = 1 + int(src[s-3])>>2 - offset = uint32(src[s-2]) | uint32(src[s-1])<<8 - - case snappyTagCopy4: - s += 5 - if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. - println("uint(s) > uint(len(src)", s, len(src)) - return ErrSnappyCorrupt - } - length = 1 + int(src[s-5])>>2 - offset = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24 - } - - if offset <= 0 || blk.size+lits < int(offset) /*|| length > len(blk)-d */ { - println("offset <= 0 || blk.size+lits < int(offset)", offset, blk.size+lits, int(offset), blk.size, lits) - - return ErrSnappyCorrupt - } - - // Check if offset is one of the recent offsets. - // Adjusts the output offset accordingly. - // Gives a tiny bit of compression, typically around 1%. - if false { - offset = blk.matchOffset(offset, uint32(lits)) - } else { - offset += 3 - } - - blk.sequences = append(blk.sequences, seq{ - litLen: uint32(lits), - offset: offset, - matchLen: uint32(length) - zstdMinMatch, - }) - blk.size += length + lits - lits = 0 - } - blk.extraLits = lits - return nil -} - -func (r *SnappyConverter) readFull(p []byte, allowEOF bool) (ok bool) { - if _, r.err = io.ReadFull(r.r, p); r.err != nil { - if r.err == io.ErrUnexpectedEOF || (r.err == io.EOF && !allowEOF) { - r.err = ErrSnappyCorrupt - } - return false - } - return true -} - -var crcTable = crc32.MakeTable(crc32.Castagnoli) - -// crc implements the checksum specified in section 3 of -// https://github.com/google/snappy/blob/master/framing_format.txt -func snappyCRC(b []byte) uint32 { - c := crc32.Update(0, crcTable, b) - return c>>15 | c<<17 + 0xa282ead8 -} - -// snappyDecodedLen returns the length of the decoded block and the number of bytes -// that the length header occupied. -func snappyDecodedLen(src []byte) (blockLen, headerLen int, err error) { - v, n := binary.Uvarint(src) - if n <= 0 || v > 0xffffffff { - return 0, 0, ErrSnappyCorrupt - } - - const wordSize = 32 << (^uint(0) >> 32 & 1) - if wordSize == 32 && v > 0x7fffffff { - return 0, 0, ErrSnappyTooLarge - } - return int(v), n, nil -} diff --git a/vendor/github.com/klauspost/compress/zstd/zip.go b/vendor/github.com/klauspost/compress/zstd/zip.go deleted file mode 100644 index 29c15c8c..00000000 --- a/vendor/github.com/klauspost/compress/zstd/zip.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2019+ Klaus Post. All rights reserved. -// License information can be found in the LICENSE file. - -package zstd - -import ( - "errors" - "io" - "sync" -) - -// ZipMethodWinZip is the method for Zstandard compressed data inside Zip files for WinZip. -// See https://www.winzip.com/win/en/comp_info.html -const ZipMethodWinZip = 93 - -// ZipMethodPKWare is the original method number used by PKWARE to indicate Zstandard compression. -// Deprecated: This has been deprecated by PKWARE, use ZipMethodWinZip instead for compression. -// See https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.9.TXT -const ZipMethodPKWare = 20 - -// zipReaderPool is the default reader pool. -var zipReaderPool = sync.Pool{New: func() interface{} { - z, err := NewReader(nil, WithDecoderLowmem(true), WithDecoderMaxWindow(128<<20), WithDecoderConcurrency(1)) - if err != nil { - panic(err) - } - return z -}} - -// newZipReader creates a pooled zip decompressor. -func newZipReader(opts ...DOption) func(r io.Reader) io.ReadCloser { - pool := &zipReaderPool - if len(opts) > 0 { - opts = append([]DOption{WithDecoderLowmem(true), WithDecoderMaxWindow(128 << 20)}, opts...) - // Force concurrency 1 - opts = append(opts, WithDecoderConcurrency(1)) - // Create our own pool - pool = &sync.Pool{} - } - return func(r io.Reader) io.ReadCloser { - dec, ok := pool.Get().(*Decoder) - if ok { - dec.Reset(r) - } else { - d, err := NewReader(r, opts...) - if err != nil { - panic(err) - } - dec = d - } - return &pooledZipReader{dec: dec, pool: pool} - } -} - -type pooledZipReader struct { - mu sync.Mutex // guards Close and Read - pool *sync.Pool - dec *Decoder -} - -func (r *pooledZipReader) Read(p []byte) (n int, err error) { - r.mu.Lock() - defer r.mu.Unlock() - if r.dec == nil { - return 0, errors.New("read after close or EOF") - } - dec, err := r.dec.Read(p) - if err == io.EOF { - r.dec.Reset(nil) - r.pool.Put(r.dec) - r.dec = nil - } - return dec, err -} - -func (r *pooledZipReader) Close() error { - r.mu.Lock() - defer r.mu.Unlock() - var err error - if r.dec != nil { - err = r.dec.Reset(nil) - r.pool.Put(r.dec) - r.dec = nil - } - return err -} - -type pooledZipWriter struct { - mu sync.Mutex // guards Close and Read - enc *Encoder - pool *sync.Pool -} - -func (w *pooledZipWriter) Write(p []byte) (n int, err error) { - w.mu.Lock() - defer w.mu.Unlock() - if w.enc == nil { - return 0, errors.New("Write after Close") - } - return w.enc.Write(p) -} - -func (w *pooledZipWriter) Close() error { - w.mu.Lock() - defer w.mu.Unlock() - var err error - if w.enc != nil { - err = w.enc.Close() - w.pool.Put(w.enc) - w.enc = nil - } - return err -} - -// ZipCompressor returns a compressor that can be registered with zip libraries. -// The provided encoder options will be used on all encodes. -func ZipCompressor(opts ...EOption) func(w io.Writer) (io.WriteCloser, error) { - var pool sync.Pool - return func(w io.Writer) (io.WriteCloser, error) { - enc, ok := pool.Get().(*Encoder) - if ok { - enc.Reset(w) - } else { - var err error - enc, err = NewWriter(w, opts...) - if err != nil { - return nil, err - } - } - return &pooledZipWriter{enc: enc, pool: &pool}, nil - } -} - -// ZipDecompressor returns a decompressor that can be registered with zip libraries. -// See ZipCompressor for example. -// Options can be specified. WithDecoderConcurrency(1) is forced, -// and by default a 128MB maximum decompression window is specified. -// The window size can be overridden if required. -func ZipDecompressor(opts ...DOption) func(r io.Reader) io.ReadCloser { - return newZipReader(opts...) -} diff --git a/vendor/github.com/klauspost/compress/zstd/zstd.go b/vendor/github.com/klauspost/compress/zstd/zstd.go deleted file mode 100644 index 4be7cc73..00000000 --- a/vendor/github.com/klauspost/compress/zstd/zstd.go +++ /dev/null @@ -1,121 +0,0 @@ -// Package zstd provides decompression of zstandard files. -// -// For advanced usage and examples, go to the README: https://github.com/klauspost/compress/tree/master/zstd#zstd -package zstd - -import ( - "bytes" - "encoding/binary" - "errors" - "log" - "math" -) - -// enable debug printing -const debug = false - -// enable encoding debug printing -const debugEncoder = debug - -// enable decoding debug printing -const debugDecoder = debug - -// Enable extra assertions. -const debugAsserts = debug || false - -// print sequence details -const debugSequences = false - -// print detailed matching information -const debugMatches = false - -// force encoder to use predefined tables. -const forcePreDef = false - -// zstdMinMatch is the minimum zstd match length. -const zstdMinMatch = 3 - -// fcsUnknown is used for unknown frame content size. -const fcsUnknown = math.MaxUint64 - -var ( - // ErrReservedBlockType is returned when a reserved block type is found. - // Typically this indicates wrong or corrupted input. - ErrReservedBlockType = errors.New("invalid input: reserved block type encountered") - - // ErrCompressedSizeTooBig is returned when a block is bigger than allowed. - // Typically this indicates wrong or corrupted input. - ErrCompressedSizeTooBig = errors.New("invalid input: compressed size too big") - - // ErrBlockTooSmall is returned when a block is too small to be decoded. - // Typically returned on invalid input. - ErrBlockTooSmall = errors.New("block too small") - - // ErrUnexpectedBlockSize is returned when a block has unexpected size. - // Typically returned on invalid input. - ErrUnexpectedBlockSize = errors.New("unexpected block size") - - // ErrMagicMismatch is returned when a "magic" number isn't what is expected. - // Typically this indicates wrong or corrupted input. - ErrMagicMismatch = errors.New("invalid input: magic number mismatch") - - // ErrWindowSizeExceeded is returned when a reference exceeds the valid window size. - // Typically this indicates wrong or corrupted input. - ErrWindowSizeExceeded = errors.New("window size exceeded") - - // ErrWindowSizeTooSmall is returned when no window size is specified. - // Typically this indicates wrong or corrupted input. - ErrWindowSizeTooSmall = errors.New("invalid input: window size was too small") - - // ErrDecoderSizeExceeded is returned if decompressed size exceeds the configured limit. - ErrDecoderSizeExceeded = errors.New("decompressed size exceeds configured limit") - - // ErrUnknownDictionary is returned if the dictionary ID is unknown. - ErrUnknownDictionary = errors.New("unknown dictionary") - - // ErrFrameSizeExceeded is returned if the stated frame size is exceeded. - // This is only returned if SingleSegment is specified on the frame. - ErrFrameSizeExceeded = errors.New("frame size exceeded") - - // ErrFrameSizeMismatch is returned if the stated frame size does not match the expected size. - // This is only returned if SingleSegment is specified on the frame. - ErrFrameSizeMismatch = errors.New("frame size does not match size on stream") - - // ErrCRCMismatch is returned if CRC mismatches. - ErrCRCMismatch = errors.New("CRC check failed") - - // ErrDecoderClosed will be returned if the Decoder was used after - // Close has been called. - ErrDecoderClosed = errors.New("decoder used after Close") - - // ErrDecoderNilInput is returned when a nil Reader was provided - // and an operation other than Reset/DecodeAll/Close was attempted. - ErrDecoderNilInput = errors.New("nil input provided as reader") -) - -func println(a ...interface{}) { - if debug || debugDecoder || debugEncoder { - log.Println(a...) - } -} - -func printf(format string, a ...interface{}) { - if debug || debugDecoder || debugEncoder { - log.Printf(format, a...) - } -} - -func load3232(b []byte, i int32) uint32 { - return binary.LittleEndian.Uint32(b[:len(b):len(b)][i:]) -} - -func load6432(b []byte, i int32) uint64 { - return binary.LittleEndian.Uint64(b[:len(b):len(b)][i:]) -} - -type byter interface { - Bytes() []byte - Len() int -} - -var _ byter = &bytes.Buffer{} diff --git a/vendor/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/mitchellh/go-homedir/LICENSE deleted file mode 100644 index f9c841a5..00000000 --- a/vendor/github.com/mitchellh/go-homedir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/mitchellh/go-homedir/README.md b/vendor/github.com/mitchellh/go-homedir/README.md deleted file mode 100644 index d70706d5..00000000 --- a/vendor/github.com/mitchellh/go-homedir/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# go-homedir - -This is a Go library for detecting the user's home directory without -the use of cgo, so the library can be used in cross-compilation environments. - -Usage is incredibly simple, just call `homedir.Dir()` to get the home directory -for a user, and `homedir.Expand()` to expand the `~` in a path to the home -directory. - -**Why not just use `os/user`?** The built-in `os/user` package requires -cgo on Darwin systems. This means that any Go code that uses that package -cannot cross compile. But 99% of the time the use for `os/user` is just to -retrieve the home directory, which we can do for the current user without -cgo. This library does that, enabling cross-compilation. diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go deleted file mode 100644 index 25378537..00000000 --- a/vendor/github.com/mitchellh/go-homedir/homedir.go +++ /dev/null @@ -1,167 +0,0 @@ -package homedir - -import ( - "bytes" - "errors" - "os" - "os/exec" - "path/filepath" - "runtime" - "strconv" - "strings" - "sync" -) - -// DisableCache will disable caching of the home directory. Caching is enabled -// by default. -var DisableCache bool - -var homedirCache string -var cacheLock sync.RWMutex - -// Dir returns the home directory for the executing user. -// -// This uses an OS-specific method for discovering the home directory. -// An error is returned if a home directory cannot be detected. -func Dir() (string, error) { - if !DisableCache { - cacheLock.RLock() - cached := homedirCache - cacheLock.RUnlock() - if cached != "" { - return cached, nil - } - } - - cacheLock.Lock() - defer cacheLock.Unlock() - - var result string - var err error - if runtime.GOOS == "windows" { - result, err = dirWindows() - } else { - // Unix-like system, so just assume Unix - result, err = dirUnix() - } - - if err != nil { - return "", err - } - homedirCache = result - return result, nil -} - -// Expand expands the path to include the home directory if the path -// is prefixed with `~`. If it isn't prefixed with `~`, the path is -// returned as-is. -func Expand(path string) (string, error) { - if len(path) == 0 { - return path, nil - } - - if path[0] != '~' { - return path, nil - } - - if len(path) > 1 && path[1] != '/' && path[1] != '\\' { - return "", errors.New("cannot expand user-specific home dir") - } - - dir, err := Dir() - if err != nil { - return "", err - } - - return filepath.Join(dir, path[1:]), nil -} - -// Reset clears the cache, forcing the next call to Dir to re-detect -// the home directory. This generally never has to be called, but can be -// useful in tests if you're modifying the home directory via the HOME -// env var or something. -func Reset() { - cacheLock.Lock() - defer cacheLock.Unlock() - homedirCache = "" -} - -func dirUnix() (string, error) { - homeEnv := "HOME" - if runtime.GOOS == "plan9" { - // On plan9, env vars are lowercase. - homeEnv = "home" - } - - // First prefer the HOME environmental variable - if home := os.Getenv(homeEnv); home != "" { - return home, nil - } - - var stdout bytes.Buffer - - // If that fails, try OS specific commands - if runtime.GOOS == "darwin" { - cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`) - cmd.Stdout = &stdout - if err := cmd.Run(); err == nil { - result := strings.TrimSpace(stdout.String()) - if result != "" { - return result, nil - } - } - } else { - cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid())) - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - // If the error is ErrNotFound, we ignore it. Otherwise, return it. - if err != exec.ErrNotFound { - return "", err - } - } else { - if passwd := strings.TrimSpace(stdout.String()); passwd != "" { - // username:password:uid:gid:gecos:home:shell - passwdParts := strings.SplitN(passwd, ":", 7) - if len(passwdParts) > 5 { - return passwdParts[5], nil - } - } - } - } - - // If all else fails, try the shell - stdout.Reset() - cmd := exec.Command("sh", "-c", "cd && pwd") - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - return "", err - } - - result := strings.TrimSpace(stdout.String()) - if result == "" { - return "", errors.New("blank output when reading home directory") - } - - return result, nil -} - -func dirWindows() (string, error) { - // First prefer the HOME environmental variable - if home := os.Getenv("HOME"); home != "" { - return home, nil - } - - // Prefer standard environment variable USERPROFILE - if home := os.Getenv("USERPROFILE"); home != "" { - return home, nil - } - - drive := os.Getenv("HOMEDRIVE") - path := os.Getenv("HOMEPATH") - home := drive + path - if drive == "" || path == "" { - return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank") - } - - return home, nil -} diff --git a/vendor/github.com/opencontainers/go-digest/.mailmap b/vendor/github.com/opencontainers/go-digest/.mailmap deleted file mode 100644 index eaf8b2f9..00000000 --- a/vendor/github.com/opencontainers/go-digest/.mailmap +++ /dev/null @@ -1,4 +0,0 @@ -Aaron Lehmann -Derek McGowan -Stephen J Day -Haibing Zhou diff --git a/vendor/github.com/opencontainers/go-digest/.pullapprove.yml b/vendor/github.com/opencontainers/go-digest/.pullapprove.yml deleted file mode 100644 index b6165f83..00000000 --- a/vendor/github.com/opencontainers/go-digest/.pullapprove.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: 2 - -requirements: - signed_off_by: - required: true - -always_pending: - title_regex: '^WIP' - explanation: 'Work in progress...' - -group_defaults: - required: 2 - approve_by_comment: - enabled: true - approve_regex: '^LGTM' - reject_regex: '^Rejected' - reset_on_push: - enabled: true - author_approval: - ignored: true - conditions: - branches: - - master - -groups: - go-digest: - teams: - - go-digest-maintainers diff --git a/vendor/github.com/opencontainers/go-digest/.travis.yml b/vendor/github.com/opencontainers/go-digest/.travis.yml deleted file mode 100644 index 5775f885..00000000 --- a/vendor/github.com/opencontainers/go-digest/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: go -go: - - 1.12.x - - 1.13.x - - master diff --git a/vendor/github.com/opencontainers/go-digest/CONTRIBUTING.md b/vendor/github.com/opencontainers/go-digest/CONTRIBUTING.md deleted file mode 100644 index e4d962ac..00000000 --- a/vendor/github.com/opencontainers/go-digest/CONTRIBUTING.md +++ /dev/null @@ -1,72 +0,0 @@ -# Contributing to Docker open source projects - -Want to hack on this project? Awesome! Here are instructions to get you started. - -This project is a part of the [Docker](https://www.docker.com) project, and follows -the same rules and principles. If you're already familiar with the way -Docker does things, you'll feel right at home. - -Otherwise, go read Docker's -[contributions guidelines](https://github.com/docker/docker/blob/master/CONTRIBUTING.md), -[issue triaging](https://github.com/docker/docker/blob/master/project/ISSUE-TRIAGE.md), -[review process](https://github.com/docker/docker/blob/master/project/REVIEWING.md) and -[branches and tags](https://github.com/docker/docker/blob/master/project/BRANCHES-AND-TAGS.md). - -For an in-depth description of our contribution process, visit the -contributors guide: [Understand how to contribute](https://docs.docker.com/opensource/workflow/make-a-contribution/) - -### Sign your work - -The sign-off is a simple line at the end of the explanation for the patch. Your -signature certifies that you wrote the patch or otherwise have the right to pass -it on as an open-source patch. The rules are pretty simple: if you can certify -the below (from [developercertificate.org](http://developercertificate.org/)): - -``` -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -1 Letterman Drive -Suite D4700 -San Francisco, CA, 94129 - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. -``` - -Then you just add a line to every git commit message: - - Signed-off-by: Joe Smith - -Use your real name (sorry, no pseudonyms or anonymous contributions.) - -If you set your `user.name` and `user.email` git configs, you can sign your -commit automatically with `git commit -s`. diff --git a/vendor/github.com/opencontainers/go-digest/LICENSE b/vendor/github.com/opencontainers/go-digest/LICENSE deleted file mode 100644 index 3ac8ab64..00000000 --- a/vendor/github.com/opencontainers/go-digest/LICENSE +++ /dev/null @@ -1,192 +0,0 @@ - - Apache License - Version 2.0, January 2004 - https://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 - - Copyright 2019, 2020 OCI Contributors - Copyright 2016 Docker, Inc. - - 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 - - https://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/opencontainers/go-digest/LICENSE.docs b/vendor/github.com/opencontainers/go-digest/LICENSE.docs deleted file mode 100644 index e26cd4fc..00000000 --- a/vendor/github.com/opencontainers/go-digest/LICENSE.docs +++ /dev/null @@ -1,425 +0,0 @@ -Attribution-ShareAlike 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution-ShareAlike 4.0 International Public -License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution-ShareAlike 4.0 International Public License ("Public -License"). To the extent this Public License may be interpreted as a -contract, You are granted the Licensed Rights in consideration of Your -acceptance of these terms and conditions, and the Licensor grants You -such rights in consideration of benefits the Licensor receives from -making the Licensed Material available under these terms and -conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. BY-SA Compatible License means a license listed at - creativecommons.org/compatiblelicenses, approved by Creative - Commons as essentially the equivalent of this Public License. - - d. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - e. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - f. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - g. License Elements means the license attributes listed in the name - of a Creative Commons Public License. The License Elements of this - Public License are Attribution and ShareAlike. - - h. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - i. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - j. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - k. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - l. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - m. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. Additional offer from the Licensor -- Adapted Material. - Every recipient of Adapted Material from You - automatically receives an offer from the Licensor to - exercise the Licensed Rights in the Adapted Material - under the conditions of the Adapter's License You apply. - - c. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - b. ShareAlike. - - In addition to the conditions in Section 3(a), if You Share - Adapted Material You produce, the following conditions also apply. - - 1. The Adapter's License You apply must be a Creative Commons - license with the same License Elements, this version or - later, or a BY-SA Compatible License. - - 2. You must include the text of, or the URI or hyperlink to, the - Adapter's License You apply. You may satisfy this condition - in any reasonable manner based on the medium, means, and - context in which You Share Adapted Material. - - 3. You may not offer or impose any additional or different terms - or conditions on, or apply any Effective Technological - Measures to, Adapted Material that restrict exercise of the - rights granted under the Adapter's License You apply. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material, - - including for purposes of Section 3(b); and - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public licenses. -Notwithstanding, Creative Commons may elect to apply one of its public -licenses to material it publishes and in those instances will be -considered the "Licensor." Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the public -licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/vendor/github.com/opencontainers/go-digest/MAINTAINERS b/vendor/github.com/opencontainers/go-digest/MAINTAINERS deleted file mode 100644 index 843b1b20..00000000 --- a/vendor/github.com/opencontainers/go-digest/MAINTAINERS +++ /dev/null @@ -1,5 +0,0 @@ -Derek McGowan (@dmcgowan) -Stephen Day (@stevvooe) -Vincent Batts (@vbatts) -Akihiro Suda (@AkihiroSuda) -Sebastiaan van Stijn (@thaJeztah) diff --git a/vendor/github.com/opencontainers/go-digest/README.md b/vendor/github.com/opencontainers/go-digest/README.md deleted file mode 100644 index a1128720..00000000 --- a/vendor/github.com/opencontainers/go-digest/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# go-digest - -[![GoDoc](https://godoc.org/github.com/opencontainers/go-digest?status.svg)](https://godoc.org/github.com/opencontainers/go-digest) [![Go Report Card](https://goreportcard.com/badge/github.com/opencontainers/go-digest)](https://goreportcard.com/report/github.com/opencontainers/go-digest) [![Build Status](https://travis-ci.org/opencontainers/go-digest.svg?branch=master)](https://travis-ci.org/opencontainers/go-digest) - -Common digest package used across the container ecosystem. - -Please see the [godoc](https://godoc.org/github.com/opencontainers/go-digest) for more information. - -# What is a digest? - -A digest is just a [hash](https://en.wikipedia.org/wiki/Hash_function). - -The most common use case for a digest is to create a content identifier for use in [Content Addressable Storage](https://en.wikipedia.org/wiki/Content-addressable_storage) systems: - -```go -id := digest.FromBytes([]byte("my content")) -``` - -In the example above, the id can be used to uniquely identify the byte slice "my content". -This allows two disparate applications to agree on a verifiable identifier without having to trust one another. - -An identifying digest can be verified, as follows: - -```go -if id != digest.FromBytes([]byte("my content")) { - return errors.New("the content has changed!") -} -``` - -A `Verifier` type can be used to handle cases where an `io.Reader` makes more sense: - -```go -rd := getContent() -verifier := id.Verifier() -io.Copy(verifier, rd) - -if !verifier.Verified() { - return errors.New("the content has changed!") -} -``` - -Using [Merkle DAGs](https://en.wikipedia.org/wiki/Merkle_tree), this can power a rich, safe, content distribution system. - -# Usage - -While the [godoc](https://godoc.org/github.com/opencontainers/go-digest) is considered the best resource, a few important items need to be called out when using this package. - -1. Make sure to import the hash implementations into your application or the package will panic. - You should have something like the following in the main (or other entrypoint) of your application: - - ```go - import ( - _ "crypto/sha256" - _ "crypto/sha512" - ) - ``` - This may seem inconvenient but it allows you replace the hash - implementations with others, such as https://github.com/stevvooe/resumable. - -2. Even though `digest.Digest` may be assemblable as a string, _always_ verify your input with `digest.Parse` or use `Digest.Validate` when accepting untrusted input. - While there are measures to avoid common problems, this will ensure you have valid digests in the rest of your application. - -3. While alternative encodings of hash values (digests) are possible (for example, base64), this package deals exclusively with hex-encoded digests. - -# Stability - -The Go API, at this stage, is considered stable, unless otherwise noted. - -As always, before using a package export, read the [godoc](https://godoc.org/github.com/opencontainers/go-digest). - -# Contributing - -This package is considered fairly complete. -It has been in production in thousands (millions?) of deployments and is fairly battle-hardened. -New additions will be met with skepticism. -If you think there is a missing feature, please file a bug clearly describing the problem and the alternatives you tried before submitting a PR. - -## Code of Conduct - -Participation in the OpenContainers community is governed by [OpenContainer's Code of Conduct][code-of-conduct]. - -## Security - -If you find an issue, please follow the [security][security] protocol to report it. - -# Copyright and license - -Copyright © 2019, 2020 OCI Contributors -Copyright © 2016 Docker, Inc. -All rights reserved, except as follows. -Code is released under the [Apache 2.0 license](LICENSE). -This `README.md` file and the [`CONTRIBUTING.md`](CONTRIBUTING.md) file are licensed under the Creative Commons Attribution 4.0 International License under the terms and conditions set forth in the file [`LICENSE.docs`](LICENSE.docs). -You may obtain a duplicate copy of the same license, titled CC BY-SA 4.0, at http://creativecommons.org/licenses/by-sa/4.0/. - -[security]: https://github.com/opencontainers/org/blob/master/security -[code-of-conduct]: https://github.com/opencontainers/org/blob/master/CODE_OF_CONDUCT.md diff --git a/vendor/github.com/opencontainers/go-digest/algorithm.go b/vendor/github.com/opencontainers/go-digest/algorithm.go deleted file mode 100644 index 490951dc..00000000 --- a/vendor/github.com/opencontainers/go-digest/algorithm.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2019, 2020 OCI Contributors -// Copyright 2017 Docker, Inc. -// -// 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 -// -// https://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 digest - -import ( - "crypto" - "fmt" - "hash" - "io" - "regexp" -) - -// Algorithm identifies and implementation of a digester by an identifier. -// Note the that this defines both the hash algorithm used and the string -// encoding. -type Algorithm string - -// supported digest types -const ( - SHA256 Algorithm = "sha256" // sha256 with hex encoding (lower case only) - SHA384 Algorithm = "sha384" // sha384 with hex encoding (lower case only) - SHA512 Algorithm = "sha512" // sha512 with hex encoding (lower case only) - - // Canonical is the primary digest algorithm used with the distribution - // project. Other digests may be used but this one is the primary storage - // digest. - Canonical = SHA256 -) - -var ( - // TODO(stevvooe): Follow the pattern of the standard crypto package for - // registration of digests. Effectively, we are a registerable set and - // common symbol access. - - // algorithms maps values to hash.Hash implementations. Other algorithms - // may be available but they cannot be calculated by the digest package. - algorithms = map[Algorithm]crypto.Hash{ - SHA256: crypto.SHA256, - SHA384: crypto.SHA384, - SHA512: crypto.SHA512, - } - - // anchoredEncodedRegexps contains anchored regular expressions for hex-encoded digests. - // Note that /A-F/ disallowed. - anchoredEncodedRegexps = map[Algorithm]*regexp.Regexp{ - SHA256: regexp.MustCompile(`^[a-f0-9]{64}$`), - SHA384: regexp.MustCompile(`^[a-f0-9]{96}$`), - SHA512: regexp.MustCompile(`^[a-f0-9]{128}$`), - } -) - -// Available returns true if the digest type is available for use. If this -// returns false, Digester and Hash will return nil. -func (a Algorithm) Available() bool { - h, ok := algorithms[a] - if !ok { - return false - } - - // check availability of the hash, as well - return h.Available() -} - -func (a Algorithm) String() string { - return string(a) -} - -// Size returns number of bytes returned by the hash. -func (a Algorithm) Size() int { - h, ok := algorithms[a] - if !ok { - return 0 - } - return h.Size() -} - -// Set implemented to allow use of Algorithm as a command line flag. -func (a *Algorithm) Set(value string) error { - if value == "" { - *a = Canonical - } else { - // just do a type conversion, support is queried with Available. - *a = Algorithm(value) - } - - if !a.Available() { - return ErrDigestUnsupported - } - - return nil -} - -// Digester returns a new digester for the specified algorithm. If the algorithm -// does not have a digester implementation, nil will be returned. This can be -// checked by calling Available before calling Digester. -func (a Algorithm) Digester() Digester { - return &digester{ - alg: a, - hash: a.Hash(), - } -} - -// Hash returns a new hash as used by the algorithm. If not available, the -// method will panic. Check Algorithm.Available() before calling. -func (a Algorithm) Hash() hash.Hash { - if !a.Available() { - // Empty algorithm string is invalid - if a == "" { - panic(fmt.Sprintf("empty digest algorithm, validate before calling Algorithm.Hash()")) - } - - // NOTE(stevvooe): A missing hash is usually a programming error that - // must be resolved at compile time. We don't import in the digest - // package to allow users to choose their hash implementation (such as - // when using stevvooe/resumable or a hardware accelerated package). - // - // Applications that may want to resolve the hash at runtime should - // call Algorithm.Available before call Algorithm.Hash(). - panic(fmt.Sprintf("%v not available (make sure it is imported)", a)) - } - - return algorithms[a].New() -} - -// Encode encodes the raw bytes of a digest, typically from a hash.Hash, into -// the encoded portion of the digest. -func (a Algorithm) Encode(d []byte) string { - // TODO(stevvooe): Currently, all algorithms use a hex encoding. When we - // add support for back registration, we can modify this accordingly. - return fmt.Sprintf("%x", d) -} - -// FromReader returns the digest of the reader using the algorithm. -func (a Algorithm) FromReader(rd io.Reader) (Digest, error) { - digester := a.Digester() - - if _, err := io.Copy(digester.Hash(), rd); err != nil { - return "", err - } - - return digester.Digest(), nil -} - -// FromBytes digests the input and returns a Digest. -func (a Algorithm) FromBytes(p []byte) Digest { - digester := a.Digester() - - if _, err := digester.Hash().Write(p); err != nil { - // Writes to a Hash should never fail. None of the existing - // hash implementations in the stdlib or hashes vendored - // here can return errors from Write. Having a panic in this - // condition instead of having FromBytes return an error value - // avoids unnecessary error handling paths in all callers. - panic("write to hash function returned error: " + err.Error()) - } - - return digester.Digest() -} - -// FromString digests the string input and returns a Digest. -func (a Algorithm) FromString(s string) Digest { - return a.FromBytes([]byte(s)) -} - -// Validate validates the encoded portion string -func (a Algorithm) Validate(encoded string) error { - r, ok := anchoredEncodedRegexps[a] - if !ok { - return ErrDigestUnsupported - } - // Digests much always be hex-encoded, ensuring that their hex portion will - // always be size*2 - if a.Size()*2 != len(encoded) { - return ErrDigestInvalidLength - } - if r.MatchString(encoded) { - return nil - } - return ErrDigestInvalidFormat -} diff --git a/vendor/github.com/opencontainers/go-digest/digest.go b/vendor/github.com/opencontainers/go-digest/digest.go deleted file mode 100644 index 518b5e71..00000000 --- a/vendor/github.com/opencontainers/go-digest/digest.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2019, 2020 OCI Contributors -// Copyright 2017 Docker, Inc. -// -// 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 -// -// https://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 digest - -import ( - "fmt" - "hash" - "io" - "regexp" - "strings" -) - -// Digest allows simple protection of hex formatted digest strings, prefixed -// by their algorithm. Strings of type Digest have some guarantee of being in -// the correct format and it provides quick access to the components of a -// digest string. -// -// The following is an example of the contents of Digest types: -// -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc -// -// This allows to abstract the digest behind this type and work only in those -// terms. -type Digest string - -// NewDigest returns a Digest from alg and a hash.Hash object. -func NewDigest(alg Algorithm, h hash.Hash) Digest { - return NewDigestFromBytes(alg, h.Sum(nil)) -} - -// NewDigestFromBytes returns a new digest from the byte contents of p. -// Typically, this can come from hash.Hash.Sum(...) or xxx.SumXXX(...) -// functions. This is also useful for rebuilding digests from binary -// serializations. -func NewDigestFromBytes(alg Algorithm, p []byte) Digest { - return NewDigestFromEncoded(alg, alg.Encode(p)) -} - -// NewDigestFromHex is deprecated. Please use NewDigestFromEncoded. -func NewDigestFromHex(alg, hex string) Digest { - return NewDigestFromEncoded(Algorithm(alg), hex) -} - -// NewDigestFromEncoded returns a Digest from alg and the encoded digest. -func NewDigestFromEncoded(alg Algorithm, encoded string) Digest { - return Digest(fmt.Sprintf("%s:%s", alg, encoded)) -} - -// DigestRegexp matches valid digest types. -var DigestRegexp = regexp.MustCompile(`[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+`) - -// DigestRegexpAnchored matches valid digest types, anchored to the start and end of the match. -var DigestRegexpAnchored = regexp.MustCompile(`^` + DigestRegexp.String() + `$`) - -var ( - // ErrDigestInvalidFormat returned when digest format invalid. - ErrDigestInvalidFormat = fmt.Errorf("invalid checksum digest format") - - // ErrDigestInvalidLength returned when digest has invalid length. - ErrDigestInvalidLength = fmt.Errorf("invalid checksum digest length") - - // ErrDigestUnsupported returned when the digest algorithm is unsupported. - ErrDigestUnsupported = fmt.Errorf("unsupported digest algorithm") -) - -// Parse parses s and returns the validated digest object. An error will -// be returned if the format is invalid. -func Parse(s string) (Digest, error) { - d := Digest(s) - return d, d.Validate() -} - -// FromReader consumes the content of rd until io.EOF, returning canonical digest. -func FromReader(rd io.Reader) (Digest, error) { - return Canonical.FromReader(rd) -} - -// FromBytes digests the input and returns a Digest. -func FromBytes(p []byte) Digest { - return Canonical.FromBytes(p) -} - -// FromString digests the input and returns a Digest. -func FromString(s string) Digest { - return Canonical.FromString(s) -} - -// Validate checks that the contents of d is a valid digest, returning an -// error if not. -func (d Digest) Validate() error { - s := string(d) - i := strings.Index(s, ":") - if i <= 0 || i+1 == len(s) { - return ErrDigestInvalidFormat - } - algorithm, encoded := Algorithm(s[:i]), s[i+1:] - if !algorithm.Available() { - if !DigestRegexpAnchored.MatchString(s) { - return ErrDigestInvalidFormat - } - return ErrDigestUnsupported - } - return algorithm.Validate(encoded) -} - -// Algorithm returns the algorithm portion of the digest. This will panic if -// the underlying digest is not in a valid format. -func (d Digest) Algorithm() Algorithm { - return Algorithm(d[:d.sepIndex()]) -} - -// Verifier returns a writer object that can be used to verify a stream of -// content against the digest. If the digest is invalid, the method will panic. -func (d Digest) Verifier() Verifier { - return hashVerifier{ - hash: d.Algorithm().Hash(), - digest: d, - } -} - -// Encoded returns the encoded portion of the digest. This will panic if the -// underlying digest is not in a valid format. -func (d Digest) Encoded() string { - return string(d[d.sepIndex()+1:]) -} - -// Hex is deprecated. Please use Digest.Encoded. -func (d Digest) Hex() string { - return d.Encoded() -} - -func (d Digest) String() string { - return string(d) -} - -func (d Digest) sepIndex() int { - i := strings.Index(string(d), ":") - - if i < 0 { - panic(fmt.Sprintf("no ':' separator in digest %q", d)) - } - - return i -} diff --git a/vendor/github.com/opencontainers/go-digest/digester.go b/vendor/github.com/opencontainers/go-digest/digester.go deleted file mode 100644 index ede90775..00000000 --- a/vendor/github.com/opencontainers/go-digest/digester.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2019, 2020 OCI Contributors -// Copyright 2017 Docker, Inc. -// -// 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 -// -// https://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 digest - -import "hash" - -// Digester calculates the digest of written data. Writes should go directly -// to the return value of Hash, while calling Digest will return the current -// value of the digest. -type Digester interface { - Hash() hash.Hash // provides direct access to underlying hash instance. - Digest() Digest -} - -// digester provides a simple digester definition that embeds a hasher. -type digester struct { - alg Algorithm - hash hash.Hash -} - -func (d *digester) Hash() hash.Hash { - return d.hash -} - -func (d *digester) Digest() Digest { - return NewDigest(d.alg, d.hash) -} diff --git a/vendor/github.com/opencontainers/go-digest/doc.go b/vendor/github.com/opencontainers/go-digest/doc.go deleted file mode 100644 index 83d3a936..00000000 --- a/vendor/github.com/opencontainers/go-digest/doc.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2019, 2020 OCI Contributors -// Copyright 2017 Docker, Inc. -// -// 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 -// -// https://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 digest provides a generalized type to opaquely represent message -// digests and their operations within the registry. The Digest type is -// designed to serve as a flexible identifier in a content-addressable system. -// More importantly, it provides tools and wrappers to work with -// hash.Hash-based digests with little effort. -// -// Basics -// -// The format of a digest is simply a string with two parts, dubbed the -// "algorithm" and the "digest", separated by a colon: -// -// : -// -// An example of a sha256 digest representation follows: -// -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc -// -// The "algorithm" portion defines both the hashing algorithm used to calculate -// the digest and the encoding of the resulting digest, which defaults to "hex" -// if not otherwise specified. Currently, all supported algorithms have their -// digests encoded in hex strings. -// -// In the example above, the string "sha256" is the algorithm and the hex bytes -// are the "digest". -// -// Because the Digest type is simply a string, once a valid Digest is -// obtained, comparisons are cheap, quick and simple to express with the -// standard equality operator. -// -// Verification -// -// The main benefit of using the Digest type is simple verification against a -// given digest. The Verifier interface, modeled after the stdlib hash.Hash -// interface, provides a common write sink for digest verification. After -// writing is complete, calling the Verifier.Verified method will indicate -// whether or not the stream of bytes matches the target digest. -// -// Missing Features -// -// In addition to the above, we intend to add the following features to this -// package: -// -// 1. A Digester type that supports write sink digest calculation. -// -// 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry. -// -package digest diff --git a/vendor/github.com/opencontainers/go-digest/verifiers.go b/vendor/github.com/opencontainers/go-digest/verifiers.go deleted file mode 100644 index afef506f..00000000 --- a/vendor/github.com/opencontainers/go-digest/verifiers.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2019, 2020 OCI Contributors -// Copyright 2017 Docker, Inc. -// -// 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 -// -// https://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 digest - -import ( - "hash" - "io" -) - -// Verifier presents a general verification interface to be used with message -// digests and other byte stream verifications. Users instantiate a Verifier -// from one of the various methods, write the data under test to it then check -// the result with the Verified method. -type Verifier interface { - io.Writer - - // Verified will return true if the content written to Verifier matches - // the digest. - Verified() bool -} - -type hashVerifier struct { - digest Digest - hash hash.Hash -} - -func (hv hashVerifier) Write(p []byte) (n int, err error) { - return hv.hash.Write(p) -} - -func (hv hashVerifier) Verified() bool { - return hv.digest == NewDigest(hv.digest.Algorithm(), hv.hash) -} diff --git a/vendor/github.com/opencontainers/image-spec/LICENSE b/vendor/github.com/opencontainers/image-spec/LICENSE deleted file mode 100644 index 9fdc20fd..00000000 --- a/vendor/github.com/opencontainers/image-spec/LICENSE +++ /dev/null @@ -1,191 +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 - - Copyright 2016 The Linux Foundation. - - 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/opencontainers/image-spec/specs-go/v1/annotations.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go deleted file mode 100644 index 581cf7cd..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/annotations.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// 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 v1 - -const ( - // AnnotationCreated is the annotation key for the date and time on which the image was built (date-time string as defined by RFC 3339). - AnnotationCreated = "org.opencontainers.image.created" - - // AnnotationAuthors is the annotation key for the contact details of the people or organization responsible for the image (freeform string). - AnnotationAuthors = "org.opencontainers.image.authors" - - // AnnotationURL is the annotation key for the URL to find more information on the image. - AnnotationURL = "org.opencontainers.image.url" - - // AnnotationDocumentation is the annotation key for the URL to get documentation on the image. - AnnotationDocumentation = "org.opencontainers.image.documentation" - - // AnnotationSource is the annotation key for the URL to get source code for building the image. - AnnotationSource = "org.opencontainers.image.source" - - // AnnotationVersion is the annotation key for the version of the packaged software. - // The version MAY match a label or tag in the source code repository. - // The version MAY be Semantic versioning-compatible. - AnnotationVersion = "org.opencontainers.image.version" - - // AnnotationRevision is the annotation key for the source control revision identifier for the packaged software. - AnnotationRevision = "org.opencontainers.image.revision" - - // AnnotationVendor is the annotation key for the name of the distributing entity, organization or individual. - AnnotationVendor = "org.opencontainers.image.vendor" - - // AnnotationLicenses is the annotation key for the license(s) under which contained software is distributed as an SPDX License Expression. - AnnotationLicenses = "org.opencontainers.image.licenses" - - // AnnotationRefName is the annotation key for the name of the reference for a target. - // SHOULD only be considered valid when on descriptors on `index.json` within image layout. - AnnotationRefName = "org.opencontainers.image.ref.name" - - // AnnotationTitle is the annotation key for the human-readable title of the image. - AnnotationTitle = "org.opencontainers.image.title" - - // AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image. - AnnotationDescription = "org.opencontainers.image.description" - - // AnnotationBaseImageDigest is the annotation key for the digest of the image's base image. - AnnotationBaseImageDigest = "org.opencontainers.image.base.digest" - - // AnnotationBaseImageName is the annotation key for the image reference of the image's base image. - AnnotationBaseImageName = "org.opencontainers.image.base.name" -) diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go deleted file mode 100644 index 36b0aeb8..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/config.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// 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 v1 - -import ( - "time" - - digest "github.com/opencontainers/go-digest" -) - -// ImageConfig defines the execution parameters which should be used as a base when running a container using an image. -type ImageConfig struct { - // User defines the username or UID which the process in the container should run as. - User string `json:"User,omitempty"` - - // ExposedPorts a set of ports to expose from a container running this image. - ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` - - // Env is a list of environment variables to be used in a container. - Env []string `json:"Env,omitempty"` - - // Entrypoint defines a list of arguments to use as the command to execute when the container starts. - Entrypoint []string `json:"Entrypoint,omitempty"` - - // Cmd defines the default arguments to the entrypoint of the container. - Cmd []string `json:"Cmd,omitempty"` - - // Volumes is a set of directories describing where the process is likely write data specific to a container instance. - Volumes map[string]struct{} `json:"Volumes,omitempty"` - - // WorkingDir sets the current working directory of the entrypoint process in the container. - WorkingDir string `json:"WorkingDir,omitempty"` - - // Labels contains arbitrary metadata for the container. - Labels map[string]string `json:"Labels,omitempty"` - - // StopSignal contains the system call signal that will be sent to the container to exit. - StopSignal string `json:"StopSignal,omitempty"` - - // ArgsEscaped - // - // Deprecated: This field is present only for legacy compatibility with - // Docker and should not be used by new image builders. It is used by Docker - // for Windows images to indicate that the `Entrypoint` or `Cmd` or both, - // contains only a single element array, that is a pre-escaped, and combined - // into a single string `CommandLine`. If `true` the value in `Entrypoint` or - // `Cmd` should be used as-is to avoid double escaping. - // https://github.com/opencontainers/image-spec/pull/892 - ArgsEscaped bool `json:"ArgsEscaped,omitempty"` -} - -// RootFS describes a layer content addresses -type RootFS struct { - // Type is the type of the rootfs. - Type string `json:"type"` - - // DiffIDs is an array of layer content hashes (DiffIDs), in order from bottom-most to top-most. - DiffIDs []digest.Digest `json:"diff_ids"` -} - -// History describes the history of a layer. -type History struct { - // Created is the combined date and time at which the layer was created, formatted as defined by RFC 3339, section 5.6. - Created *time.Time `json:"created,omitempty"` - - // CreatedBy is the command which created the layer. - CreatedBy string `json:"created_by,omitempty"` - - // Author is the author of the build point. - Author string `json:"author,omitempty"` - - // Comment is a custom message set when creating the layer. - Comment string `json:"comment,omitempty"` - - // EmptyLayer is used to mark if the history item created a filesystem diff. - EmptyLayer bool `json:"empty_layer,omitempty"` -} - -// Image is the JSON structure which describes some basic information about the image. -// This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON. -type Image struct { - // Created is the combined date and time at which the image was created, formatted as defined by RFC 3339, section 5.6. - Created *time.Time `json:"created,omitempty"` - - // Author defines the name and/or email address of the person or entity which created and is responsible for maintaining the image. - Author string `json:"author,omitempty"` - - // Platform describes the platform which the image in the manifest runs on. - Platform - - // Config defines the execution parameters which should be used as a base when running a container using the image. - Config ImageConfig `json:"config,omitempty"` - - // RootFS references the layer content addresses used by the image. - RootFS RootFS `json:"rootfs"` - - // History describes the history of each layer. - History []History `json:"history,omitempty"` -} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go deleted file mode 100644 index 1881b118..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2016-2022 The Linux Foundation -// -// 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 v1 - -import digest "github.com/opencontainers/go-digest" - -// Descriptor describes the disposition of targeted content. -// This structure provides `application/vnd.oci.descriptor.v1+json` mediatype -// when marshalled to JSON. -type Descriptor struct { - // MediaType is the media type of the object this schema refers to. - MediaType string `json:"mediaType"` - - // Digest is the digest of the targeted content. - Digest digest.Digest `json:"digest"` - - // Size specifies the size in bytes of the blob. - Size int64 `json:"size"` - - // URLs specifies a list of URLs from which this object MAY be downloaded - URLs []string `json:"urls,omitempty"` - - // Annotations contains arbitrary metadata relating to the targeted content. - Annotations map[string]string `json:"annotations,omitempty"` - - // Data is an embedding of the targeted content. This is encoded as a base64 - // string when marshalled to JSON (automatically, by encoding/json). If - // present, Data can be used directly to avoid fetching the targeted content. - Data []byte `json:"data,omitempty"` - - // Platform describes the platform which the image in the manifest runs on. - // - // This should only be used when referring to a manifest. - Platform *Platform `json:"platform,omitempty"` - - // ArtifactType is the IANA media type of this artifact. - ArtifactType string `json:"artifactType,omitempty"` -} - -// Platform describes the platform which the image in the manifest runs on. -type Platform struct { - // Architecture field specifies the CPU architecture, for example - // `amd64` or `ppc64le`. - Architecture string `json:"architecture"` - - // OS specifies the operating system, for example `linux` or `windows`. - OS string `json:"os"` - - // OSVersion is an optional field specifying the operating system - // version, for example on Windows `10.0.14393.1066`. - OSVersion string `json:"os.version,omitempty"` - - // OSFeatures is an optional field specifying an array of strings, - // each listing a required OS feature (for example on Windows `win32k`). - OSFeatures []string `json:"os.features,omitempty"` - - // Variant is an optional field specifying a variant of the CPU, for - // example `v7` to specify ARMv7 when architecture is `arm`. - Variant string `json:"variant,omitempty"` -} - -// DescriptorEmptyJSON is the descriptor of a blob with content of `{}`. -var DescriptorEmptyJSON = Descriptor{ - MediaType: MediaTypeEmptyJSON, - Digest: `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`, - Size: 2, - Data: []byte(`{}`), -} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go deleted file mode 100644 index e2bed9d4..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/index.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// 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 v1 - -import "github.com/opencontainers/image-spec/specs-go" - -// Index references manifests for various platforms. -// This structure provides `application/vnd.oci.image.index.v1+json` mediatype when marshalled to JSON. -type Index struct { - specs.Versioned - - // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json` - MediaType string `json:"mediaType,omitempty"` - - // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. - ArtifactType string `json:"artifactType,omitempty"` - - // Manifests references platform specific manifests. - Manifests []Descriptor `json:"manifests"` - - // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. - Subject *Descriptor `json:"subject,omitempty"` - - // Annotations contains arbitrary metadata for the image index. - Annotations map[string]string `json:"annotations,omitempty"` -} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go deleted file mode 100644 index c5503cb3..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/layout.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// 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 v1 - -const ( - // ImageLayoutFile is the file name containing ImageLayout in an OCI Image Layout - ImageLayoutFile = "oci-layout" - // ImageLayoutVersion is the version of ImageLayout - ImageLayoutVersion = "1.0.0" - // ImageIndexFile is the file name of the entry point for references and descriptors in an OCI Image Layout - ImageIndexFile = "index.json" - // ImageBlobsDir is the directory name containing content addressable blobs in an OCI Image Layout - ImageBlobsDir = "blobs" -) - -// ImageLayout is the structure in the "oci-layout" file, found in the root -// of an OCI Image-layout directory. -type ImageLayout struct { - Version string `json:"imageLayoutVersion"` -} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go deleted file mode 100644 index 26fec52a..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/manifest.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2016-2022 The Linux Foundation -// -// 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 v1 - -import "github.com/opencontainers/image-spec/specs-go" - -// Manifest provides `application/vnd.oci.image.manifest.v1+json` mediatype structure when marshalled to JSON. -type Manifest struct { - specs.Versioned - - // MediaType specifies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json` - MediaType string `json:"mediaType,omitempty"` - - // ArtifactType specifies the IANA media type of artifact when the manifest is used for an artifact. - ArtifactType string `json:"artifactType,omitempty"` - - // Config references a configuration object for a container, by digest. - // The referenced configuration object is a JSON blob that the runtime uses to set up the container. - Config Descriptor `json:"config"` - - // Layers is an indexed list of layers referenced by the manifest. - Layers []Descriptor `json:"layers"` - - // Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest. - Subject *Descriptor `json:"subject,omitempty"` - - // Annotations contains arbitrary metadata for the image manifest. - Annotations map[string]string `json:"annotations,omitempty"` -} diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go b/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go deleted file mode 100644 index 892ba3de..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/v1/mediatype.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// 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 v1 - -const ( - // MediaTypeDescriptor specifies the media type for a content descriptor. - MediaTypeDescriptor = "application/vnd.oci.descriptor.v1+json" - - // MediaTypeLayoutHeader specifies the media type for the oci-layout. - MediaTypeLayoutHeader = "application/vnd.oci.layout.header.v1+json" - - // MediaTypeImageManifest specifies the media type for an image manifest. - MediaTypeImageManifest = "application/vnd.oci.image.manifest.v1+json" - - // MediaTypeImageIndex specifies the media type for an image index. - MediaTypeImageIndex = "application/vnd.oci.image.index.v1+json" - - // MediaTypeImageLayer is the media type used for layers referenced by the manifest. - MediaTypeImageLayer = "application/vnd.oci.image.layer.v1.tar" - - // MediaTypeImageLayerGzip is the media type used for gzipped layers - // referenced by the manifest. - MediaTypeImageLayerGzip = "application/vnd.oci.image.layer.v1.tar+gzip" - - // MediaTypeImageLayerZstd is the media type used for zstd compressed - // layers referenced by the manifest. - MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd" - - // MediaTypeImageLayerNonDistributable is the media type for layers referenced by - // the manifest but with distribution restrictions. - // - // Deprecated: Non-distributable layers are deprecated, and not recommended - // for future use. Implementations SHOULD NOT produce new non-distributable - // layers. - // https://github.com/opencontainers/image-spec/pull/965 - MediaTypeImageLayerNonDistributable = "application/vnd.oci.image.layer.nondistributable.v1.tar" - - // MediaTypeImageLayerNonDistributableGzip is the media type for - // gzipped layers referenced by the manifest but with distribution - // restrictions. - // - // Deprecated: Non-distributable layers are deprecated, and not recommended - // for future use. Implementations SHOULD NOT produce new non-distributable - // layers. - // https://github.com/opencontainers/image-spec/pull/965 - MediaTypeImageLayerNonDistributableGzip = "application/vnd.oci.image.layer.nondistributable.v1.tar+gzip" - - // MediaTypeImageLayerNonDistributableZstd is the media type for zstd - // compressed layers referenced by the manifest but with distribution - // restrictions. - // - // Deprecated: Non-distributable layers are deprecated, and not recommended - // for future use. Implementations SHOULD NOT produce new non-distributable - // layers. - // https://github.com/opencontainers/image-spec/pull/965 - MediaTypeImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd" - - // MediaTypeImageConfig specifies the media type for the image configuration. - MediaTypeImageConfig = "application/vnd.oci.image.config.v1+json" - - // MediaTypeEmptyJSON specifies the media type for an unused blob containing the value `{}` - MediaTypeEmptyJSON = "application/vnd.oci.empty.v1+json" -) diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/version.go b/vendor/github.com/opencontainers/image-spec/specs-go/version.go deleted file mode 100644 index 11e09b58..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/version.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// 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 specs - -import "fmt" - -const ( - // VersionMajor is for an API incompatible changes - VersionMajor = 1 - // VersionMinor is for functionality in a backwards-compatible manner - VersionMinor = 1 - // VersionPatch is for backwards-compatible bug fixes - VersionPatch = 0 - - // VersionDev indicates development branch. Releases will be empty string. - VersionDev = "-rc.5" -) - -// Version is the specification version that the package types support. -var Version = fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionDev) diff --git a/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go b/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go deleted file mode 100644 index 58a1510f..00000000 --- a/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2016 The Linux Foundation -// -// 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 specs - -// Versioned provides a struct with the manifest schemaVersion and mediaType. -// Incoming content with unknown schema version can be decoded against this -// struct to check the version. -type Versioned struct { - // SchemaVersion is the image manifest schema that this image follows - SchemaVersion int `json:"schemaVersion"` -} diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore deleted file mode 100644 index 1fb13abe..00000000 --- a/vendor/github.com/sirupsen/logrus/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -logrus -vendor - -.idea/ diff --git a/vendor/github.com/sirupsen/logrus/.golangci.yml b/vendor/github.com/sirupsen/logrus/.golangci.yml deleted file mode 100644 index 65dc2850..00000000 --- a/vendor/github.com/sirupsen/logrus/.golangci.yml +++ /dev/null @@ -1,40 +0,0 @@ -run: - # do not run on test files yet - tests: false - -# all available settings of specific linters -linters-settings: - errcheck: - # report about not checking of errors in type assetions: `a := b.(MyStruct)`; - # default is false: such cases aren't reported by default. - check-type-assertions: false - - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; - # default is false: such cases aren't reported by default. - check-blank: false - - lll: - line-length: 100 - tab-width: 4 - - prealloc: - simple: false - range-loops: false - for-loops: false - - whitespace: - multi-if: false # Enforces newlines (or comments) after every multi-line if statement - multi-func: false # Enforces newlines (or comments) after every multi-line function signature - -linters: - enable: - - megacheck - - govet - disable: - - maligned - - prealloc - disable-all: false - presets: - - bugs - - unused - fast: false diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml deleted file mode 100644 index c1dbd5a3..00000000 --- a/vendor/github.com/sirupsen/logrus/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: go -go_import_path: github.com/sirupsen/logrus -git: - depth: 1 -env: - - GO111MODULE=on -go: 1.15.x -os: linux -install: - - ./travis/install.sh -script: - - cd ci - - go run mage.go -v -w ../ crossBuild - - go run mage.go -v -w ../ lint - - go run mage.go -v -w ../ test diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md deleted file mode 100644 index 7567f612..00000000 --- a/vendor/github.com/sirupsen/logrus/CHANGELOG.md +++ /dev/null @@ -1,259 +0,0 @@ -# 1.8.1 -Code quality: - * move magefile in its own subdir/submodule to remove magefile dependency on logrus consumer - * improve timestamp format documentation - -Fixes: - * fix race condition on logger hooks - - -# 1.8.0 - -Correct versioning number replacing v1.7.1. - -# 1.7.1 - -Beware this release has introduced a new public API and its semver is therefore incorrect. - -Code quality: - * use go 1.15 in travis - * use magefile as task runner - -Fixes: - * small fixes about new go 1.13 error formatting system - * Fix for long time race condiction with mutating data hooks - -Features: - * build support for zos - -# 1.7.0 -Fixes: - * the dependency toward a windows terminal library has been removed - -Features: - * a new buffer pool management API has been added - * a set of `Fn()` functions have been added - -# 1.6.0 -Fixes: - * end of line cleanup - * revert the entry concurrency bug fix whic leads to deadlock under some circumstances - * update dependency on go-windows-terminal-sequences to fix a crash with go 1.14 - -Features: - * add an option to the `TextFormatter` to completely disable fields quoting - -# 1.5.0 -Code quality: - * add golangci linter run on travis - -Fixes: - * add mutex for hooks concurrent access on `Entry` data - * caller function field for go1.14 - * fix build issue for gopherjs target - -Feature: - * add an hooks/writer sub-package whose goal is to split output on different stream depending on the trace level - * add a `DisableHTMLEscape` option in the `JSONFormatter` - * add `ForceQuote` and `PadLevelText` options in the `TextFormatter` - -# 1.4.2 - * Fixes build break for plan9, nacl, solaris -# 1.4.1 -This new release introduces: - * Enhance TextFormatter to not print caller information when they are empty (#944) - * Remove dependency on golang.org/x/crypto (#932, #943) - -Fixes: - * Fix Entry.WithContext method to return a copy of the initial entry (#941) - -# 1.4.0 -This new release introduces: - * Add `DeferExitHandler`, similar to `RegisterExitHandler` but prepending the handler to the list of handlers (semantically like `defer`) (#848). - * Add `CallerPrettyfier` to `JSONFormatter` and `TextFormatter` (#909, #911) - * Add `Entry.WithContext()` and `Entry.Context`, to set a context on entries to be used e.g. in hooks (#919). - -Fixes: - * Fix wrong method calls `Logger.Print` and `Logger.Warningln` (#893). - * Update `Entry.Logf` to not do string formatting unless the log level is enabled (#903) - * Fix infinite recursion on unknown `Level.String()` (#907) - * Fix race condition in `getCaller` (#916). - - -# 1.3.0 -This new release introduces: - * Log, Logf, Logln functions for Logger and Entry that take a Level - -Fixes: - * Building prometheus node_exporter on AIX (#840) - * Race condition in TextFormatter (#468) - * Travis CI import path (#868) - * Remove coloured output on Windows (#862) - * Pointer to func as field in JSONFormatter (#870) - * Properly marshal Levels (#873) - -# 1.2.0 -This new release introduces: - * A new method `SetReportCaller` in the `Logger` to enable the file, line and calling function from which the trace has been issued - * A new trace level named `Trace` whose level is below `Debug` - * A configurable exit function to be called upon a Fatal trace - * The `Level` object now implements `encoding.TextUnmarshaler` interface - -# 1.1.1 -This is a bug fix release. - * fix the build break on Solaris - * don't drop a whole trace in JSONFormatter when a field param is a function pointer which can not be serialized - -# 1.1.0 -This new release introduces: - * several fixes: - * a fix for a race condition on entry formatting - * proper cleanup of previously used entries before putting them back in the pool - * the extra new line at the end of message in text formatter has been removed - * a new global public API to check if a level is activated: IsLevelEnabled - * the following methods have been added to the Logger object - * IsLevelEnabled - * SetFormatter - * SetOutput - * ReplaceHooks - * introduction of go module - * an indent configuration for the json formatter - * output colour support for windows - * the field sort function is now configurable for text formatter - * the CLICOLOR and CLICOLOR\_FORCE environment variable support in text formater - -# 1.0.6 - -This new release introduces: - * a new api WithTime which allows to easily force the time of the log entry - which is mostly useful for logger wrapper - * a fix reverting the immutability of the entry given as parameter to the hooks - a new configuration field of the json formatter in order to put all the fields - in a nested dictionnary - * a new SetOutput method in the Logger - * a new configuration of the textformatter to configure the name of the default keys - * a new configuration of the text formatter to disable the level truncation - -# 1.0.5 - -* Fix hooks race (#707) -* Fix panic deadlock (#695) - -# 1.0.4 - -* Fix race when adding hooks (#612) -* Fix terminal check in AppEngine (#635) - -# 1.0.3 - -* Replace example files with testable examples - -# 1.0.2 - -* bug: quote non-string values in text formatter (#583) -* Make (*Logger) SetLevel a public method - -# 1.0.1 - -* bug: fix escaping in text formatter (#575) - -# 1.0.0 - -* Officially changed name to lower-case -* bug: colors on Windows 10 (#541) -* bug: fix race in accessing level (#512) - -# 0.11.5 - -* feature: add writer and writerlevel to entry (#372) - -# 0.11.4 - -* bug: fix undefined variable on solaris (#493) - -# 0.11.3 - -* formatter: configure quoting of empty values (#484) -* formatter: configure quoting character (default is `"`) (#484) -* bug: fix not importing io correctly in non-linux environments (#481) - -# 0.11.2 - -* bug: fix windows terminal detection (#476) - -# 0.11.1 - -* bug: fix tty detection with custom out (#471) - -# 0.11.0 - -* performance: Use bufferpool to allocate (#370) -* terminal: terminal detection for app-engine (#343) -* feature: exit handler (#375) - -# 0.10.0 - -* feature: Add a test hook (#180) -* feature: `ParseLevel` is now case-insensitive (#326) -* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308) -* performance: avoid re-allocations on `WithFields` (#335) - -# 0.9.0 - -* logrus/text_formatter: don't emit empty msg -* logrus/hooks/airbrake: move out of main repository -* logrus/hooks/sentry: move out of main repository -* logrus/hooks/papertrail: move out of main repository -* logrus/hooks/bugsnag: move out of main repository -* logrus/core: run tests with `-race` -* logrus/core: detect TTY based on `stderr` -* logrus/core: support `WithError` on logger -* logrus/core: Solaris support - -# 0.8.7 - -* logrus/core: fix possible race (#216) -* logrus/doc: small typo fixes and doc improvements - - -# 0.8.6 - -* hooks/raven: allow passing an initialized client - -# 0.8.5 - -* logrus/core: revert #208 - -# 0.8.4 - -* formatter/text: fix data race (#218) - -# 0.8.3 - -* logrus/core: fix entry log level (#208) -* logrus/core: improve performance of text formatter by 40% -* logrus/core: expose `LevelHooks` type -* logrus/core: add support for DragonflyBSD and NetBSD -* formatter/text: print structs more verbosely - -# 0.8.2 - -* logrus: fix more Fatal family functions - -# 0.8.1 - -* logrus: fix not exiting on `Fatalf` and `Fatalln` - -# 0.8.0 - -* logrus: defaults to stderr instead of stdout -* hooks/sentry: add special field for `*http.Request` -* formatter/text: ignore Windows for colors - -# 0.7.3 - -* formatter/\*: allow configuration of timestamp layout - -# 0.7.2 - -* formatter/text: Add configuration option for time format (#158) diff --git a/vendor/github.com/sirupsen/logrus/LICENSE b/vendor/github.com/sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb42..00000000 --- a/vendor/github.com/sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md deleted file mode 100644 index d1d4a85f..00000000 --- a/vendor/github.com/sirupsen/logrus/README.md +++ /dev/null @@ -1,515 +0,0 @@ -# Logrus :walrus: [![Build Status](https://github.com/sirupsen/logrus/workflows/CI/badge.svg)](https://github.com/sirupsen/logrus/actions?query=workflow%3ACI) [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![Go Reference](https://pkg.go.dev/badge/github.com/sirupsen/logrus.svg)](https://pkg.go.dev/github.com/sirupsen/logrus) - -Logrus is a structured logger for Go (golang), completely API compatible with -the standard library logger. - -**Logrus is in maintenance-mode.** We will not be introducing new features. It's -simply too hard to do in a way that won't break many people's projects, which is -the last thing you want from your Logging library (again...). - -This does not mean Logrus is dead. Logrus will continue to be maintained for -security, (backwards compatible) bug fixes, and performance (where we are -limited by the interface). - -I believe Logrus' biggest contribution is to have played a part in today's -widespread use of structured logging in Golang. There doesn't seem to be a -reason to do a major, breaking iteration into Logrus V2, since the fantastic Go -community has built those independently. Many fantastic alternatives have sprung -up. Logrus would look like those, had it been re-designed with what we know -about structured logging in Go today. Check out, for example, -[Zerolog][zerolog], [Zap][zap], and [Apex][apex]. - -[zerolog]: https://github.com/rs/zerolog -[zap]: https://github.com/uber-go/zap -[apex]: https://github.com/apex/log - -**Seeing weird case-sensitive problems?** It's in the past been possible to -import Logrus as both upper- and lower-case. Due to the Go package environment, -this caused issues in the community and we needed a standard. Some environments -experienced problems with the upper-case variant, so the lower-case was decided. -Everything using `logrus` will need to use the lower-case: -`github.com/sirupsen/logrus`. Any package that isn't, should be changed. - -To fix Glide, see [these -comments](https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437). -For an in-depth explanation of the casing issue, see [this -comment](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276). - -Nicely color-coded in development (when a TTY is attached, otherwise just -plain text): - -![Colored](http://i.imgur.com/PY7qMwd.png) - -With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash -or Splunk: - -```text -{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the -ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"} - -{"level":"warning","msg":"The group's number increased tremendously!", -"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"} - -{"animal":"walrus","level":"info","msg":"A giant walrus appears!", -"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"} - -{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.", -"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"} - -{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true, -"time":"2014-03-10 19:57:38.562543128 -0400 EDT"} -``` - -With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not -attached, the output is compatible with the -[logfmt](http://godoc.org/github.com/kr/logfmt) format: - -```text -time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8 -time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 -time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true -time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4 -time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009 -time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true -``` -To ensure this behaviour even if a TTY is attached, set your formatter as follows: - -```go - log.SetFormatter(&log.TextFormatter{ - DisableColors: true, - FullTimestamp: true, - }) -``` - -#### Logging Method Name - -If you wish to add the calling method as a field, instruct the logger via: -```go -log.SetReportCaller(true) -``` -This adds the caller as 'method' like so: - -```json -{"animal":"penguin","level":"fatal","method":"github.com/sirupsen/arcticcreatures.migrate","msg":"a penguin swims by", -"time":"2014-03-10 19:57:38.562543129 -0400 EDT"} -``` - -```text -time="2015-03-26T01:27:38-04:00" level=fatal method=github.com/sirupsen/arcticcreatures.migrate msg="a penguin swims by" animal=penguin -``` -Note that this does add measurable overhead - the cost will depend on the version of Go, but is -between 20 and 40% in recent tests with 1.6 and 1.7. You can validate this in your -environment via benchmarks: -``` -go test -bench=.*CallerTracing -``` - - -#### Case-sensitivity - -The organization's name was changed to lower-case--and this will not be changed -back. If you are getting import conflicts due to case sensitivity, please use -the lower-case import: `github.com/sirupsen/logrus`. - -#### Example - -The simplest way to use Logrus is simply the package-level exported logger: - -```go -package main - -import ( - log "github.com/sirupsen/logrus" -) - -func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - }).Info("A walrus appears") -} -``` - -Note that it's completely api-compatible with the stdlib logger, so you can -replace your `log` imports everywhere with `log "github.com/sirupsen/logrus"` -and you'll now have the flexibility of Logrus. You can customize it all you -want: - -```go -package main - -import ( - "os" - log "github.com/sirupsen/logrus" -) - -func init() { - // Log as JSON instead of the default ASCII formatter. - log.SetFormatter(&log.JSONFormatter{}) - - // Output to stdout instead of the default stderr - // Can be any io.Writer, see below for File example - log.SetOutput(os.Stdout) - - // Only log the warning severity or above. - log.SetLevel(log.WarnLevel) -} - -func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") - - log.WithFields(log.Fields{ - "omg": true, - "number": 122, - }).Warn("The group's number increased tremendously!") - - log.WithFields(log.Fields{ - "omg": true, - "number": 100, - }).Fatal("The ice breaks!") - - // A common pattern is to re-use fields between logging statements by re-using - // the logrus.Entry returned from WithFields() - contextLogger := log.WithFields(log.Fields{ - "common": "this is a common field", - "other": "I also should be logged always", - }) - - contextLogger.Info("I'll be logged with common and other field") - contextLogger.Info("Me too") -} -``` - -For more advanced usage such as logging to multiple locations from the same -application, you can also create an instance of the `logrus` Logger: - -```go -package main - -import ( - "os" - "github.com/sirupsen/logrus" -) - -// Create a new instance of the logger. You can have any number of instances. -var log = logrus.New() - -func main() { - // The API for setting attributes is a little different than the package level - // exported logger. See Godoc. - log.Out = os.Stdout - - // You could set this to any `io.Writer` such as a file - // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) - // if err == nil { - // log.Out = file - // } else { - // log.Info("Failed to log to file, using default stderr") - // } - - log.WithFields(logrus.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") -} -``` - -#### Fields - -Logrus encourages careful, structured logging through logging fields instead of -long, unparseable error messages. For example, instead of: `log.Fatalf("Failed -to send event %s to topic %s with key %d")`, you should log the much more -discoverable: - -```go -log.WithFields(log.Fields{ - "event": event, - "topic": topic, - "key": key, -}).Fatal("Failed to send event") -``` - -We've found this API forces you to think about logging in a way that produces -much more useful logging messages. We've been in countless situations where just -a single added field to a log statement that was already there would've saved us -hours. The `WithFields` call is optional. - -In general, with Logrus using any of the `printf`-family functions should be -seen as a hint you should add a field, however, you can still use the -`printf`-family functions with Logrus. - -#### Default Fields - -Often it's helpful to have fields _always_ attached to log statements in an -application or parts of one. For example, you may want to always log the -`request_id` and `user_ip` in the context of a request. Instead of writing -`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on -every line, you can create a `logrus.Entry` to pass around instead: - -```go -requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip}) -requestLogger.Info("something happened on that request") # will log request_id and user_ip -requestLogger.Warn("something not great happened") -``` - -#### Hooks - -You can add hooks for logging levels. For example to send errors to an exception -tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to -multiple places simultaneously, e.g. syslog. - -Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in -`init`: - -```go -import ( - log "github.com/sirupsen/logrus" - "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "airbrake" - logrus_syslog "github.com/sirupsen/logrus/hooks/syslog" - "log/syslog" -) - -func init() { - - // Use the Airbrake hook to report errors that have Error severity or above to - // an exception tracker. You can create custom hooks, see the Hooks section. - log.AddHook(airbrake.NewHook(123, "xyz", "production")) - - hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") - if err != nil { - log.Error("Unable to connect to local syslog daemon") - } else { - log.AddHook(hook) - } -} -``` -Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md). - -A list of currently known service hooks can be found in this wiki [page](https://github.com/sirupsen/logrus/wiki/Hooks) - - -#### Level logging - -Logrus has seven logging levels: Trace, Debug, Info, Warning, Error, Fatal and Panic. - -```go -log.Trace("Something very low level.") -log.Debug("Useful debugging information.") -log.Info("Something noteworthy happened!") -log.Warn("You should probably take a look at this.") -log.Error("Something failed but I'm not quitting.") -// Calls os.Exit(1) after logging -log.Fatal("Bye.") -// Calls panic() after logging -log.Panic("I'm bailing.") -``` - -You can set the logging level on a `Logger`, then it will only log entries with -that severity or anything above it: - -```go -// Will log anything that is info or above (warn, error, fatal, panic). Default. -log.SetLevel(log.InfoLevel) -``` - -It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose -environment if your application has that. - -Note: If you want different log levels for global (`log.SetLevel(...)`) and syslog logging, please check the [syslog hook README](hooks/syslog/README.md#different-log-levels-for-local-and-remote-logging). - -#### Entries - -Besides the fields added with `WithField` or `WithFields` some fields are -automatically added to all logging events: - -1. `time`. The timestamp when the entry was created. -2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after - the `AddFields` call. E.g. `Failed to send event.` -3. `level`. The logging level. E.g. `info`. - -#### Environments - -Logrus has no notion of environment. - -If you wish for hooks and formatters to only be used in specific environments, -you should handle that yourself. For example, if your application has a global -variable `Environment`, which is a string representation of the environment you -could do: - -```go -import ( - log "github.com/sirupsen/logrus" -) - -func init() { - // do something here to set environment depending on an environment variable - // or command-line flag - if Environment == "production" { - log.SetFormatter(&log.JSONFormatter{}) - } else { - // The TextFormatter is default, you don't actually have to do this. - log.SetFormatter(&log.TextFormatter{}) - } -} -``` - -This configuration is how `logrus` was intended to be used, but JSON in -production is mostly only useful if you do log aggregation with tools like -Splunk or Logstash. - -#### Formatters - -The built-in logging formatters are: - -* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise - without colors. - * *Note:* to force colored output when there is no TTY, set the `ForceColors` - field to `true`. To force no colored output even if there is a TTY set the - `DisableColors` field to `true`. For Windows, see - [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable). - * When colors are enabled, levels are truncated to 4 characters by default. To disable - truncation set the `DisableLevelTruncation` field to `true`. - * When outputting to a TTY, it's often helpful to visually scan down a column where all the levels are the same width. Setting the `PadLevelText` field to `true` enables this behavior, by adding padding to the level text. - * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter). -* `logrus.JSONFormatter`. Logs fields as JSON. - * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter). - -Third party logging formatters: - -* [`FluentdFormatter`](https://github.com/joonix/log). Formats entries that can be parsed by Kubernetes and Google Container Engine. -* [`GELF`](https://github.com/fabienm/go-logrus-formatters). Formats entries so they comply to Graylog's [GELF 1.1 specification](http://docs.graylog.org/en/2.4/pages/gelf.html). -* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events. -* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout. -* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the Power of Zalgo. -* [`nested-logrus-formatter`](https://github.com/antonfisher/nested-logrus-formatter). Converts logrus fields to a nested structure. -* [`powerful-logrus-formatter`](https://github.com/zput/zxcTool). get fileName, log's line number and the latest function's name when print log; Sava log to files. -* [`caption-json-formatter`](https://github.com/nolleh/caption_json_formatter). logrus's message json formatter with human-readable caption added. - -You can define your formatter by implementing the `Formatter` interface, -requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a -`Fields` type (`map[string]interface{}`) with all your fields as well as the -default ones (see Entries section above): - -```go -type MyJSONFormatter struct { -} - -log.SetFormatter(new(MyJSONFormatter)) - -func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) { - // Note this doesn't include Time, Level and Message which are available on - // the Entry. Consult `godoc` on information about those fields or read the - // source of the official loggers. - serialized, err := json.Marshal(entry.Data) - if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %w", err) - } - return append(serialized, '\n'), nil -} -``` - -#### Logger as an `io.Writer` - -Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it. - -```go -w := logger.Writer() -defer w.Close() - -srv := http.Server{ - // create a stdlib log.Logger that writes to - // logrus.Logger. - ErrorLog: log.New(w, "", 0), -} -``` - -Each line written to that writer will be printed the usual way, using formatters -and hooks. The level for those entries is `info`. - -This means that we can override the standard library logger easily: - -```go -logger := logrus.New() -logger.Formatter = &logrus.JSONFormatter{} - -// Use logrus for standard log output -// Note that `log` here references stdlib's log -// Not logrus imported under the name `log`. -log.SetOutput(logger.Writer()) -``` - -#### Rotation - -Log rotation is not provided with Logrus. Log rotation should be done by an -external program (like `logrotate(8)`) that can compress and delete old log -entries. It should not be a feature of the application-level logger. - -#### Tools - -| Tool | Description | -| ---- | ----------- | -|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will be generated with different configs in different environments.| -|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) | - -#### Testing - -Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides: - -* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just adds the `test` hook -* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any): - -```go -import( - "github.com/sirupsen/logrus" - "github.com/sirupsen/logrus/hooks/test" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestSomething(t*testing.T){ - logger, hook := test.NewNullLogger() - logger.Error("Helloerror") - - assert.Equal(t, 1, len(hook.Entries)) - assert.Equal(t, logrus.ErrorLevel, hook.LastEntry().Level) - assert.Equal(t, "Helloerror", hook.LastEntry().Message) - - hook.Reset() - assert.Nil(t, hook.LastEntry()) -} -``` - -#### Fatal handlers - -Logrus can register one or more functions that will be called when any `fatal` -level message is logged. The registered handlers will be executed before -logrus performs an `os.Exit(1)`. This behavior may be helpful if callers need -to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted. - -``` -... -handler := func() { - // gracefully shutdown something... -} -logrus.RegisterExitHandler(handler) -... -``` - -#### Thread safety - -By default, Logger is protected by a mutex for concurrent writes. The mutex is held when calling hooks and writing logs. -If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking. - -Situation when locking is not needed includes: - -* You have no hooks registered, or hooks calling is already thread-safe. - -* Writing to logger.Out is already thread-safe, for example: - - 1) logger.Out is protected by locks. - - 2) logger.Out is an os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allows multi-thread/multi-process writing) - - (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/) diff --git a/vendor/github.com/sirupsen/logrus/alt_exit.go b/vendor/github.com/sirupsen/logrus/alt_exit.go deleted file mode 100644 index 8fd189e1..00000000 --- a/vendor/github.com/sirupsen/logrus/alt_exit.go +++ /dev/null @@ -1,76 +0,0 @@ -package logrus - -// The following code was sourced and modified from the -// https://github.com/tebeka/atexit package governed by the following license: -// -// Copyright (c) 2012 Miki Tebeka . -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -import ( - "fmt" - "os" -) - -var handlers = []func(){} - -func runHandler(handler func()) { - defer func() { - if err := recover(); err != nil { - fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err) - } - }() - - handler() -} - -func runHandlers() { - for _, handler := range handlers { - runHandler(handler) - } -} - -// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code) -func Exit(code int) { - runHandlers() - os.Exit(code) -} - -// RegisterExitHandler appends a Logrus Exit handler to the list of handlers, -// call logrus.Exit to invoke all handlers. The handlers will also be invoked when -// any Fatal log entry is made. -// -// This method is useful when a caller wishes to use logrus to log a fatal -// message but also needs to gracefully shutdown. An example usecase could be -// closing database connections, or sending a alert that the application is -// closing. -func RegisterExitHandler(handler func()) { - handlers = append(handlers, handler) -} - -// DeferExitHandler prepends a Logrus Exit handler to the list of handlers, -// call logrus.Exit to invoke all handlers. The handlers will also be invoked when -// any Fatal log entry is made. -// -// This method is useful when a caller wishes to use logrus to log a fatal -// message but also needs to gracefully shutdown. An example usecase could be -// closing database connections, or sending a alert that the application is -// closing. -func DeferExitHandler(handler func()) { - handlers = append([]func(){handler}, handlers...) -} diff --git a/vendor/github.com/sirupsen/logrus/appveyor.yml b/vendor/github.com/sirupsen/logrus/appveyor.yml deleted file mode 100644 index df9d65c3..00000000 --- a/vendor/github.com/sirupsen/logrus/appveyor.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: "{build}" -platform: x64 -clone_folder: c:\gopath\src\github.com\sirupsen\logrus -environment: - GOPATH: c:\gopath -branches: - only: - - master -install: - - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - - go version -build_script: - - go get -t - - go test diff --git a/vendor/github.com/sirupsen/logrus/buffer_pool.go b/vendor/github.com/sirupsen/logrus/buffer_pool.go deleted file mode 100644 index c7787f77..00000000 --- a/vendor/github.com/sirupsen/logrus/buffer_pool.go +++ /dev/null @@ -1,43 +0,0 @@ -package logrus - -import ( - "bytes" - "sync" -) - -var ( - bufferPool BufferPool -) - -type BufferPool interface { - Put(*bytes.Buffer) - Get() *bytes.Buffer -} - -type defaultPool struct { - pool *sync.Pool -} - -func (p *defaultPool) Put(buf *bytes.Buffer) { - p.pool.Put(buf) -} - -func (p *defaultPool) Get() *bytes.Buffer { - return p.pool.Get().(*bytes.Buffer) -} - -// SetBufferPool allows to replace the default logrus buffer pool -// to better meets the specific needs of an application. -func SetBufferPool(bp BufferPool) { - bufferPool = bp -} - -func init() { - SetBufferPool(&defaultPool{ - pool: &sync.Pool{ - New: func() interface{} { - return new(bytes.Buffer) - }, - }, - }) -} diff --git a/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go deleted file mode 100644 index da67aba0..00000000 --- a/vendor/github.com/sirupsen/logrus/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Package logrus is a structured logger for Go, completely API compatible with the standard library logger. - - -The simplest way to use Logrus is simply the package-level exported logger: - - package main - - import ( - log "github.com/sirupsen/logrus" - ) - - func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "number": 1, - "size": 10, - }).Info("A walrus appears") - } - -Output: - time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 - -For a full guide visit https://github.com/sirupsen/logrus -*/ -package logrus diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go deleted file mode 100644 index 71cdbbc3..00000000 --- a/vendor/github.com/sirupsen/logrus/entry.go +++ /dev/null @@ -1,442 +0,0 @@ -package logrus - -import ( - "bytes" - "context" - "fmt" - "os" - "reflect" - "runtime" - "strings" - "sync" - "time" -) - -var ( - - // qualified package name, cached at first use - logrusPackage string - - // Positions in the call stack when tracing to report the calling method - minimumCallerDepth int - - // Used for caller information initialisation - callerInitOnce sync.Once -) - -const ( - maximumCallerDepth int = 25 - knownLogrusFrames int = 4 -) - -func init() { - // start at the bottom of the stack before the package-name cache is primed - minimumCallerDepth = 1 -} - -// Defines the key when adding errors using WithError. -var ErrorKey = "error" - -// An entry is the final or intermediate Logrus logging entry. It contains all -// the fields passed with WithField{,s}. It's finally logged when Trace, Debug, -// Info, Warn, Error, Fatal or Panic is called on it. These objects can be -// reused and passed around as much as you wish to avoid field duplication. -type Entry struct { - Logger *Logger - - // Contains all the fields set by the user. - Data Fields - - // Time at which the log entry was created - Time time.Time - - // Level the log entry was logged at: Trace, Debug, Info, Warn, Error, Fatal or Panic - // This field will be set on entry firing and the value will be equal to the one in Logger struct field. - Level Level - - // Calling method, with package name - Caller *runtime.Frame - - // Message passed to Trace, Debug, Info, Warn, Error, Fatal or Panic - Message string - - // When formatter is called in entry.log(), a Buffer may be set to entry - Buffer *bytes.Buffer - - // Contains the context set by the user. Useful for hook processing etc. - Context context.Context - - // err may contain a field formatting error - err string -} - -func NewEntry(logger *Logger) *Entry { - return &Entry{ - Logger: logger, - // Default is three fields, plus one optional. Give a little extra room. - Data: make(Fields, 6), - } -} - -func (entry *Entry) Dup() *Entry { - data := make(Fields, len(entry.Data)) - for k, v := range entry.Data { - data[k] = v - } - return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, Context: entry.Context, err: entry.err} -} - -// Returns the bytes representation of this entry from the formatter. -func (entry *Entry) Bytes() ([]byte, error) { - return entry.Logger.Formatter.Format(entry) -} - -// Returns the string representation from the reader and ultimately the -// formatter. -func (entry *Entry) String() (string, error) { - serialized, err := entry.Bytes() - if err != nil { - return "", err - } - str := string(serialized) - return str, nil -} - -// Add an error as single field (using the key defined in ErrorKey) to the Entry. -func (entry *Entry) WithError(err error) *Entry { - return entry.WithField(ErrorKey, err) -} - -// Add a context to the Entry. -func (entry *Entry) WithContext(ctx context.Context) *Entry { - dataCopy := make(Fields, len(entry.Data)) - for k, v := range entry.Data { - dataCopy[k] = v - } - return &Entry{Logger: entry.Logger, Data: dataCopy, Time: entry.Time, err: entry.err, Context: ctx} -} - -// Add a single field to the Entry. -func (entry *Entry) WithField(key string, value interface{}) *Entry { - return entry.WithFields(Fields{key: value}) -} - -// Add a map of fields to the Entry. -func (entry *Entry) WithFields(fields Fields) *Entry { - data := make(Fields, len(entry.Data)+len(fields)) - for k, v := range entry.Data { - data[k] = v - } - fieldErr := entry.err - for k, v := range fields { - isErrField := false - if t := reflect.TypeOf(v); t != nil { - switch { - case t.Kind() == reflect.Func, t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Func: - isErrField = true - } - } - if isErrField { - tmp := fmt.Sprintf("can not add field %q", k) - if fieldErr != "" { - fieldErr = entry.err + ", " + tmp - } else { - fieldErr = tmp - } - } else { - data[k] = v - } - } - return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, err: fieldErr, Context: entry.Context} -} - -// Overrides the time of the Entry. -func (entry *Entry) WithTime(t time.Time) *Entry { - dataCopy := make(Fields, len(entry.Data)) - for k, v := range entry.Data { - dataCopy[k] = v - } - return &Entry{Logger: entry.Logger, Data: dataCopy, Time: t, err: entry.err, Context: entry.Context} -} - -// getPackageName reduces a fully qualified function name to the package name -// There really ought to be to be a better way... -func getPackageName(f string) string { - for { - lastPeriod := strings.LastIndex(f, ".") - lastSlash := strings.LastIndex(f, "/") - if lastPeriod > lastSlash { - f = f[:lastPeriod] - } else { - break - } - } - - return f -} - -// getCaller retrieves the name of the first non-logrus calling function -func getCaller() *runtime.Frame { - // cache this package's fully-qualified name - callerInitOnce.Do(func() { - pcs := make([]uintptr, maximumCallerDepth) - _ = runtime.Callers(0, pcs) - - // dynamic get the package name and the minimum caller depth - for i := 0; i < maximumCallerDepth; i++ { - funcName := runtime.FuncForPC(pcs[i]).Name() - if strings.Contains(funcName, "getCaller") { - logrusPackage = getPackageName(funcName) - break - } - } - - minimumCallerDepth = knownLogrusFrames - }) - - // Restrict the lookback frames to avoid runaway lookups - pcs := make([]uintptr, maximumCallerDepth) - depth := runtime.Callers(minimumCallerDepth, pcs) - frames := runtime.CallersFrames(pcs[:depth]) - - for f, again := frames.Next(); again; f, again = frames.Next() { - pkg := getPackageName(f.Function) - - // If the caller isn't part of this package, we're done - if pkg != logrusPackage { - return &f //nolint:scopelint - } - } - - // if we got here, we failed to find the caller's context - return nil -} - -func (entry Entry) HasCaller() (has bool) { - return entry.Logger != nil && - entry.Logger.ReportCaller && - entry.Caller != nil -} - -func (entry *Entry) log(level Level, msg string) { - var buffer *bytes.Buffer - - newEntry := entry.Dup() - - if newEntry.Time.IsZero() { - newEntry.Time = time.Now() - } - - newEntry.Level = level - newEntry.Message = msg - - newEntry.Logger.mu.Lock() - reportCaller := newEntry.Logger.ReportCaller - bufPool := newEntry.getBufferPool() - newEntry.Logger.mu.Unlock() - - if reportCaller { - newEntry.Caller = getCaller() - } - - newEntry.fireHooks() - buffer = bufPool.Get() - defer func() { - newEntry.Buffer = nil - buffer.Reset() - bufPool.Put(buffer) - }() - buffer.Reset() - newEntry.Buffer = buffer - - newEntry.write() - - newEntry.Buffer = nil - - // To avoid Entry#log() returning a value that only would make sense for - // panic() to use in Entry#Panic(), we avoid the allocation by checking - // directly here. - if level <= PanicLevel { - panic(newEntry) - } -} - -func (entry *Entry) getBufferPool() (pool BufferPool) { - if entry.Logger.BufferPool != nil { - return entry.Logger.BufferPool - } - return bufferPool -} - -func (entry *Entry) fireHooks() { - var tmpHooks LevelHooks - entry.Logger.mu.Lock() - tmpHooks = make(LevelHooks, len(entry.Logger.Hooks)) - for k, v := range entry.Logger.Hooks { - tmpHooks[k] = v - } - entry.Logger.mu.Unlock() - - err := tmpHooks.Fire(entry.Level, entry) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err) - } -} - -func (entry *Entry) write() { - entry.Logger.mu.Lock() - defer entry.Logger.mu.Unlock() - serialized, err := entry.Logger.Formatter.Format(entry) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) - return - } - if _, err := entry.Logger.Out.Write(serialized); err != nil { - fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) - } -} - -// Log will log a message at the level given as parameter. -// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit. -// For this behaviour Entry.Panic or Entry.Fatal should be used instead. -func (entry *Entry) Log(level Level, args ...interface{}) { - if entry.Logger.IsLevelEnabled(level) { - entry.log(level, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Trace(args ...interface{}) { - entry.Log(TraceLevel, args...) -} - -func (entry *Entry) Debug(args ...interface{}) { - entry.Log(DebugLevel, args...) -} - -func (entry *Entry) Print(args ...interface{}) { - entry.Info(args...) -} - -func (entry *Entry) Info(args ...interface{}) { - entry.Log(InfoLevel, args...) -} - -func (entry *Entry) Warn(args ...interface{}) { - entry.Log(WarnLevel, args...) -} - -func (entry *Entry) Warning(args ...interface{}) { - entry.Warn(args...) -} - -func (entry *Entry) Error(args ...interface{}) { - entry.Log(ErrorLevel, args...) -} - -func (entry *Entry) Fatal(args ...interface{}) { - entry.Log(FatalLevel, args...) - entry.Logger.Exit(1) -} - -func (entry *Entry) Panic(args ...interface{}) { - entry.Log(PanicLevel, args...) -} - -// Entry Printf family functions - -func (entry *Entry) Logf(level Level, format string, args ...interface{}) { - if entry.Logger.IsLevelEnabled(level) { - entry.Log(level, fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Tracef(format string, args ...interface{}) { - entry.Logf(TraceLevel, format, args...) -} - -func (entry *Entry) Debugf(format string, args ...interface{}) { - entry.Logf(DebugLevel, format, args...) -} - -func (entry *Entry) Infof(format string, args ...interface{}) { - entry.Logf(InfoLevel, format, args...) -} - -func (entry *Entry) Printf(format string, args ...interface{}) { - entry.Infof(format, args...) -} - -func (entry *Entry) Warnf(format string, args ...interface{}) { - entry.Logf(WarnLevel, format, args...) -} - -func (entry *Entry) Warningf(format string, args ...interface{}) { - entry.Warnf(format, args...) -} - -func (entry *Entry) Errorf(format string, args ...interface{}) { - entry.Logf(ErrorLevel, format, args...) -} - -func (entry *Entry) Fatalf(format string, args ...interface{}) { - entry.Logf(FatalLevel, format, args...) - entry.Logger.Exit(1) -} - -func (entry *Entry) Panicf(format string, args ...interface{}) { - entry.Logf(PanicLevel, format, args...) -} - -// Entry Println family functions - -func (entry *Entry) Logln(level Level, args ...interface{}) { - if entry.Logger.IsLevelEnabled(level) { - entry.Log(level, entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Traceln(args ...interface{}) { - entry.Logln(TraceLevel, args...) -} - -func (entry *Entry) Debugln(args ...interface{}) { - entry.Logln(DebugLevel, args...) -} - -func (entry *Entry) Infoln(args ...interface{}) { - entry.Logln(InfoLevel, args...) -} - -func (entry *Entry) Println(args ...interface{}) { - entry.Infoln(args...) -} - -func (entry *Entry) Warnln(args ...interface{}) { - entry.Logln(WarnLevel, args...) -} - -func (entry *Entry) Warningln(args ...interface{}) { - entry.Warnln(args...) -} - -func (entry *Entry) Errorln(args ...interface{}) { - entry.Logln(ErrorLevel, args...) -} - -func (entry *Entry) Fatalln(args ...interface{}) { - entry.Logln(FatalLevel, args...) - entry.Logger.Exit(1) -} - -func (entry *Entry) Panicln(args ...interface{}) { - entry.Logln(PanicLevel, args...) -} - -// Sprintlnn => Sprint no newline. This is to get the behavior of how -// fmt.Sprintln where spaces are always added between operands, regardless of -// their type. Instead of vendoring the Sprintln implementation to spare a -// string allocation, we do the simplest thing. -func (entry *Entry) sprintlnn(args ...interface{}) string { - msg := fmt.Sprintln(args...) - return msg[:len(msg)-1] -} diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go deleted file mode 100644 index 017c30ce..00000000 --- a/vendor/github.com/sirupsen/logrus/exported.go +++ /dev/null @@ -1,270 +0,0 @@ -package logrus - -import ( - "context" - "io" - "time" -) - -var ( - // std is the name of the standard logger in stdlib `log` - std = New() -) - -func StandardLogger() *Logger { - return std -} - -// SetOutput sets the standard logger output. -func SetOutput(out io.Writer) { - std.SetOutput(out) -} - -// SetFormatter sets the standard logger formatter. -func SetFormatter(formatter Formatter) { - std.SetFormatter(formatter) -} - -// SetReportCaller sets whether the standard logger will include the calling -// method as a field. -func SetReportCaller(include bool) { - std.SetReportCaller(include) -} - -// SetLevel sets the standard logger level. -func SetLevel(level Level) { - std.SetLevel(level) -} - -// GetLevel returns the standard logger level. -func GetLevel() Level { - return std.GetLevel() -} - -// IsLevelEnabled checks if the log level of the standard logger is greater than the level param -func IsLevelEnabled(level Level) bool { - return std.IsLevelEnabled(level) -} - -// AddHook adds a hook to the standard logger hooks. -func AddHook(hook Hook) { - std.AddHook(hook) -} - -// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key. -func WithError(err error) *Entry { - return std.WithField(ErrorKey, err) -} - -// WithContext creates an entry from the standard logger and adds a context to it. -func WithContext(ctx context.Context) *Entry { - return std.WithContext(ctx) -} - -// WithField creates an entry from the standard logger and adds a field to -// it. If you want multiple fields, use `WithFields`. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithField(key string, value interface{}) *Entry { - return std.WithField(key, value) -} - -// WithFields creates an entry from the standard logger and adds multiple -// fields to it. This is simply a helper for `WithField`, invoking it -// once for each field. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithFields(fields Fields) *Entry { - return std.WithFields(fields) -} - -// WithTime creates an entry from the standard logger and overrides the time of -// logs generated with it. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithTime(t time.Time) *Entry { - return std.WithTime(t) -} - -// Trace logs a message at level Trace on the standard logger. -func Trace(args ...interface{}) { - std.Trace(args...) -} - -// Debug logs a message at level Debug on the standard logger. -func Debug(args ...interface{}) { - std.Debug(args...) -} - -// Print logs a message at level Info on the standard logger. -func Print(args ...interface{}) { - std.Print(args...) -} - -// Info logs a message at level Info on the standard logger. -func Info(args ...interface{}) { - std.Info(args...) -} - -// Warn logs a message at level Warn on the standard logger. -func Warn(args ...interface{}) { - std.Warn(args...) -} - -// Warning logs a message at level Warn on the standard logger. -func Warning(args ...interface{}) { - std.Warning(args...) -} - -// Error logs a message at level Error on the standard logger. -func Error(args ...interface{}) { - std.Error(args...) -} - -// Panic logs a message at level Panic on the standard logger. -func Panic(args ...interface{}) { - std.Panic(args...) -} - -// Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1. -func Fatal(args ...interface{}) { - std.Fatal(args...) -} - -// TraceFn logs a message from a func at level Trace on the standard logger. -func TraceFn(fn LogFunction) { - std.TraceFn(fn) -} - -// DebugFn logs a message from a func at level Debug on the standard logger. -func DebugFn(fn LogFunction) { - std.DebugFn(fn) -} - -// PrintFn logs a message from a func at level Info on the standard logger. -func PrintFn(fn LogFunction) { - std.PrintFn(fn) -} - -// InfoFn logs a message from a func at level Info on the standard logger. -func InfoFn(fn LogFunction) { - std.InfoFn(fn) -} - -// WarnFn logs a message from a func at level Warn on the standard logger. -func WarnFn(fn LogFunction) { - std.WarnFn(fn) -} - -// WarningFn logs a message from a func at level Warn on the standard logger. -func WarningFn(fn LogFunction) { - std.WarningFn(fn) -} - -// ErrorFn logs a message from a func at level Error on the standard logger. -func ErrorFn(fn LogFunction) { - std.ErrorFn(fn) -} - -// PanicFn logs a message from a func at level Panic on the standard logger. -func PanicFn(fn LogFunction) { - std.PanicFn(fn) -} - -// FatalFn logs a message from a func at level Fatal on the standard logger then the process will exit with status set to 1. -func FatalFn(fn LogFunction) { - std.FatalFn(fn) -} - -// Tracef logs a message at level Trace on the standard logger. -func Tracef(format string, args ...interface{}) { - std.Tracef(format, args...) -} - -// Debugf logs a message at level Debug on the standard logger. -func Debugf(format string, args ...interface{}) { - std.Debugf(format, args...) -} - -// Printf logs a message at level Info on the standard logger. -func Printf(format string, args ...interface{}) { - std.Printf(format, args...) -} - -// Infof logs a message at level Info on the standard logger. -func Infof(format string, args ...interface{}) { - std.Infof(format, args...) -} - -// Warnf logs a message at level Warn on the standard logger. -func Warnf(format string, args ...interface{}) { - std.Warnf(format, args...) -} - -// Warningf logs a message at level Warn on the standard logger. -func Warningf(format string, args ...interface{}) { - std.Warningf(format, args...) -} - -// Errorf logs a message at level Error on the standard logger. -func Errorf(format string, args ...interface{}) { - std.Errorf(format, args...) -} - -// Panicf logs a message at level Panic on the standard logger. -func Panicf(format string, args ...interface{}) { - std.Panicf(format, args...) -} - -// Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1. -func Fatalf(format string, args ...interface{}) { - std.Fatalf(format, args...) -} - -// Traceln logs a message at level Trace on the standard logger. -func Traceln(args ...interface{}) { - std.Traceln(args...) -} - -// Debugln logs a message at level Debug on the standard logger. -func Debugln(args ...interface{}) { - std.Debugln(args...) -} - -// Println logs a message at level Info on the standard logger. -func Println(args ...interface{}) { - std.Println(args...) -} - -// Infoln logs a message at level Info on the standard logger. -func Infoln(args ...interface{}) { - std.Infoln(args...) -} - -// Warnln logs a message at level Warn on the standard logger. -func Warnln(args ...interface{}) { - std.Warnln(args...) -} - -// Warningln logs a message at level Warn on the standard logger. -func Warningln(args ...interface{}) { - std.Warningln(args...) -} - -// Errorln logs a message at level Error on the standard logger. -func Errorln(args ...interface{}) { - std.Errorln(args...) -} - -// Panicln logs a message at level Panic on the standard logger. -func Panicln(args ...interface{}) { - std.Panicln(args...) -} - -// Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1. -func Fatalln(args ...interface{}) { - std.Fatalln(args...) -} diff --git a/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go deleted file mode 100644 index 40888377..00000000 --- a/vendor/github.com/sirupsen/logrus/formatter.go +++ /dev/null @@ -1,78 +0,0 @@ -package logrus - -import "time" - -// Default key names for the default fields -const ( - defaultTimestampFormat = time.RFC3339 - FieldKeyMsg = "msg" - FieldKeyLevel = "level" - FieldKeyTime = "time" - FieldKeyLogrusError = "logrus_error" - FieldKeyFunc = "func" - FieldKeyFile = "file" -) - -// The Formatter interface is used to implement a custom Formatter. It takes an -// `Entry`. It exposes all the fields, including the default ones: -// -// * `entry.Data["msg"]`. The message passed from Info, Warn, Error .. -// * `entry.Data["time"]`. The timestamp. -// * `entry.Data["level"]. The level the entry was logged at. -// -// Any additional fields added with `WithField` or `WithFields` are also in -// `entry.Data`. Format is expected to return an array of bytes which are then -// logged to `logger.Out`. -type Formatter interface { - Format(*Entry) ([]byte, error) -} - -// This is to not silently overwrite `time`, `msg`, `func` and `level` fields when -// dumping it. If this code wasn't there doing: -// -// logrus.WithField("level", 1).Info("hello") -// -// Would just silently drop the user provided level. Instead with this code -// it'll logged as: -// -// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} -// -// It's not exported because it's still using Data in an opinionated way. It's to -// avoid code duplication between the two default formatters. -func prefixFieldClashes(data Fields, fieldMap FieldMap, reportCaller bool) { - timeKey := fieldMap.resolve(FieldKeyTime) - if t, ok := data[timeKey]; ok { - data["fields."+timeKey] = t - delete(data, timeKey) - } - - msgKey := fieldMap.resolve(FieldKeyMsg) - if m, ok := data[msgKey]; ok { - data["fields."+msgKey] = m - delete(data, msgKey) - } - - levelKey := fieldMap.resolve(FieldKeyLevel) - if l, ok := data[levelKey]; ok { - data["fields."+levelKey] = l - delete(data, levelKey) - } - - logrusErrKey := fieldMap.resolve(FieldKeyLogrusError) - if l, ok := data[logrusErrKey]; ok { - data["fields."+logrusErrKey] = l - delete(data, logrusErrKey) - } - - // If reportCaller is not set, 'func' will not conflict. - if reportCaller { - funcKey := fieldMap.resolve(FieldKeyFunc) - if l, ok := data[funcKey]; ok { - data["fields."+funcKey] = l - } - fileKey := fieldMap.resolve(FieldKeyFile) - if l, ok := data[fileKey]; ok { - data["fields."+fileKey] = l - } - } -} diff --git a/vendor/github.com/sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go deleted file mode 100644 index 3f151cdc..00000000 --- a/vendor/github.com/sirupsen/logrus/hooks.go +++ /dev/null @@ -1,34 +0,0 @@ -package logrus - -// A hook to be fired when logging on the logging levels returned from -// `Levels()` on your implementation of the interface. Note that this is not -// fired in a goroutine or a channel with workers, you should handle such -// functionality yourself if your call is non-blocking and you don't wish for -// the logging calls for levels returned from `Levels()` to block. -type Hook interface { - Levels() []Level - Fire(*Entry) error -} - -// Internal type for storing the hooks on a logger instance. -type LevelHooks map[Level][]Hook - -// Add a hook to an instance of logger. This is called with -// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. -func (hooks LevelHooks) Add(hook Hook) { - for _, level := range hook.Levels() { - hooks[level] = append(hooks[level], hook) - } -} - -// Fire all the hooks for the passed level. Used by `entry.log` to fire -// appropriate hooks for a log entry. -func (hooks LevelHooks) Fire(level Level, entry *Entry) error { - for _, hook := range hooks[level] { - if err := hook.Fire(entry); err != nil { - return err - } - } - - return nil -} diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go deleted file mode 100644 index c96dc563..00000000 --- a/vendor/github.com/sirupsen/logrus/json_formatter.go +++ /dev/null @@ -1,128 +0,0 @@ -package logrus - -import ( - "bytes" - "encoding/json" - "fmt" - "runtime" -) - -type fieldKey string - -// FieldMap allows customization of the key names for default fields. -type FieldMap map[fieldKey]string - -func (f FieldMap) resolve(key fieldKey) string { - if k, ok := f[key]; ok { - return k - } - - return string(key) -} - -// JSONFormatter formats logs into parsable json -type JSONFormatter struct { - // TimestampFormat sets the format used for marshaling timestamps. - // The format to use is the same than for time.Format or time.Parse from the standard - // library. - // The standard Library already provides a set of predefined format. - TimestampFormat string - - // DisableTimestamp allows disabling automatic timestamps in output - DisableTimestamp bool - - // DisableHTMLEscape allows disabling html escaping in output - DisableHTMLEscape bool - - // DataKey allows users to put all the log entry parameters into a nested dictionary at a given key. - DataKey string - - // FieldMap allows users to customize the names of keys for default fields. - // As an example: - // formatter := &JSONFormatter{ - // FieldMap: FieldMap{ - // FieldKeyTime: "@timestamp", - // FieldKeyLevel: "@level", - // FieldKeyMsg: "@message", - // FieldKeyFunc: "@caller", - // }, - // } - FieldMap FieldMap - - // CallerPrettyfier can be set by the user to modify the content - // of the function and file keys in the json data when ReportCaller is - // activated. If any of the returned value is the empty string the - // corresponding key will be removed from json fields. - CallerPrettyfier func(*runtime.Frame) (function string, file string) - - // PrettyPrint will indent all json logs - PrettyPrint bool -} - -// Format renders a single log entry -func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { - data := make(Fields, len(entry.Data)+4) - for k, v := range entry.Data { - switch v := v.(type) { - case error: - // Otherwise errors are ignored by `encoding/json` - // https://github.com/sirupsen/logrus/issues/137 - data[k] = v.Error() - default: - data[k] = v - } - } - - if f.DataKey != "" { - newData := make(Fields, 4) - newData[f.DataKey] = data - data = newData - } - - prefixFieldClashes(data, f.FieldMap, entry.HasCaller()) - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = defaultTimestampFormat - } - - if entry.err != "" { - data[f.FieldMap.resolve(FieldKeyLogrusError)] = entry.err - } - if !f.DisableTimestamp { - data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat) - } - data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message - data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String() - if entry.HasCaller() { - funcVal := entry.Caller.Function - fileVal := fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) - if f.CallerPrettyfier != nil { - funcVal, fileVal = f.CallerPrettyfier(entry.Caller) - } - if funcVal != "" { - data[f.FieldMap.resolve(FieldKeyFunc)] = funcVal - } - if fileVal != "" { - data[f.FieldMap.resolve(FieldKeyFile)] = fileVal - } - } - - var b *bytes.Buffer - if entry.Buffer != nil { - b = entry.Buffer - } else { - b = &bytes.Buffer{} - } - - encoder := json.NewEncoder(b) - encoder.SetEscapeHTML(!f.DisableHTMLEscape) - if f.PrettyPrint { - encoder.SetIndent("", " ") - } - if err := encoder.Encode(data); err != nil { - return nil, fmt.Errorf("failed to marshal fields to JSON, %w", err) - } - - return b.Bytes(), nil -} diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go deleted file mode 100644 index 5ff0aef6..00000000 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ /dev/null @@ -1,417 +0,0 @@ -package logrus - -import ( - "context" - "io" - "os" - "sync" - "sync/atomic" - "time" -) - -// LogFunction For big messages, it can be more efficient to pass a function -// and only call it if the log level is actually enables rather than -// generating the log message and then checking if the level is enabled -type LogFunction func() []interface{} - -type Logger struct { - // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a - // file, or leave it default which is `os.Stderr`. You can also set this to - // something more adventurous, such as logging to Kafka. - Out io.Writer - // Hooks for the logger instance. These allow firing events based on logging - // levels and log entries. For example, to send errors to an error tracking - // service, log to StatsD or dump the core on fatal errors. - Hooks LevelHooks - // All log entries pass through the formatter before logged to Out. The - // included formatters are `TextFormatter` and `JSONFormatter` for which - // TextFormatter is the default. In development (when a TTY is attached) it - // logs with colors, but to a file it wouldn't. You can easily implement your - // own that implements the `Formatter` interface, see the `README` or included - // formatters for examples. - Formatter Formatter - - // Flag for whether to log caller info (off by default) - ReportCaller bool - - // The logging level the logger should log at. This is typically (and defaults - // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be - // logged. - Level Level - // Used to sync writing to the log. Locking is enabled by Default - mu MutexWrap - // Reusable empty entry - entryPool sync.Pool - // Function to exit the application, defaults to `os.Exit()` - ExitFunc exitFunc - // The buffer pool used to format the log. If it is nil, the default global - // buffer pool will be used. - BufferPool BufferPool -} - -type exitFunc func(int) - -type MutexWrap struct { - lock sync.Mutex - disabled bool -} - -func (mw *MutexWrap) Lock() { - if !mw.disabled { - mw.lock.Lock() - } -} - -func (mw *MutexWrap) Unlock() { - if !mw.disabled { - mw.lock.Unlock() - } -} - -func (mw *MutexWrap) Disable() { - mw.disabled = true -} - -// Creates a new logger. Configuration should be set by changing `Formatter`, -// `Out` and `Hooks` directly on the default logger instance. You can also just -// instantiate your own: -// -// var log = &logrus.Logger{ -// Out: os.Stderr, -// Formatter: new(logrus.TextFormatter), -// Hooks: make(logrus.LevelHooks), -// Level: logrus.DebugLevel, -// } -// -// It's recommended to make this a global instance called `log`. -func New() *Logger { - return &Logger{ - Out: os.Stderr, - Formatter: new(TextFormatter), - Hooks: make(LevelHooks), - Level: InfoLevel, - ExitFunc: os.Exit, - ReportCaller: false, - } -} - -func (logger *Logger) newEntry() *Entry { - entry, ok := logger.entryPool.Get().(*Entry) - if ok { - return entry - } - return NewEntry(logger) -} - -func (logger *Logger) releaseEntry(entry *Entry) { - entry.Data = map[string]interface{}{} - logger.entryPool.Put(entry) -} - -// WithField allocates a new entry and adds a field to it. -// Debug, Print, Info, Warn, Error, Fatal or Panic must be then applied to -// this new returned entry. -// If you want multiple fields, use `WithFields`. -func (logger *Logger) WithField(key string, value interface{}) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithField(key, value) -} - -// Adds a struct of fields to the log entry. All it does is call `WithField` for -// each `Field`. -func (logger *Logger) WithFields(fields Fields) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithFields(fields) -} - -// Add an error as single field to the log entry. All it does is call -// `WithError` for the given `error`. -func (logger *Logger) WithError(err error) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithError(err) -} - -// Add a context to the log entry. -func (logger *Logger) WithContext(ctx context.Context) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithContext(ctx) -} - -// Overrides the time of the log entry. -func (logger *Logger) WithTime(t time.Time) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithTime(t) -} - -func (logger *Logger) Logf(level Level, format string, args ...interface{}) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Logf(level, format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Tracef(format string, args ...interface{}) { - logger.Logf(TraceLevel, format, args...) -} - -func (logger *Logger) Debugf(format string, args ...interface{}) { - logger.Logf(DebugLevel, format, args...) -} - -func (logger *Logger) Infof(format string, args ...interface{}) { - logger.Logf(InfoLevel, format, args...) -} - -func (logger *Logger) Printf(format string, args ...interface{}) { - entry := logger.newEntry() - entry.Printf(format, args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warnf(format string, args ...interface{}) { - logger.Logf(WarnLevel, format, args...) -} - -func (logger *Logger) Warningf(format string, args ...interface{}) { - logger.Warnf(format, args...) -} - -func (logger *Logger) Errorf(format string, args ...interface{}) { - logger.Logf(ErrorLevel, format, args...) -} - -func (logger *Logger) Fatalf(format string, args ...interface{}) { - logger.Logf(FatalLevel, format, args...) - logger.Exit(1) -} - -func (logger *Logger) Panicf(format string, args ...interface{}) { - logger.Logf(PanicLevel, format, args...) -} - -// Log will log a message at the level given as parameter. -// Warning: using Log at Panic or Fatal level will not respectively Panic nor Exit. -// For this behaviour Logger.Panic or Logger.Fatal should be used instead. -func (logger *Logger) Log(level Level, args ...interface{}) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Log(level, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) LogFn(level Level, fn LogFunction) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Log(level, fn()...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Trace(args ...interface{}) { - logger.Log(TraceLevel, args...) -} - -func (logger *Logger) Debug(args ...interface{}) { - logger.Log(DebugLevel, args...) -} - -func (logger *Logger) Info(args ...interface{}) { - logger.Log(InfoLevel, args...) -} - -func (logger *Logger) Print(args ...interface{}) { - entry := logger.newEntry() - entry.Print(args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warn(args ...interface{}) { - logger.Log(WarnLevel, args...) -} - -func (logger *Logger) Warning(args ...interface{}) { - logger.Warn(args...) -} - -func (logger *Logger) Error(args ...interface{}) { - logger.Log(ErrorLevel, args...) -} - -func (logger *Logger) Fatal(args ...interface{}) { - logger.Log(FatalLevel, args...) - logger.Exit(1) -} - -func (logger *Logger) Panic(args ...interface{}) { - logger.Log(PanicLevel, args...) -} - -func (logger *Logger) TraceFn(fn LogFunction) { - logger.LogFn(TraceLevel, fn) -} - -func (logger *Logger) DebugFn(fn LogFunction) { - logger.LogFn(DebugLevel, fn) -} - -func (logger *Logger) InfoFn(fn LogFunction) { - logger.LogFn(InfoLevel, fn) -} - -func (logger *Logger) PrintFn(fn LogFunction) { - entry := logger.newEntry() - entry.Print(fn()...) - logger.releaseEntry(entry) -} - -func (logger *Logger) WarnFn(fn LogFunction) { - logger.LogFn(WarnLevel, fn) -} - -func (logger *Logger) WarningFn(fn LogFunction) { - logger.WarnFn(fn) -} - -func (logger *Logger) ErrorFn(fn LogFunction) { - logger.LogFn(ErrorLevel, fn) -} - -func (logger *Logger) FatalFn(fn LogFunction) { - logger.LogFn(FatalLevel, fn) - logger.Exit(1) -} - -func (logger *Logger) PanicFn(fn LogFunction) { - logger.LogFn(PanicLevel, fn) -} - -func (logger *Logger) Logln(level Level, args ...interface{}) { - if logger.IsLevelEnabled(level) { - entry := logger.newEntry() - entry.Logln(level, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Traceln(args ...interface{}) { - logger.Logln(TraceLevel, args...) -} - -func (logger *Logger) Debugln(args ...interface{}) { - logger.Logln(DebugLevel, args...) -} - -func (logger *Logger) Infoln(args ...interface{}) { - logger.Logln(InfoLevel, args...) -} - -func (logger *Logger) Println(args ...interface{}) { - entry := logger.newEntry() - entry.Println(args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warnln(args ...interface{}) { - logger.Logln(WarnLevel, args...) -} - -func (logger *Logger) Warningln(args ...interface{}) { - logger.Warnln(args...) -} - -func (logger *Logger) Errorln(args ...interface{}) { - logger.Logln(ErrorLevel, args...) -} - -func (logger *Logger) Fatalln(args ...interface{}) { - logger.Logln(FatalLevel, args...) - logger.Exit(1) -} - -func (logger *Logger) Panicln(args ...interface{}) { - logger.Logln(PanicLevel, args...) -} - -func (logger *Logger) Exit(code int) { - runHandlers() - if logger.ExitFunc == nil { - logger.ExitFunc = os.Exit - } - logger.ExitFunc(code) -} - -//When file is opened with appending mode, it's safe to -//write concurrently to a file (within 4k message on Linux). -//In these cases user can choose to disable the lock. -func (logger *Logger) SetNoLock() { - logger.mu.Disable() -} - -func (logger *Logger) level() Level { - return Level(atomic.LoadUint32((*uint32)(&logger.Level))) -} - -// SetLevel sets the logger level. -func (logger *Logger) SetLevel(level Level) { - atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) -} - -// GetLevel returns the logger level. -func (logger *Logger) GetLevel() Level { - return logger.level() -} - -// AddHook adds a hook to the logger hooks. -func (logger *Logger) AddHook(hook Hook) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.Hooks.Add(hook) -} - -// IsLevelEnabled checks if the log level of the logger is greater than the level param -func (logger *Logger) IsLevelEnabled(level Level) bool { - return logger.level() >= level -} - -// SetFormatter sets the logger formatter. -func (logger *Logger) SetFormatter(formatter Formatter) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.Formatter = formatter -} - -// SetOutput sets the logger output. -func (logger *Logger) SetOutput(output io.Writer) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.Out = output -} - -func (logger *Logger) SetReportCaller(reportCaller bool) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.ReportCaller = reportCaller -} - -// ReplaceHooks replaces the logger hooks and returns the old ones -func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks { - logger.mu.Lock() - oldHooks := logger.Hooks - logger.Hooks = hooks - logger.mu.Unlock() - return oldHooks -} - -// SetBufferPool sets the logger buffer pool. -func (logger *Logger) SetBufferPool(pool BufferPool) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.BufferPool = pool -} diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go deleted file mode 100644 index 2f16224c..00000000 --- a/vendor/github.com/sirupsen/logrus/logrus.go +++ /dev/null @@ -1,186 +0,0 @@ -package logrus - -import ( - "fmt" - "log" - "strings" -) - -// Fields type, used to pass to `WithFields`. -type Fields map[string]interface{} - -// Level type -type Level uint32 - -// Convert the Level to a string. E.g. PanicLevel becomes "panic". -func (level Level) String() string { - if b, err := level.MarshalText(); err == nil { - return string(b) - } else { - return "unknown" - } -} - -// ParseLevel takes a string level and returns the Logrus log level constant. -func ParseLevel(lvl string) (Level, error) { - switch strings.ToLower(lvl) { - case "panic": - return PanicLevel, nil - case "fatal": - return FatalLevel, nil - case "error": - return ErrorLevel, nil - case "warn", "warning": - return WarnLevel, nil - case "info": - return InfoLevel, nil - case "debug": - return DebugLevel, nil - case "trace": - return TraceLevel, nil - } - - var l Level - return l, fmt.Errorf("not a valid logrus Level: %q", lvl) -} - -// UnmarshalText implements encoding.TextUnmarshaler. -func (level *Level) UnmarshalText(text []byte) error { - l, err := ParseLevel(string(text)) - if err != nil { - return err - } - - *level = l - - return nil -} - -func (level Level) MarshalText() ([]byte, error) { - switch level { - case TraceLevel: - return []byte("trace"), nil - case DebugLevel: - return []byte("debug"), nil - case InfoLevel: - return []byte("info"), nil - case WarnLevel: - return []byte("warning"), nil - case ErrorLevel: - return []byte("error"), nil - case FatalLevel: - return []byte("fatal"), nil - case PanicLevel: - return []byte("panic"), nil - } - - return nil, fmt.Errorf("not a valid logrus level %d", level) -} - -// A constant exposing all logging levels -var AllLevels = []Level{ - PanicLevel, - FatalLevel, - ErrorLevel, - WarnLevel, - InfoLevel, - DebugLevel, - TraceLevel, -} - -// These are the different logging levels. You can set the logging level to log -// on your instance of logger, obtained with `logrus.New()`. -const ( - // PanicLevel level, highest level of severity. Logs and then calls panic with the - // message passed to Debug, Info, ... - PanicLevel Level = iota - // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the - // logging level is set to Panic. - FatalLevel - // ErrorLevel level. Logs. Used for errors that should definitely be noted. - // Commonly used for hooks to send errors to an error tracking service. - ErrorLevel - // WarnLevel level. Non-critical entries that deserve eyes. - WarnLevel - // InfoLevel level. General operational entries about what's going on inside the - // application. - InfoLevel - // DebugLevel level. Usually only enabled when debugging. Very verbose logging. - DebugLevel - // TraceLevel level. Designates finer-grained informational events than the Debug. - TraceLevel -) - -// Won't compile if StdLogger can't be realized by a log.Logger -var ( - _ StdLogger = &log.Logger{} - _ StdLogger = &Entry{} - _ StdLogger = &Logger{} -) - -// StdLogger is what your logrus-enabled library should take, that way -// it'll accept a stdlib logger and a logrus logger. There's no standard -// interface, this is the closest we get, unfortunately. -type StdLogger interface { - Print(...interface{}) - Printf(string, ...interface{}) - Println(...interface{}) - - Fatal(...interface{}) - Fatalf(string, ...interface{}) - Fatalln(...interface{}) - - Panic(...interface{}) - Panicf(string, ...interface{}) - Panicln(...interface{}) -} - -// The FieldLogger interface generalizes the Entry and Logger types -type FieldLogger interface { - WithField(key string, value interface{}) *Entry - WithFields(fields Fields) *Entry - WithError(err error) *Entry - - Debugf(format string, args ...interface{}) - Infof(format string, args ...interface{}) - Printf(format string, args ...interface{}) - Warnf(format string, args ...interface{}) - Warningf(format string, args ...interface{}) - Errorf(format string, args ...interface{}) - Fatalf(format string, args ...interface{}) - Panicf(format string, args ...interface{}) - - Debug(args ...interface{}) - Info(args ...interface{}) - Print(args ...interface{}) - Warn(args ...interface{}) - Warning(args ...interface{}) - Error(args ...interface{}) - Fatal(args ...interface{}) - Panic(args ...interface{}) - - Debugln(args ...interface{}) - Infoln(args ...interface{}) - Println(args ...interface{}) - Warnln(args ...interface{}) - Warningln(args ...interface{}) - Errorln(args ...interface{}) - Fatalln(args ...interface{}) - Panicln(args ...interface{}) - - // IsDebugEnabled() bool - // IsInfoEnabled() bool - // IsWarnEnabled() bool - // IsErrorEnabled() bool - // IsFatalEnabled() bool - // IsPanicEnabled() bool -} - -// Ext1FieldLogger (the first extension to FieldLogger) is superfluous, it is -// here for consistancy. Do not use. Use Logger or Entry instead. -type Ext1FieldLogger interface { - FieldLogger - Tracef(format string, args ...interface{}) - Trace(args ...interface{}) - Traceln(args ...interface{}) -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go deleted file mode 100644 index 2403de98..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build appengine - -package logrus - -import ( - "io" -) - -func checkIfTerminal(w io.Writer) bool { - return true -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go deleted file mode 100644 index 49978998..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build darwin dragonfly freebsd netbsd openbsd -// +build !js - -package logrus - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TIOCGETA - -func isTerminal(fd int) bool { - _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - return err == nil -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/vendor/github.com/sirupsen/logrus/terminal_check_js.go deleted file mode 100644 index ebdae3ec..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_js.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build js - -package logrus - -func isTerminal(fd int) bool { - return false -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go b/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go deleted file mode 100644 index 97af92c6..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build js nacl plan9 - -package logrus - -import ( - "io" -) - -func checkIfTerminal(w io.Writer) bool { - return false -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go deleted file mode 100644 index 3293fb3c..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go +++ /dev/null @@ -1,17 +0,0 @@ -// +build !appengine,!js,!windows,!nacl,!plan9 - -package logrus - -import ( - "io" - "os" -) - -func checkIfTerminal(w io.Writer) bool { - switch v := w.(type) { - case *os.File: - return isTerminal(int(v.Fd())) - default: - return false - } -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go b/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go deleted file mode 100644 index f6710b3b..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go +++ /dev/null @@ -1,11 +0,0 @@ -package logrus - -import ( - "golang.org/x/sys/unix" -) - -// IsTerminal returns true if the given file descriptor is a terminal. -func isTerminal(fd int) bool { - _, err := unix.IoctlGetTermio(fd, unix.TCGETA) - return err == nil -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go deleted file mode 100644 index 04748b85..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go +++ /dev/null @@ -1,13 +0,0 @@ -// +build linux aix zos -// +build !js - -package logrus - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TCGETS - -func isTerminal(fd int) bool { - _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - return err == nil -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go deleted file mode 100644 index 2879eb50..00000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go +++ /dev/null @@ -1,27 +0,0 @@ -// +build !appengine,!js,windows - -package logrus - -import ( - "io" - "os" - - "golang.org/x/sys/windows" -) - -func checkIfTerminal(w io.Writer) bool { - switch v := w.(type) { - case *os.File: - handle := windows.Handle(v.Fd()) - var mode uint32 - if err := windows.GetConsoleMode(handle, &mode); err != nil { - return false - } - mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING - if err := windows.SetConsoleMode(handle, mode); err != nil { - return false - } - return true - } - return false -} diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go deleted file mode 100644 index be2c6efe..00000000 --- a/vendor/github.com/sirupsen/logrus/text_formatter.go +++ /dev/null @@ -1,339 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "os" - "runtime" - "sort" - "strconv" - "strings" - "sync" - "time" - "unicode/utf8" -) - -const ( - red = 31 - yellow = 33 - blue = 36 - gray = 37 -) - -var baseTimestamp time.Time - -func init() { - baseTimestamp = time.Now() -} - -// TextFormatter formats logs into text -type TextFormatter struct { - // Set to true to bypass checking for a TTY before outputting colors. - ForceColors bool - - // Force disabling colors. - DisableColors bool - - // Force quoting of all values - ForceQuote bool - - // DisableQuote disables quoting for all values. - // DisableQuote will have a lower priority than ForceQuote. - // If both of them are set to true, quote will be forced on all values. - DisableQuote bool - - // Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/ - EnvironmentOverrideColors bool - - // Disable timestamp logging. useful when output is redirected to logging - // system that already adds timestamps. - DisableTimestamp bool - - // Enable logging the full timestamp when a TTY is attached instead of just - // the time passed since beginning of execution. - FullTimestamp bool - - // TimestampFormat to use for display when a full timestamp is printed. - // The format to use is the same than for time.Format or time.Parse from the standard - // library. - // The standard Library already provides a set of predefined format. - TimestampFormat string - - // The fields are sorted by default for a consistent output. For applications - // that log extremely frequently and don't use the JSON formatter this may not - // be desired. - DisableSorting bool - - // The keys sorting function, when uninitialized it uses sort.Strings. - SortingFunc func([]string) - - // Disables the truncation of the level text to 4 characters. - DisableLevelTruncation bool - - // PadLevelText Adds padding the level text so that all the levels output at the same length - // PadLevelText is a superset of the DisableLevelTruncation option - PadLevelText bool - - // QuoteEmptyFields will wrap empty fields in quotes if true - QuoteEmptyFields bool - - // Whether the logger's out is to a terminal - isTerminal bool - - // FieldMap allows users to customize the names of keys for default fields. - // As an example: - // formatter := &TextFormatter{ - // FieldMap: FieldMap{ - // FieldKeyTime: "@timestamp", - // FieldKeyLevel: "@level", - // FieldKeyMsg: "@message"}} - FieldMap FieldMap - - // CallerPrettyfier can be set by the user to modify the content - // of the function and file keys in the data when ReportCaller is - // activated. If any of the returned value is the empty string the - // corresponding key will be removed from fields. - CallerPrettyfier func(*runtime.Frame) (function string, file string) - - terminalInitOnce sync.Once - - // The max length of the level text, generated dynamically on init - levelTextMaxLength int -} - -func (f *TextFormatter) init(entry *Entry) { - if entry.Logger != nil { - f.isTerminal = checkIfTerminal(entry.Logger.Out) - } - // Get the max length of the level text - for _, level := range AllLevels { - levelTextLength := utf8.RuneCount([]byte(level.String())) - if levelTextLength > f.levelTextMaxLength { - f.levelTextMaxLength = levelTextLength - } - } -} - -func (f *TextFormatter) isColored() bool { - isColored := f.ForceColors || (f.isTerminal && (runtime.GOOS != "windows")) - - if f.EnvironmentOverrideColors { - switch force, ok := os.LookupEnv("CLICOLOR_FORCE"); { - case ok && force != "0": - isColored = true - case ok && force == "0", os.Getenv("CLICOLOR") == "0": - isColored = false - } - } - - return isColored && !f.DisableColors -} - -// Format renders a single log entry -func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { - data := make(Fields) - for k, v := range entry.Data { - data[k] = v - } - prefixFieldClashes(data, f.FieldMap, entry.HasCaller()) - keys := make([]string, 0, len(data)) - for k := range data { - keys = append(keys, k) - } - - var funcVal, fileVal string - - fixedKeys := make([]string, 0, 4+len(data)) - if !f.DisableTimestamp { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyTime)) - } - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLevel)) - if entry.Message != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyMsg)) - } - if entry.err != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLogrusError)) - } - if entry.HasCaller() { - if f.CallerPrettyfier != nil { - funcVal, fileVal = f.CallerPrettyfier(entry.Caller) - } else { - funcVal = entry.Caller.Function - fileVal = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) - } - - if funcVal != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFunc)) - } - if fileVal != "" { - fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFile)) - } - } - - if !f.DisableSorting { - if f.SortingFunc == nil { - sort.Strings(keys) - fixedKeys = append(fixedKeys, keys...) - } else { - if !f.isColored() { - fixedKeys = append(fixedKeys, keys...) - f.SortingFunc(fixedKeys) - } else { - f.SortingFunc(keys) - } - } - } else { - fixedKeys = append(fixedKeys, keys...) - } - - var b *bytes.Buffer - if entry.Buffer != nil { - b = entry.Buffer - } else { - b = &bytes.Buffer{} - } - - f.terminalInitOnce.Do(func() { f.init(entry) }) - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = defaultTimestampFormat - } - if f.isColored() { - f.printColored(b, entry, keys, data, timestampFormat) - } else { - - for _, key := range fixedKeys { - var value interface{} - switch { - case key == f.FieldMap.resolve(FieldKeyTime): - value = entry.Time.Format(timestampFormat) - case key == f.FieldMap.resolve(FieldKeyLevel): - value = entry.Level.String() - case key == f.FieldMap.resolve(FieldKeyMsg): - value = entry.Message - case key == f.FieldMap.resolve(FieldKeyLogrusError): - value = entry.err - case key == f.FieldMap.resolve(FieldKeyFunc) && entry.HasCaller(): - value = funcVal - case key == f.FieldMap.resolve(FieldKeyFile) && entry.HasCaller(): - value = fileVal - default: - value = data[key] - } - f.appendKeyValue(b, key, value) - } - } - - b.WriteByte('\n') - return b.Bytes(), nil -} - -func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, data Fields, timestampFormat string) { - var levelColor int - switch entry.Level { - case DebugLevel, TraceLevel: - levelColor = gray - case WarnLevel: - levelColor = yellow - case ErrorLevel, FatalLevel, PanicLevel: - levelColor = red - case InfoLevel: - levelColor = blue - default: - levelColor = blue - } - - levelText := strings.ToUpper(entry.Level.String()) - if !f.DisableLevelTruncation && !f.PadLevelText { - levelText = levelText[0:4] - } - if f.PadLevelText { - // Generates the format string used in the next line, for example "%-6s" or "%-7s". - // Based on the max level text length. - formatString := "%-" + strconv.Itoa(f.levelTextMaxLength) + "s" - // Formats the level text by appending spaces up to the max length, for example: - // - "INFO " - // - "WARNING" - levelText = fmt.Sprintf(formatString, levelText) - } - - // Remove a single newline if it already exists in the message to keep - // the behavior of logrus text_formatter the same as the stdlib log package - entry.Message = strings.TrimSuffix(entry.Message, "\n") - - caller := "" - if entry.HasCaller() { - funcVal := fmt.Sprintf("%s()", entry.Caller.Function) - fileVal := fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) - - if f.CallerPrettyfier != nil { - funcVal, fileVal = f.CallerPrettyfier(entry.Caller) - } - - if fileVal == "" { - caller = funcVal - } else if funcVal == "" { - caller = fileVal - } else { - caller = fileVal + " " + funcVal - } - } - - switch { - case f.DisableTimestamp: - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m%s %-44s ", levelColor, levelText, caller, entry.Message) - case !f.FullTimestamp: - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d]%s %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), caller, entry.Message) - default: - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s]%s %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), caller, entry.Message) - } - for _, k := range keys { - v := data[k] - fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k) - f.appendValue(b, v) - } -} - -func (f *TextFormatter) needsQuoting(text string) bool { - if f.ForceQuote { - return true - } - if f.QuoteEmptyFields && len(text) == 0 { - return true - } - if f.DisableQuote { - return false - } - for _, ch := range text { - if !((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') { - return true - } - } - return false -} - -func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { - if b.Len() > 0 { - b.WriteByte(' ') - } - b.WriteString(key) - b.WriteByte('=') - f.appendValue(b, value) -} - -func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) { - stringVal, ok := value.(string) - if !ok { - stringVal = fmt.Sprint(value) - } - - if !f.needsQuoting(stringVal) { - b.WriteString(stringVal) - } else { - b.WriteString(fmt.Sprintf("%q", stringVal)) - } -} diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go deleted file mode 100644 index 074fd4b8..00000000 --- a/vendor/github.com/sirupsen/logrus/writer.go +++ /dev/null @@ -1,102 +0,0 @@ -package logrus - -import ( - "bufio" - "io" - "runtime" - "strings" -) - -// Writer at INFO level. See WriterLevel for details. -func (logger *Logger) Writer() *io.PipeWriter { - return logger.WriterLevel(InfoLevel) -} - -// WriterLevel returns an io.Writer that can be used to write arbitrary text to -// the logger at the given log level. Each line written to the writer will be -// printed in the usual way using formatters and hooks. The writer is part of an -// io.Pipe and it is the callers responsibility to close the writer when done. -// This can be used to override the standard library logger easily. -func (logger *Logger) WriterLevel(level Level) *io.PipeWriter { - return NewEntry(logger).WriterLevel(level) -} - -// Writer returns an io.Writer that writes to the logger at the info log level -func (entry *Entry) Writer() *io.PipeWriter { - return entry.WriterLevel(InfoLevel) -} - -// WriterLevel returns an io.Writer that writes to the logger at the given log level -func (entry *Entry) WriterLevel(level Level) *io.PipeWriter { - reader, writer := io.Pipe() - - var printFunc func(args ...interface{}) - - // Determine which log function to use based on the specified log level - switch level { - case TraceLevel: - printFunc = entry.Trace - case DebugLevel: - printFunc = entry.Debug - case InfoLevel: - printFunc = entry.Info - case WarnLevel: - printFunc = entry.Warn - case ErrorLevel: - printFunc = entry.Error - case FatalLevel: - printFunc = entry.Fatal - case PanicLevel: - printFunc = entry.Panic - default: - printFunc = entry.Print - } - - // Start a new goroutine to scan the input and write it to the logger using the specified print function. - // It splits the input into chunks of up to 64KB to avoid buffer overflows. - go entry.writerScanner(reader, printFunc) - - // Set a finalizer function to close the writer when it is garbage collected - runtime.SetFinalizer(writer, writerFinalizer) - - return writer -} - -// writerScanner scans the input from the reader and writes it to the logger -func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) { - scanner := bufio.NewScanner(reader) - - // Set the buffer size to the maximum token size to avoid buffer overflows - scanner.Buffer(make([]byte, bufio.MaxScanTokenSize), bufio.MaxScanTokenSize) - - // Define a split function to split the input into chunks of up to 64KB - chunkSize := bufio.MaxScanTokenSize // 64KB - splitFunc := func(data []byte, atEOF bool) (int, []byte, error) { - if len(data) >= chunkSize { - return chunkSize, data[:chunkSize], nil - } - - return bufio.ScanLines(data, atEOF) - } - - // Use the custom split function to split the input - scanner.Split(splitFunc) - - // Scan the input and write it to the logger using the specified print function - for scanner.Scan() { - printFunc(strings.TrimRight(scanner.Text(), "\r\n")) - } - - // If there was an error while scanning the input, log an error - if err := scanner.Err(); err != nil { - entry.Errorf("Error while reading from Writer: %s", err) - } - - // Close the reader when we are done - reader.Close() -} - -// WriterFinalizer is a finalizer function that closes then given writer when it is garbage collected -func writerFinalizer(writer *io.PipeWriter) { - writer.Close() -} diff --git a/vendor/github.com/vbatts/tar-split/LICENSE b/vendor/github.com/vbatts/tar-split/LICENSE deleted file mode 100644 index ca03685b..00000000 --- a/vendor/github.com/vbatts/tar-split/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2015 Vincent Batts, Raleigh, NC, USA - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the copyright holder 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 HOLDER 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/github.com/vbatts/tar-split/archive/tar/common.go b/vendor/github.com/vbatts/tar-split/archive/tar/common.go deleted file mode 100644 index dee9e47e..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/common.go +++ /dev/null @@ -1,723 +0,0 @@ -// Copyright 2009 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 tar implements access to tar archives. -// -// Tape archives (tar) are a file format for storing a sequence of files that -// can be read and written in a streaming manner. -// This package aims to cover most variations of the format, -// including those produced by GNU and BSD tar tools. -package tar - -import ( - "errors" - "fmt" - "math" - "os" - "path" - "reflect" - "strconv" - "strings" - "time" -) - -// BUG: Use of the Uid and Gid fields in Header could overflow on 32-bit -// architectures. If a large value is encountered when decoding, the result -// stored in Header will be the truncated version. - -var ( - ErrHeader = errors.New("archive/tar: invalid tar header") - ErrWriteTooLong = errors.New("archive/tar: write too long") - ErrFieldTooLong = errors.New("archive/tar: header field too long") - ErrWriteAfterClose = errors.New("archive/tar: write after close") - errMissData = errors.New("archive/tar: sparse file references non-existent data") - errUnrefData = errors.New("archive/tar: sparse file contains unreferenced data") - errWriteHole = errors.New("archive/tar: write non-NUL byte in sparse hole") -) - -type headerError []string - -func (he headerError) Error() string { - const prefix = "archive/tar: cannot encode header" - var ss []string - for _, s := range he { - if s != "" { - ss = append(ss, s) - } - } - if len(ss) == 0 { - return prefix - } - return fmt.Sprintf("%s: %v", prefix, strings.Join(ss, "; and ")) -} - -// Type flags for Header.Typeflag. -const ( - // Type '0' indicates a regular file. - TypeReg = '0' - TypeRegA = '\x00' // Deprecated: Use TypeReg instead. - - // Type '1' to '6' are header-only flags and may not have a data body. - TypeLink = '1' // Hard link - TypeSymlink = '2' // Symbolic link - TypeChar = '3' // Character device node - TypeBlock = '4' // Block device node - TypeDir = '5' // Directory - TypeFifo = '6' // FIFO node - - // Type '7' is reserved. - TypeCont = '7' - - // Type 'x' is used by the PAX format to store key-value records that - // are only relevant to the next file. - // This package transparently handles these types. - TypeXHeader = 'x' - - // Type 'g' is used by the PAX format to store key-value records that - // are relevant to all subsequent files. - // This package only supports parsing and composing such headers, - // but does not currently support persisting the global state across files. - TypeXGlobalHeader = 'g' - - // Type 'S' indicates a sparse file in the GNU format. - TypeGNUSparse = 'S' - - // Types 'L' and 'K' are used by the GNU format for a meta file - // used to store the path or link name for the next file. - // This package transparently handles these types. - TypeGNULongName = 'L' - TypeGNULongLink = 'K' -) - -// Keywords for PAX extended header records. -const ( - paxNone = "" // Indicates that no PAX key is suitable - paxPath = "path" - paxLinkpath = "linkpath" - paxSize = "size" - paxUid = "uid" - paxGid = "gid" - paxUname = "uname" - paxGname = "gname" - paxMtime = "mtime" - paxAtime = "atime" - paxCtime = "ctime" // Removed from later revision of PAX spec, but was valid - paxCharset = "charset" // Currently unused - paxComment = "comment" // Currently unused - - paxSchilyXattr = "SCHILY.xattr." - - // Keywords for GNU sparse files in a PAX extended header. - paxGNUSparse = "GNU.sparse." - paxGNUSparseNumBlocks = "GNU.sparse.numblocks" - paxGNUSparseOffset = "GNU.sparse.offset" - paxGNUSparseNumBytes = "GNU.sparse.numbytes" - paxGNUSparseMap = "GNU.sparse.map" - paxGNUSparseName = "GNU.sparse.name" - paxGNUSparseMajor = "GNU.sparse.major" - paxGNUSparseMinor = "GNU.sparse.minor" - paxGNUSparseSize = "GNU.sparse.size" - paxGNUSparseRealSize = "GNU.sparse.realsize" -) - -// basicKeys is a set of the PAX keys for which we have built-in support. -// This does not contain "charset" or "comment", which are both PAX-specific, -// so adding them as first-class features of Header is unlikely. -// Users can use the PAXRecords field to set it themselves. -var basicKeys = map[string]bool{ - paxPath: true, paxLinkpath: true, paxSize: true, paxUid: true, paxGid: true, - paxUname: true, paxGname: true, paxMtime: true, paxAtime: true, paxCtime: true, -} - -// A Header represents a single header in a tar archive. -// Some fields may not be populated. -// -// For forward compatibility, users that retrieve a Header from Reader.Next, -// mutate it in some ways, and then pass it back to Writer.WriteHeader -// should do so by creating a new Header and copying the fields -// that they are interested in preserving. -type Header struct { - // Typeflag is the type of header entry. - // The zero value is automatically promoted to either TypeReg or TypeDir - // depending on the presence of a trailing slash in Name. - Typeflag byte - - Name string // Name of file entry - Linkname string // Target name of link (valid for TypeLink or TypeSymlink) - - Size int64 // Logical file size in bytes - Mode int64 // Permission and mode bits - Uid int // User ID of owner - Gid int // Group ID of owner - Uname string // User name of owner - Gname string // Group name of owner - - // If the Format is unspecified, then Writer.WriteHeader rounds ModTime - // to the nearest second and ignores the AccessTime and ChangeTime fields. - // - // To use AccessTime or ChangeTime, specify the Format as PAX or GNU. - // To use sub-second resolution, specify the Format as PAX. - ModTime time.Time // Modification time - AccessTime time.Time // Access time (requires either PAX or GNU support) - ChangeTime time.Time // Change time (requires either PAX or GNU support) - - Devmajor int64 // Major device number (valid for TypeChar or TypeBlock) - Devminor int64 // Minor device number (valid for TypeChar or TypeBlock) - - // Xattrs stores extended attributes as PAX records under the - // "SCHILY.xattr." namespace. - // - // The following are semantically equivalent: - // h.Xattrs[key] = value - // h.PAXRecords["SCHILY.xattr."+key] = value - // - // When Writer.WriteHeader is called, the contents of Xattrs will take - // precedence over those in PAXRecords. - // - // Deprecated: Use PAXRecords instead. - Xattrs map[string]string - - // PAXRecords is a map of PAX extended header records. - // - // User-defined records should have keys of the following form: - // VENDOR.keyword - // Where VENDOR is some namespace in all uppercase, and keyword may - // not contain the '=' character (e.g., "GOLANG.pkg.version"). - // The key and value should be non-empty UTF-8 strings. - // - // When Writer.WriteHeader is called, PAX records derived from the - // other fields in Header take precedence over PAXRecords. - PAXRecords map[string]string - - // Format specifies the format of the tar header. - // - // This is set by Reader.Next as a best-effort guess at the format. - // Since the Reader liberally reads some non-compliant files, - // it is possible for this to be FormatUnknown. - // - // If the format is unspecified when Writer.WriteHeader is called, - // then it uses the first format (in the order of USTAR, PAX, GNU) - // capable of encoding this Header (see Format). - Format Format -} - -// sparseEntry represents a Length-sized fragment at Offset in the file. -type sparseEntry struct{ Offset, Length int64 } - -func (s sparseEntry) endOffset() int64 { return s.Offset + s.Length } - -// A sparse file can be represented as either a sparseDatas or a sparseHoles. -// As long as the total size is known, they are equivalent and one can be -// converted to the other form and back. The various tar formats with sparse -// file support represent sparse files in the sparseDatas form. That is, they -// specify the fragments in the file that has data, and treat everything else as -// having zero bytes. As such, the encoding and decoding logic in this package -// deals with sparseDatas. -// -// However, the external API uses sparseHoles instead of sparseDatas because the -// zero value of sparseHoles logically represents a normal file (i.e., there are -// no holes in it). On the other hand, the zero value of sparseDatas implies -// that the file has no data in it, which is rather odd. -// -// As an example, if the underlying raw file contains the 10-byte data: -// var compactFile = "abcdefgh" -// -// And the sparse map has the following entries: -// var spd sparseDatas = []sparseEntry{ -// {Offset: 2, Length: 5}, // Data fragment for 2..6 -// {Offset: 18, Length: 3}, // Data fragment for 18..20 -// } -// var sph sparseHoles = []sparseEntry{ -// {Offset: 0, Length: 2}, // Hole fragment for 0..1 -// {Offset: 7, Length: 11}, // Hole fragment for 7..17 -// {Offset: 21, Length: 4}, // Hole fragment for 21..24 -// } -// -// Then the content of the resulting sparse file with a Header.Size of 25 is: -// var sparseFile = "\x00"*2 + "abcde" + "\x00"*11 + "fgh" + "\x00"*4 -type ( - sparseDatas []sparseEntry - sparseHoles []sparseEntry -) - -// validateSparseEntries reports whether sp is a valid sparse map. -// It does not matter whether sp represents data fragments or hole fragments. -func validateSparseEntries(sp []sparseEntry, size int64) bool { - // Validate all sparse entries. These are the same checks as performed by - // the BSD tar utility. - if size < 0 { - return false - } - var pre sparseEntry - for _, cur := range sp { - switch { - case cur.Offset < 0 || cur.Length < 0: - return false // Negative values are never okay - case cur.Offset > math.MaxInt64-cur.Length: - return false // Integer overflow with large length - case cur.endOffset() > size: - return false // Region extends beyond the actual size - case pre.endOffset() > cur.Offset: - return false // Regions cannot overlap and must be in order - } - pre = cur - } - return true -} - -// alignSparseEntries mutates src and returns dst where each fragment's -// starting offset is aligned up to the nearest block edge, and each -// ending offset is aligned down to the nearest block edge. -// -// Even though the Go tar Reader and the BSD tar utility can handle entries -// with arbitrary offsets and lengths, the GNU tar utility can only handle -// offsets and lengths that are multiples of blockSize. -func alignSparseEntries(src []sparseEntry, size int64) []sparseEntry { - dst := src[:0] - for _, s := range src { - pos, end := s.Offset, s.endOffset() - pos += blockPadding(+pos) // Round-up to nearest blockSize - if end != size { - end -= blockPadding(-end) // Round-down to nearest blockSize - } - if pos < end { - dst = append(dst, sparseEntry{Offset: pos, Length: end - pos}) - } - } - return dst -} - -// invertSparseEntries converts a sparse map from one form to the other. -// If the input is sparseHoles, then it will output sparseDatas and vice-versa. -// The input must have been already validated. -// -// This function mutates src and returns a normalized map where: -// * adjacent fragments are coalesced together -// * only the last fragment may be empty -// * the endOffset of the last fragment is the total size -func invertSparseEntries(src []sparseEntry, size int64) []sparseEntry { - dst := src[:0] - var pre sparseEntry - for _, cur := range src { - if cur.Length == 0 { - continue // Skip empty fragments - } - pre.Length = cur.Offset - pre.Offset - if pre.Length > 0 { - dst = append(dst, pre) // Only add non-empty fragments - } - pre.Offset = cur.endOffset() - } - pre.Length = size - pre.Offset // Possibly the only empty fragment - return append(dst, pre) -} - -// fileState tracks the number of logical (includes sparse holes) and physical -// (actual in tar archive) bytes remaining for the current file. -// -// Invariant: LogicalRemaining >= PhysicalRemaining -type fileState interface { - LogicalRemaining() int64 - PhysicalRemaining() int64 -} - -// allowedFormats determines which formats can be used. -// The value returned is the logical OR of multiple possible formats. -// If the value is FormatUnknown, then the input Header cannot be encoded -// and an error is returned explaining why. -// -// As a by-product of checking the fields, this function returns paxHdrs, which -// contain all fields that could not be directly encoded. -// A value receiver ensures that this method does not mutate the source Header. -func (h Header) allowedFormats() (format Format, paxHdrs map[string]string, err error) { - format = FormatUSTAR | FormatPAX | FormatGNU - paxHdrs = make(map[string]string) - - var whyNoUSTAR, whyNoPAX, whyNoGNU string - var preferPAX bool // Prefer PAX over USTAR - verifyString := func(s string, size int, name, paxKey string) { - // NUL-terminator is optional for path and linkpath. - // Technically, it is required for uname and gname, - // but neither GNU nor BSD tar checks for it. - tooLong := len(s) > size - allowLongGNU := paxKey == paxPath || paxKey == paxLinkpath - if hasNUL(s) || (tooLong && !allowLongGNU) { - whyNoGNU = fmt.Sprintf("GNU cannot encode %s=%q", name, s) - format.mustNotBe(FormatGNU) - } - if !isASCII(s) || tooLong { - canSplitUSTAR := paxKey == paxPath - if _, _, ok := splitUSTARPath(s); !canSplitUSTAR || !ok { - whyNoUSTAR = fmt.Sprintf("USTAR cannot encode %s=%q", name, s) - format.mustNotBe(FormatUSTAR) - } - if paxKey == paxNone { - whyNoPAX = fmt.Sprintf("PAX cannot encode %s=%q", name, s) - format.mustNotBe(FormatPAX) - } else { - paxHdrs[paxKey] = s - } - } - if v, ok := h.PAXRecords[paxKey]; ok && v == s { - paxHdrs[paxKey] = v - } - } - verifyNumeric := func(n int64, size int, name, paxKey string) { - if !fitsInBase256(size, n) { - whyNoGNU = fmt.Sprintf("GNU cannot encode %s=%d", name, n) - format.mustNotBe(FormatGNU) - } - if !fitsInOctal(size, n) { - whyNoUSTAR = fmt.Sprintf("USTAR cannot encode %s=%d", name, n) - format.mustNotBe(FormatUSTAR) - if paxKey == paxNone { - whyNoPAX = fmt.Sprintf("PAX cannot encode %s=%d", name, n) - format.mustNotBe(FormatPAX) - } else { - paxHdrs[paxKey] = strconv.FormatInt(n, 10) - } - } - if v, ok := h.PAXRecords[paxKey]; ok && v == strconv.FormatInt(n, 10) { - paxHdrs[paxKey] = v - } - } - verifyTime := func(ts time.Time, size int, name, paxKey string) { - if ts.IsZero() { - return // Always okay - } - if !fitsInBase256(size, ts.Unix()) { - whyNoGNU = fmt.Sprintf("GNU cannot encode %s=%v", name, ts) - format.mustNotBe(FormatGNU) - } - isMtime := paxKey == paxMtime - fitsOctal := fitsInOctal(size, ts.Unix()) - if (isMtime && !fitsOctal) || !isMtime { - whyNoUSTAR = fmt.Sprintf("USTAR cannot encode %s=%v", name, ts) - format.mustNotBe(FormatUSTAR) - } - needsNano := ts.Nanosecond() != 0 - if !isMtime || !fitsOctal || needsNano { - preferPAX = true // USTAR may truncate sub-second measurements - if paxKey == paxNone { - whyNoPAX = fmt.Sprintf("PAX cannot encode %s=%v", name, ts) - format.mustNotBe(FormatPAX) - } else { - paxHdrs[paxKey] = formatPAXTime(ts) - } - } - if v, ok := h.PAXRecords[paxKey]; ok && v == formatPAXTime(ts) { - paxHdrs[paxKey] = v - } - } - - // Check basic fields. - var blk block - v7 := blk.V7() - ustar := blk.USTAR() - gnu := blk.GNU() - verifyString(h.Name, len(v7.Name()), "Name", paxPath) - verifyString(h.Linkname, len(v7.LinkName()), "Linkname", paxLinkpath) - verifyString(h.Uname, len(ustar.UserName()), "Uname", paxUname) - verifyString(h.Gname, len(ustar.GroupName()), "Gname", paxGname) - verifyNumeric(h.Mode, len(v7.Mode()), "Mode", paxNone) - verifyNumeric(int64(h.Uid), len(v7.UID()), "Uid", paxUid) - verifyNumeric(int64(h.Gid), len(v7.GID()), "Gid", paxGid) - verifyNumeric(h.Size, len(v7.Size()), "Size", paxSize) - verifyNumeric(h.Devmajor, len(ustar.DevMajor()), "Devmajor", paxNone) - verifyNumeric(h.Devminor, len(ustar.DevMinor()), "Devminor", paxNone) - verifyTime(h.ModTime, len(v7.ModTime()), "ModTime", paxMtime) - verifyTime(h.AccessTime, len(gnu.AccessTime()), "AccessTime", paxAtime) - verifyTime(h.ChangeTime, len(gnu.ChangeTime()), "ChangeTime", paxCtime) - - // Check for header-only types. - var whyOnlyPAX, whyOnlyGNU string - switch h.Typeflag { - case TypeReg, TypeChar, TypeBlock, TypeFifo, TypeGNUSparse: - // Exclude TypeLink and TypeSymlink, since they may reference directories. - if strings.HasSuffix(h.Name, "/") { - return FormatUnknown, nil, headerError{"filename may not have trailing slash"} - } - case TypeXHeader, TypeGNULongName, TypeGNULongLink: - return FormatUnknown, nil, headerError{"cannot manually encode TypeXHeader, TypeGNULongName, or TypeGNULongLink headers"} - case TypeXGlobalHeader: - h2 := Header{Name: h.Name, Typeflag: h.Typeflag, Xattrs: h.Xattrs, PAXRecords: h.PAXRecords, Format: h.Format} - if !reflect.DeepEqual(h, h2) { - return FormatUnknown, nil, headerError{"only PAXRecords should be set for TypeXGlobalHeader"} - } - whyOnlyPAX = "only PAX supports TypeXGlobalHeader" - format.mayOnlyBe(FormatPAX) - } - if !isHeaderOnlyType(h.Typeflag) && h.Size < 0 { - return FormatUnknown, nil, headerError{"negative size on header-only type"} - } - - // Check PAX records. - if len(h.Xattrs) > 0 { - for k, v := range h.Xattrs { - paxHdrs[paxSchilyXattr+k] = v - } - whyOnlyPAX = "only PAX supports Xattrs" - format.mayOnlyBe(FormatPAX) - } - if len(h.PAXRecords) > 0 { - for k, v := range h.PAXRecords { - switch _, exists := paxHdrs[k]; { - case exists: - continue // Do not overwrite existing records - case h.Typeflag == TypeXGlobalHeader: - paxHdrs[k] = v // Copy all records - case !basicKeys[k] && !strings.HasPrefix(k, paxGNUSparse): - paxHdrs[k] = v // Ignore local records that may conflict - } - } - whyOnlyPAX = "only PAX supports PAXRecords" - format.mayOnlyBe(FormatPAX) - } - for k, v := range paxHdrs { - if !validPAXRecord(k, v) { - return FormatUnknown, nil, headerError{fmt.Sprintf("invalid PAX record: %q", k+" = "+v)} - } - } - - // TODO(dsnet): Re-enable this when adding sparse support. - // See https://golang.org/issue/22735 - /* - // Check sparse files. - if len(h.SparseHoles) > 0 || h.Typeflag == TypeGNUSparse { - if isHeaderOnlyType(h.Typeflag) { - return FormatUnknown, nil, headerError{"header-only type cannot be sparse"} - } - if !validateSparseEntries(h.SparseHoles, h.Size) { - return FormatUnknown, nil, headerError{"invalid sparse holes"} - } - if h.Typeflag == TypeGNUSparse { - whyOnlyGNU = "only GNU supports TypeGNUSparse" - format.mayOnlyBe(FormatGNU) - } else { - whyNoGNU = "GNU supports sparse files only with TypeGNUSparse" - format.mustNotBe(FormatGNU) - } - whyNoUSTAR = "USTAR does not support sparse files" - format.mustNotBe(FormatUSTAR) - } - */ - - // Check desired format. - if wantFormat := h.Format; wantFormat != FormatUnknown { - if wantFormat.has(FormatPAX) && !preferPAX { - wantFormat.mayBe(FormatUSTAR) // PAX implies USTAR allowed too - } - format.mayOnlyBe(wantFormat) // Set union of formats allowed and format wanted - } - if format == FormatUnknown { - switch h.Format { - case FormatUSTAR: - err = headerError{"Format specifies USTAR", whyNoUSTAR, whyOnlyPAX, whyOnlyGNU} - case FormatPAX: - err = headerError{"Format specifies PAX", whyNoPAX, whyOnlyGNU} - case FormatGNU: - err = headerError{"Format specifies GNU", whyNoGNU, whyOnlyPAX} - default: - err = headerError{whyNoUSTAR, whyNoPAX, whyNoGNU, whyOnlyPAX, whyOnlyGNU} - } - } - return format, paxHdrs, err -} - -// FileInfo returns an os.FileInfo for the Header. -func (h *Header) FileInfo() os.FileInfo { - return headerFileInfo{h} -} - -// headerFileInfo implements os.FileInfo. -type headerFileInfo struct { - h *Header -} - -func (fi headerFileInfo) Size() int64 { return fi.h.Size } -func (fi headerFileInfo) IsDir() bool { return fi.Mode().IsDir() } -func (fi headerFileInfo) ModTime() time.Time { return fi.h.ModTime } -func (fi headerFileInfo) Sys() interface{} { return fi.h } - -// Name returns the base name of the file. -func (fi headerFileInfo) Name() string { - if fi.IsDir() { - return path.Base(path.Clean(fi.h.Name)) - } - return path.Base(fi.h.Name) -} - -// Mode returns the permission and mode bits for the headerFileInfo. -func (fi headerFileInfo) Mode() (mode os.FileMode) { - // Set file permission bits. - mode = os.FileMode(fi.h.Mode).Perm() - - // Set setuid, setgid and sticky bits. - if fi.h.Mode&c_ISUID != 0 { - mode |= os.ModeSetuid - } - if fi.h.Mode&c_ISGID != 0 { - mode |= os.ModeSetgid - } - if fi.h.Mode&c_ISVTX != 0 { - mode |= os.ModeSticky - } - - // Set file mode bits; clear perm, setuid, setgid, and sticky bits. - switch m := os.FileMode(fi.h.Mode) &^ 07777; m { - case c_ISDIR: - mode |= os.ModeDir - case c_ISFIFO: - mode |= os.ModeNamedPipe - case c_ISLNK: - mode |= os.ModeSymlink - case c_ISBLK: - mode |= os.ModeDevice - case c_ISCHR: - mode |= os.ModeDevice - mode |= os.ModeCharDevice - case c_ISSOCK: - mode |= os.ModeSocket - } - - switch fi.h.Typeflag { - case TypeSymlink: - mode |= os.ModeSymlink - case TypeChar: - mode |= os.ModeDevice - mode |= os.ModeCharDevice - case TypeBlock: - mode |= os.ModeDevice - case TypeDir: - mode |= os.ModeDir - case TypeFifo: - mode |= os.ModeNamedPipe - } - - return mode -} - -// sysStat, if non-nil, populates h from system-dependent fields of fi. -var sysStat func(fi os.FileInfo, h *Header) error - -const ( - // Mode constants from the USTAR spec: - // See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06 - c_ISUID = 04000 // Set uid - c_ISGID = 02000 // Set gid - c_ISVTX = 01000 // Save text (sticky bit) - - // Common Unix mode constants; these are not defined in any common tar standard. - // Header.FileInfo understands these, but FileInfoHeader will never produce these. - c_ISDIR = 040000 // Directory - c_ISFIFO = 010000 // FIFO - c_ISREG = 0100000 // Regular file - c_ISLNK = 0120000 // Symbolic link - c_ISBLK = 060000 // Block special file - c_ISCHR = 020000 // Character special file - c_ISSOCK = 0140000 // Socket -) - -// FileInfoHeader creates a partially-populated Header from fi. -// If fi describes a symlink, FileInfoHeader records link as the link target. -// If fi describes a directory, a slash is appended to the name. -// -// Since os.FileInfo's Name method only returns the base name of -// the file it describes, it may be necessary to modify Header.Name -// to provide the full path name of the file. -func FileInfoHeader(fi os.FileInfo, link string) (*Header, error) { - if fi == nil { - return nil, errors.New("archive/tar: FileInfo is nil") - } - fm := fi.Mode() - h := &Header{ - Name: fi.Name(), - ModTime: fi.ModTime(), - Mode: int64(fm.Perm()), // or'd with c_IS* constants later - } - switch { - case fm.IsRegular(): - h.Typeflag = TypeReg - h.Size = fi.Size() - case fi.IsDir(): - h.Typeflag = TypeDir - h.Name += "/" - case fm&os.ModeSymlink != 0: - h.Typeflag = TypeSymlink - h.Linkname = link - case fm&os.ModeDevice != 0: - if fm&os.ModeCharDevice != 0 { - h.Typeflag = TypeChar - } else { - h.Typeflag = TypeBlock - } - case fm&os.ModeNamedPipe != 0: - h.Typeflag = TypeFifo - case fm&os.ModeSocket != 0: - return nil, fmt.Errorf("archive/tar: sockets not supported") - default: - return nil, fmt.Errorf("archive/tar: unknown file mode %v", fm) - } - if fm&os.ModeSetuid != 0 { - h.Mode |= c_ISUID - } - if fm&os.ModeSetgid != 0 { - h.Mode |= c_ISGID - } - if fm&os.ModeSticky != 0 { - h.Mode |= c_ISVTX - } - // If possible, populate additional fields from OS-specific - // FileInfo fields. - if sys, ok := fi.Sys().(*Header); ok { - // This FileInfo came from a Header (not the OS). Use the - // original Header to populate all remaining fields. - h.Uid = sys.Uid - h.Gid = sys.Gid - h.Uname = sys.Uname - h.Gname = sys.Gname - h.AccessTime = sys.AccessTime - h.ChangeTime = sys.ChangeTime - if sys.Xattrs != nil { - h.Xattrs = make(map[string]string) - for k, v := range sys.Xattrs { - h.Xattrs[k] = v - } - } - if sys.Typeflag == TypeLink { - // hard link - h.Typeflag = TypeLink - h.Size = 0 - h.Linkname = sys.Linkname - } - if sys.PAXRecords != nil { - h.PAXRecords = make(map[string]string) - for k, v := range sys.PAXRecords { - h.PAXRecords[k] = v - } - } - } - if sysStat != nil { - return h, sysStat(fi, h) - } - return h, nil -} - -// isHeaderOnlyType checks if the given type flag is of the type that has no -// data section even if a size is specified. -func isHeaderOnlyType(flag byte) bool { - switch flag { - case TypeLink, TypeSymlink, TypeChar, TypeBlock, TypeDir, TypeFifo: - return true - default: - return false - } -} - -func min(a, b int64) int64 { - if a < b { - return a - } - return b -} diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/format.go b/vendor/github.com/vbatts/tar-split/archive/tar/format.go deleted file mode 100644 index 1f89d0c5..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/format.go +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright 2016 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 tar - -import "strings" - -// Format represents the tar archive format. -// -// The original tar format was introduced in Unix V7. -// Since then, there have been multiple competing formats attempting to -// standardize or extend the V7 format to overcome its limitations. -// The most common formats are the USTAR, PAX, and GNU formats, -// each with their own advantages and limitations. -// -// The following table captures the capabilities of each format: -// -// | USTAR | PAX | GNU -// ------------------+--------+-----------+---------- -// Name | 256B | unlimited | unlimited -// Linkname | 100B | unlimited | unlimited -// Size | uint33 | unlimited | uint89 -// Mode | uint21 | uint21 | uint57 -// Uid/Gid | uint21 | unlimited | uint57 -// Uname/Gname | 32B | unlimited | 32B -// ModTime | uint33 | unlimited | int89 -// AccessTime | n/a | unlimited | int89 -// ChangeTime | n/a | unlimited | int89 -// Devmajor/Devminor | uint21 | uint21 | uint57 -// ------------------+--------+-----------+---------- -// string encoding | ASCII | UTF-8 | binary -// sub-second times | no | yes | no -// sparse files | no | yes | yes -// -// The table's upper portion shows the Header fields, where each format reports -// the maximum number of bytes allowed for each string field and -// the integer type used to store each numeric field -// (where timestamps are stored as the number of seconds since the Unix epoch). -// -// The table's lower portion shows specialized features of each format, -// such as supported string encodings, support for sub-second timestamps, -// or support for sparse files. -// -// The Writer currently provides no support for sparse files. -type Format int - -// Constants to identify various tar formats. -const ( - // Deliberately hide the meaning of constants from public API. - _ Format = (1 << iota) / 4 // Sequence of 0, 0, 1, 2, 4, 8, etc... - - // FormatUnknown indicates that the format is unknown. - FormatUnknown - - // The format of the original Unix V7 tar tool prior to standardization. - formatV7 - - // FormatUSTAR represents the USTAR header format defined in POSIX.1-1988. - // - // While this format is compatible with most tar readers, - // the format has several limitations making it unsuitable for some usages. - // Most notably, it cannot support sparse files, files larger than 8GiB, - // filenames larger than 256 characters, and non-ASCII filenames. - // - // Reference: - // http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06 - FormatUSTAR - - // FormatPAX represents the PAX header format defined in POSIX.1-2001. - // - // PAX extends USTAR by writing a special file with Typeflag TypeXHeader - // preceding the original header. This file contains a set of key-value - // records, which are used to overcome USTAR's shortcomings, in addition to - // providing the ability to have sub-second resolution for timestamps. - // - // Some newer formats add their own extensions to PAX by defining their - // own keys and assigning certain semantic meaning to the associated values. - // For example, sparse file support in PAX is implemented using keys - // defined by the GNU manual (e.g., "GNU.sparse.map"). - // - // Reference: - // http://pubs.opengroup.org/onlinepubs/009695399/utilities/pax.html - FormatPAX - - // FormatGNU represents the GNU header format. - // - // The GNU header format is older than the USTAR and PAX standards and - // is not compatible with them. The GNU format supports - // arbitrary file sizes, filenames of arbitrary encoding and length, - // sparse files, and other features. - // - // It is recommended that PAX be chosen over GNU unless the target - // application can only parse GNU formatted archives. - // - // Reference: - // https://www.gnu.org/software/tar/manual/html_node/Standard.html - FormatGNU - - // Schily's tar format, which is incompatible with USTAR. - // This does not cover STAR extensions to the PAX format; these fall under - // the PAX format. - formatSTAR - - formatMax -) - -func (f Format) has(f2 Format) bool { return f&f2 != 0 } -func (f *Format) mayBe(f2 Format) { *f |= f2 } -func (f *Format) mayOnlyBe(f2 Format) { *f &= f2 } -func (f *Format) mustNotBe(f2 Format) { *f &^= f2 } - -var formatNames = map[Format]string{ - formatV7: "V7", FormatUSTAR: "USTAR", FormatPAX: "PAX", FormatGNU: "GNU", formatSTAR: "STAR", -} - -func (f Format) String() string { - var ss []string - for f2 := Format(1); f2 < formatMax; f2 <<= 1 { - if f.has(f2) { - ss = append(ss, formatNames[f2]) - } - } - switch len(ss) { - case 0: - return "" - case 1: - return ss[0] - default: - return "(" + strings.Join(ss, " | ") + ")" - } -} - -// Magics used to identify various formats. -const ( - magicGNU, versionGNU = "ustar ", " \x00" - magicUSTAR, versionUSTAR = "ustar\x00", "00" - trailerSTAR = "tar\x00" -) - -// Size constants from various tar specifications. -const ( - blockSize = 512 // Size of each block in a tar stream - nameSize = 100 // Max length of the name field in USTAR format - prefixSize = 155 // Max length of the prefix field in USTAR format -) - -// blockPadding computes the number of bytes needed to pad offset up to the -// nearest block edge where 0 <= n < blockSize. -func blockPadding(offset int64) (n int64) { - return -offset & (blockSize - 1) -} - -var zeroBlock block - -type block [blockSize]byte - -// Convert block to any number of formats. -func (b *block) V7() *headerV7 { return (*headerV7)(b) } -func (b *block) GNU() *headerGNU { return (*headerGNU)(b) } -func (b *block) STAR() *headerSTAR { return (*headerSTAR)(b) } -func (b *block) USTAR() *headerUSTAR { return (*headerUSTAR)(b) } -func (b *block) Sparse() sparseArray { return (sparseArray)(b[:]) } - -// GetFormat checks that the block is a valid tar header based on the checksum. -// It then attempts to guess the specific format based on magic values. -// If the checksum fails, then FormatUnknown is returned. -func (b *block) GetFormat() Format { - // Verify checksum. - var p parser - value := p.parseOctal(b.V7().Chksum()) - chksum1, chksum2 := b.ComputeChecksum() - if p.err != nil || (value != chksum1 && value != chksum2) { - return FormatUnknown - } - - // Guess the magic values. - magic := string(b.USTAR().Magic()) - version := string(b.USTAR().Version()) - trailer := string(b.STAR().Trailer()) - switch { - case magic == magicUSTAR && trailer == trailerSTAR: - return formatSTAR - case magic == magicUSTAR: - return FormatUSTAR | FormatPAX - case magic == magicGNU && version == versionGNU: - return FormatGNU - default: - return formatV7 - } -} - -// SetFormat writes the magic values necessary for specified format -// and then updates the checksum accordingly. -func (b *block) SetFormat(format Format) { - // Set the magic values. - switch { - case format.has(formatV7): - // Do nothing. - case format.has(FormatGNU): - copy(b.GNU().Magic(), magicGNU) - copy(b.GNU().Version(), versionGNU) - case format.has(formatSTAR): - copy(b.STAR().Magic(), magicUSTAR) - copy(b.STAR().Version(), versionUSTAR) - copy(b.STAR().Trailer(), trailerSTAR) - case format.has(FormatUSTAR | FormatPAX): - copy(b.USTAR().Magic(), magicUSTAR) - copy(b.USTAR().Version(), versionUSTAR) - default: - panic("invalid format") - } - - // Update checksum. - // This field is special in that it is terminated by a NULL then space. - var f formatter - field := b.V7().Chksum() - chksum, _ := b.ComputeChecksum() // Possible values are 256..128776 - f.formatOctal(field[:7], chksum) // Never fails since 128776 < 262143 - field[7] = ' ' -} - -// ComputeChecksum computes the checksum for the header block. -// POSIX specifies a sum of the unsigned byte values, but the Sun tar used -// signed byte values. -// We compute and return both. -func (b *block) ComputeChecksum() (unsigned, signed int64) { - for i, c := range b { - if 148 <= i && i < 156 { - c = ' ' // Treat the checksum field itself as all spaces. - } - unsigned += int64(c) - signed += int64(int8(c)) - } - return unsigned, signed -} - -// Reset clears the block with all zeros. -func (b *block) Reset() { - *b = block{} -} - -type headerV7 [blockSize]byte - -func (h *headerV7) Name() []byte { return h[000:][:100] } -func (h *headerV7) Mode() []byte { return h[100:][:8] } -func (h *headerV7) UID() []byte { return h[108:][:8] } -func (h *headerV7) GID() []byte { return h[116:][:8] } -func (h *headerV7) Size() []byte { return h[124:][:12] } -func (h *headerV7) ModTime() []byte { return h[136:][:12] } -func (h *headerV7) Chksum() []byte { return h[148:][:8] } -func (h *headerV7) TypeFlag() []byte { return h[156:][:1] } -func (h *headerV7) LinkName() []byte { return h[157:][:100] } - -type headerGNU [blockSize]byte - -func (h *headerGNU) V7() *headerV7 { return (*headerV7)(h) } -func (h *headerGNU) Magic() []byte { return h[257:][:6] } -func (h *headerGNU) Version() []byte { return h[263:][:2] } -func (h *headerGNU) UserName() []byte { return h[265:][:32] } -func (h *headerGNU) GroupName() []byte { return h[297:][:32] } -func (h *headerGNU) DevMajor() []byte { return h[329:][:8] } -func (h *headerGNU) DevMinor() []byte { return h[337:][:8] } -func (h *headerGNU) AccessTime() []byte { return h[345:][:12] } -func (h *headerGNU) ChangeTime() []byte { return h[357:][:12] } -func (h *headerGNU) Sparse() sparseArray { return (sparseArray)(h[386:][:24*4+1]) } -func (h *headerGNU) RealSize() []byte { return h[483:][:12] } - -type headerSTAR [blockSize]byte - -func (h *headerSTAR) V7() *headerV7 { return (*headerV7)(h) } -func (h *headerSTAR) Magic() []byte { return h[257:][:6] } -func (h *headerSTAR) Version() []byte { return h[263:][:2] } -func (h *headerSTAR) UserName() []byte { return h[265:][:32] } -func (h *headerSTAR) GroupName() []byte { return h[297:][:32] } -func (h *headerSTAR) DevMajor() []byte { return h[329:][:8] } -func (h *headerSTAR) DevMinor() []byte { return h[337:][:8] } -func (h *headerSTAR) Prefix() []byte { return h[345:][:131] } -func (h *headerSTAR) AccessTime() []byte { return h[476:][:12] } -func (h *headerSTAR) ChangeTime() []byte { return h[488:][:12] } -func (h *headerSTAR) Trailer() []byte { return h[508:][:4] } - -type headerUSTAR [blockSize]byte - -func (h *headerUSTAR) V7() *headerV7 { return (*headerV7)(h) } -func (h *headerUSTAR) Magic() []byte { return h[257:][:6] } -func (h *headerUSTAR) Version() []byte { return h[263:][:2] } -func (h *headerUSTAR) UserName() []byte { return h[265:][:32] } -func (h *headerUSTAR) GroupName() []byte { return h[297:][:32] } -func (h *headerUSTAR) DevMajor() []byte { return h[329:][:8] } -func (h *headerUSTAR) DevMinor() []byte { return h[337:][:8] } -func (h *headerUSTAR) Prefix() []byte { return h[345:][:155] } - -type sparseArray []byte - -func (s sparseArray) Entry(i int) sparseElem { return (sparseElem)(s[i*24:]) } -func (s sparseArray) IsExtended() []byte { return s[24*s.MaxEntries():][:1] } -func (s sparseArray) MaxEntries() int { return len(s) / 24 } - -type sparseElem []byte - -func (s sparseElem) Offset() []byte { return s[00:][:12] } -func (s sparseElem) Length() []byte { return s[12:][:12] } diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/reader.go b/vendor/github.com/vbatts/tar-split/archive/tar/reader.go deleted file mode 100644 index af006fc9..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/reader.go +++ /dev/null @@ -1,924 +0,0 @@ -// Copyright 2009 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 tar - -import ( - "bytes" - "io" - "strconv" - "strings" - "time" -) - -// Reader provides sequential access to the contents of a tar archive. -// Reader.Next advances to the next file in the archive (including the first), -// and then Reader can be treated as an io.Reader to access the file's data. -type Reader struct { - r io.Reader - pad int64 // Amount of padding (ignored) after current file entry - curr fileReader // Reader for current file entry - blk block // Buffer to use as temporary local storage - - // err is a persistent error. - // It is only the responsibility of every exported method of Reader to - // ensure that this error is sticky. - err error - - RawAccounting bool // Whether to enable the access needed to reassemble the tar from raw bytes. Some performance/memory hit for this. - rawBytes *bytes.Buffer // last raw bits -} - -type fileReader interface { - io.Reader - fileState - - WriteTo(io.Writer) (int64, error) -} - -// RawBytes accesses the raw bytes of the archive, apart from the file payload itself. -// This includes the header and padding. -// -// # This call resets the current rawbytes buffer -// -// Only when RawAccounting is enabled, otherwise this returns nil -func (tr *Reader) RawBytes() []byte { - if !tr.RawAccounting { - return nil - } - if tr.rawBytes == nil { - tr.rawBytes = bytes.NewBuffer(nil) - } - defer tr.rawBytes.Reset() // if we've read them, then flush them. - - return tr.rawBytes.Bytes() - -} - -// NewReader creates a new Reader reading from r. -func NewReader(r io.Reader) *Reader { - return &Reader{r: r, curr: ®FileReader{r, 0}} -} - -// Next advances to the next entry in the tar archive. -// The Header.Size determines how many bytes can be read for the next file. -// Any remaining data in the current file is automatically discarded. -// -// io.EOF is returned at the end of the input. -func (tr *Reader) Next() (*Header, error) { - if tr.err != nil { - return nil, tr.err - } - hdr, err := tr.next() - tr.err = err - return hdr, err -} - -func (tr *Reader) next() (*Header, error) { - var paxHdrs map[string]string - var gnuLongName, gnuLongLink string - - if tr.RawAccounting { - if tr.rawBytes == nil { - tr.rawBytes = bytes.NewBuffer(nil) - } else { - tr.rawBytes.Reset() - } - } - - // Externally, Next iterates through the tar archive as if it is a series of - // files. Internally, the tar format often uses fake "files" to add meta - // data that describes the next file. These meta data "files" should not - // normally be visible to the outside. As such, this loop iterates through - // one or more "header files" until it finds a "normal file". - format := FormatUSTAR | FormatPAX | FormatGNU - for { - // Discard the remainder of the file and any padding. - if err := discard(tr, tr.curr.PhysicalRemaining()); err != nil { - return nil, err - } - n, err := tryReadFull(tr.r, tr.blk[:tr.pad]) - if err != nil { - return nil, err - } - if tr.RawAccounting { - tr.rawBytes.Write(tr.blk[:n]) - } - tr.pad = 0 - - hdr, rawHdr, err := tr.readHeader() - if err != nil { - return nil, err - } - if err := tr.handleRegularFile(hdr); err != nil { - return nil, err - } - format.mayOnlyBe(hdr.Format) - - // Check for PAX/GNU special headers and files. - switch hdr.Typeflag { - case TypeXHeader, TypeXGlobalHeader: - format.mayOnlyBe(FormatPAX) - paxHdrs, err = parsePAX(tr) - if err != nil { - return nil, err - } - if hdr.Typeflag == TypeXGlobalHeader { - if err = mergePAX(hdr, paxHdrs); err != nil { - return nil, err - } - return &Header{ - Name: hdr.Name, - Typeflag: hdr.Typeflag, - Xattrs: hdr.Xattrs, - PAXRecords: hdr.PAXRecords, - Format: format, - }, nil - } - continue // This is a meta header affecting the next header - case TypeGNULongName, TypeGNULongLink: - format.mayOnlyBe(FormatGNU) - realname, err := io.ReadAll(tr) - if err != nil { - return nil, err - } - - if tr.RawAccounting { - tr.rawBytes.Write(realname) - } - - var p parser - switch hdr.Typeflag { - case TypeGNULongName: - gnuLongName = p.parseString(realname) - case TypeGNULongLink: - gnuLongLink = p.parseString(realname) - } - continue // This is a meta header affecting the next header - default: - // The old GNU sparse format is handled here since it is technically - // just a regular file with additional attributes. - - if err := mergePAX(hdr, paxHdrs); err != nil { - return nil, err - } - if gnuLongName != "" { - hdr.Name = gnuLongName - } - if gnuLongLink != "" { - hdr.Linkname = gnuLongLink - } - if hdr.Typeflag == TypeRegA { - if strings.HasSuffix(hdr.Name, "/") { - hdr.Typeflag = TypeDir // Legacy archives use trailing slash for directories - } else { - hdr.Typeflag = TypeReg - } - } - - // The extended headers may have updated the size. - // Thus, setup the regFileReader again after merging PAX headers. - if err := tr.handleRegularFile(hdr); err != nil { - return nil, err - } - - // Sparse formats rely on being able to read from the logical data - // section; there must be a preceding call to handleRegularFile. - if err := tr.handleSparseFile(hdr, rawHdr); err != nil { - return nil, err - } - - // Set the final guess at the format. - if format.has(FormatUSTAR) && format.has(FormatPAX) { - format.mayOnlyBe(FormatUSTAR) - } - hdr.Format = format - return hdr, nil // This is a file, so stop - } - } -} - -// handleRegularFile sets up the current file reader and padding such that it -// can only read the following logical data section. It will properly handle -// special headers that contain no data section. -func (tr *Reader) handleRegularFile(hdr *Header) error { - nb := hdr.Size - if isHeaderOnlyType(hdr.Typeflag) { - nb = 0 - } - if nb < 0 { - return ErrHeader - } - - tr.pad = blockPadding(nb) - tr.curr = ®FileReader{r: tr.r, nb: nb} - return nil -} - -// handleSparseFile checks if the current file is a sparse format of any type -// and sets the curr reader appropriately. -func (tr *Reader) handleSparseFile(hdr *Header, rawHdr *block) error { - var spd sparseDatas - var err error - if hdr.Typeflag == TypeGNUSparse { - spd, err = tr.readOldGNUSparseMap(hdr, rawHdr) - } else { - spd, err = tr.readGNUSparsePAXHeaders(hdr) - } - - // If sp is non-nil, then this is a sparse file. - // Note that it is possible for len(sp) == 0. - if err == nil && spd != nil { - if isHeaderOnlyType(hdr.Typeflag) || !validateSparseEntries(spd, hdr.Size) { - return ErrHeader - } - sph := invertSparseEntries(spd, hdr.Size) - tr.curr = &sparseFileReader{tr.curr, sph, 0} - } - return err -} - -// readGNUSparsePAXHeaders checks the PAX headers for GNU sparse headers. -// If they are found, then this function reads the sparse map and returns it. -// This assumes that 0.0 headers have already been converted to 0.1 headers -// by the PAX header parsing logic. -func (tr *Reader) readGNUSparsePAXHeaders(hdr *Header) (sparseDatas, error) { - // Identify the version of GNU headers. - var is1x0 bool - major, minor := hdr.PAXRecords[paxGNUSparseMajor], hdr.PAXRecords[paxGNUSparseMinor] - switch { - case major == "0" && (minor == "0" || minor == "1"): - is1x0 = false - case major == "1" && minor == "0": - is1x0 = true - case major != "" || minor != "": - return nil, nil // Unknown GNU sparse PAX version - case hdr.PAXRecords[paxGNUSparseMap] != "": - is1x0 = false // 0.0 and 0.1 did not have explicit version records, so guess - default: - return nil, nil // Not a PAX format GNU sparse file. - } - hdr.Format.mayOnlyBe(FormatPAX) - - // Update hdr from GNU sparse PAX headers. - if name := hdr.PAXRecords[paxGNUSparseName]; name != "" { - hdr.Name = name - } - size := hdr.PAXRecords[paxGNUSparseSize] - if size == "" { - size = hdr.PAXRecords[paxGNUSparseRealSize] - } - if size != "" { - n, err := strconv.ParseInt(size, 10, 64) - if err != nil { - return nil, ErrHeader - } - hdr.Size = n - } - - // Read the sparse map according to the appropriate format. - if is1x0 { - return readGNUSparseMap1x0(tr.curr) - } - return readGNUSparseMap0x1(hdr.PAXRecords) -} - -// mergePAX merges paxHdrs into hdr for all relevant fields of Header. -func mergePAX(hdr *Header, paxHdrs map[string]string) (err error) { - for k, v := range paxHdrs { - if v == "" { - continue // Keep the original USTAR value - } - var id64 int64 - switch k { - case paxPath: - hdr.Name = v - case paxLinkpath: - hdr.Linkname = v - case paxUname: - hdr.Uname = v - case paxGname: - hdr.Gname = v - case paxUid: - id64, err = strconv.ParseInt(v, 10, 64) - hdr.Uid = int(id64) // Integer overflow possible - case paxGid: - id64, err = strconv.ParseInt(v, 10, 64) - hdr.Gid = int(id64) // Integer overflow possible - case paxAtime: - hdr.AccessTime, err = parsePAXTime(v) - case paxMtime: - hdr.ModTime, err = parsePAXTime(v) - case paxCtime: - hdr.ChangeTime, err = parsePAXTime(v) - case paxSize: - hdr.Size, err = strconv.ParseInt(v, 10, 64) - default: - if strings.HasPrefix(k, paxSchilyXattr) { - if hdr.Xattrs == nil { - hdr.Xattrs = make(map[string]string) - } - hdr.Xattrs[k[len(paxSchilyXattr):]] = v - } - } - if err != nil { - return ErrHeader - } - } - hdr.PAXRecords = paxHdrs - return nil -} - -// parsePAX parses PAX headers. -// If an extended header (type 'x') is invalid, ErrHeader is returned -func parsePAX(r io.Reader) (map[string]string, error) { - buf, err := io.ReadAll(r) - if err != nil { - return nil, err - } - // leaving this function for io.Reader makes it more testable - if tr, ok := r.(*Reader); ok && tr.RawAccounting { - if _, err = tr.rawBytes.Write(buf); err != nil { - return nil, err - } - } - sbuf := string(buf) - - // For GNU PAX sparse format 0.0 support. - // This function transforms the sparse format 0.0 headers into format 0.1 - // headers since 0.0 headers were not PAX compliant. - var sparseMap []string - - paxHdrs := make(map[string]string) - for len(sbuf) > 0 { - key, value, residual, err := parsePAXRecord(sbuf) - if err != nil { - return nil, ErrHeader - } - sbuf = residual - - switch key { - case paxGNUSparseOffset, paxGNUSparseNumBytes: - // Validate sparse header order and value. - if (len(sparseMap)%2 == 0 && key != paxGNUSparseOffset) || - (len(sparseMap)%2 == 1 && key != paxGNUSparseNumBytes) || - strings.Contains(value, ",") { - return nil, ErrHeader - } - sparseMap = append(sparseMap, value) - default: - paxHdrs[key] = value - } - } - if len(sparseMap) > 0 { - paxHdrs[paxGNUSparseMap] = strings.Join(sparseMap, ",") - } - return paxHdrs, nil -} - -// readHeader reads the next block header and assumes that the underlying reader -// is already aligned to a block boundary. It returns the raw block of the -// header in case further processing is required. -// -// The err will be set to io.EOF only when one of the following occurs: -// - Exactly 0 bytes are read and EOF is hit. -// - Exactly 1 block of zeros is read and EOF is hit. -// - At least 2 blocks of zeros are read. -func (tr *Reader) readHeader() (*Header, *block, error) { - // Two blocks of zero bytes marks the end of the archive. - n, err := io.ReadFull(tr.r, tr.blk[:]) - if tr.RawAccounting && (err == nil || err == io.EOF) { - tr.rawBytes.Write(tr.blk[:n]) - } - if err != nil { - return nil, nil, err // EOF is okay here; exactly 0 bytes read - } - - if bytes.Equal(tr.blk[:], zeroBlock[:]) { - n, err = io.ReadFull(tr.r, tr.blk[:]) - if tr.RawAccounting && (err == nil || err == io.EOF) { - tr.rawBytes.Write(tr.blk[:n]) - } - if err != nil { - return nil, nil, err // EOF is okay here; exactly 1 block of zeros read - } - if bytes.Equal(tr.blk[:], zeroBlock[:]) { - return nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read - } - return nil, nil, ErrHeader // Zero block and then non-zero block - } - - // Verify the header matches a known format. - format := tr.blk.GetFormat() - if format == FormatUnknown { - return nil, nil, ErrHeader - } - - var p parser - hdr := new(Header) - - // Unpack the V7 header. - v7 := tr.blk.V7() - hdr.Typeflag = v7.TypeFlag()[0] - hdr.Name = p.parseString(v7.Name()) - hdr.Linkname = p.parseString(v7.LinkName()) - hdr.Size = p.parseNumeric(v7.Size()) - hdr.Mode = p.parseNumeric(v7.Mode()) - hdr.Uid = int(p.parseNumeric(v7.UID())) - hdr.Gid = int(p.parseNumeric(v7.GID())) - hdr.ModTime = time.Unix(p.parseNumeric(v7.ModTime()), 0) - - // Unpack format specific fields. - if format > formatV7 { - ustar := tr.blk.USTAR() - hdr.Uname = p.parseString(ustar.UserName()) - hdr.Gname = p.parseString(ustar.GroupName()) - hdr.Devmajor = p.parseNumeric(ustar.DevMajor()) - hdr.Devminor = p.parseNumeric(ustar.DevMinor()) - - var prefix string - switch { - case format.has(FormatUSTAR | FormatPAX): - hdr.Format = format - ustar := tr.blk.USTAR() - prefix = p.parseString(ustar.Prefix()) - - // For Format detection, check if block is properly formatted since - // the parser is more liberal than what USTAR actually permits. - notASCII := func(r rune) bool { return r >= 0x80 } - if bytes.IndexFunc(tr.blk[:], notASCII) >= 0 { - hdr.Format = FormatUnknown // Non-ASCII characters in block. - } - nul := func(b []byte) bool { return int(b[len(b)-1]) == 0 } - if !(nul(v7.Size()) && nul(v7.Mode()) && nul(v7.UID()) && nul(v7.GID()) && - nul(v7.ModTime()) && nul(ustar.DevMajor()) && nul(ustar.DevMinor())) { - hdr.Format = FormatUnknown // Numeric fields must end in NUL - } - case format.has(formatSTAR): - star := tr.blk.STAR() - prefix = p.parseString(star.Prefix()) - hdr.AccessTime = time.Unix(p.parseNumeric(star.AccessTime()), 0) - hdr.ChangeTime = time.Unix(p.parseNumeric(star.ChangeTime()), 0) - case format.has(FormatGNU): - hdr.Format = format - var p2 parser - gnu := tr.blk.GNU() - if b := gnu.AccessTime(); b[0] != 0 { - hdr.AccessTime = time.Unix(p2.parseNumeric(b), 0) - } - if b := gnu.ChangeTime(); b[0] != 0 { - hdr.ChangeTime = time.Unix(p2.parseNumeric(b), 0) - } - - // Prior to Go1.8, the Writer had a bug where it would output - // an invalid tar file in certain rare situations because the logic - // incorrectly believed that the old GNU format had a prefix field. - // This is wrong and leads to an output file that mangles the - // atime and ctime fields, which are often left unused. - // - // In order to continue reading tar files created by former, buggy - // versions of Go, we skeptically parse the atime and ctime fields. - // If we are unable to parse them and the prefix field looks like - // an ASCII string, then we fallback on the pre-Go1.8 behavior - // of treating these fields as the USTAR prefix field. - // - // Note that this will not use the fallback logic for all possible - // files generated by a pre-Go1.8 toolchain. If the generated file - // happened to have a prefix field that parses as valid - // atime and ctime fields (e.g., when they are valid octal strings), - // then it is impossible to distinguish between an valid GNU file - // and an invalid pre-Go1.8 file. - // - // See https://golang.org/issues/12594 - // See https://golang.org/issues/21005 - if p2.err != nil { - hdr.AccessTime, hdr.ChangeTime = time.Time{}, time.Time{} - ustar := tr.blk.USTAR() - if s := p.parseString(ustar.Prefix()); isASCII(s) { - prefix = s - } - hdr.Format = FormatUnknown // Buggy file is not GNU - } - } - if len(prefix) > 0 { - hdr.Name = prefix + "/" + hdr.Name - } - } - return hdr, &tr.blk, p.err -} - -// readOldGNUSparseMap reads the sparse map from the old GNU sparse format. -// The sparse map is stored in the tar header if it's small enough. -// If it's larger than four entries, then one or more extension headers are used -// to store the rest of the sparse map. -// -// The Header.Size does not reflect the size of any extended headers used. -// Thus, this function will read from the raw io.Reader to fetch extra headers. -// This method mutates blk in the process. -func (tr *Reader) readOldGNUSparseMap(hdr *Header, blk *block) (sparseDatas, error) { - // Make sure that the input format is GNU. - // Unfortunately, the STAR format also has a sparse header format that uses - // the same type flag but has a completely different layout. - if blk.GetFormat() != FormatGNU { - return nil, ErrHeader - } - hdr.Format.mayOnlyBe(FormatGNU) - - var p parser - hdr.Size = p.parseNumeric(blk.GNU().RealSize()) - if p.err != nil { - return nil, p.err - } - s := blk.GNU().Sparse() - spd := make(sparseDatas, 0, s.MaxEntries()) - for { - for i := 0; i < s.MaxEntries(); i++ { - // This termination condition is identical to GNU and BSD tar. - if s.Entry(i).Offset()[0] == 0x00 { - break // Don't return, need to process extended headers (even if empty) - } - offset := p.parseNumeric(s.Entry(i).Offset()) - length := p.parseNumeric(s.Entry(i).Length()) - if p.err != nil { - return nil, p.err - } - spd = append(spd, sparseEntry{Offset: offset, Length: length}) - } - - if s.IsExtended()[0] > 0 { - // There are more entries. Read an extension header and parse its entries. - if _, err := mustReadFull(tr.r, blk[:]); err != nil { - return nil, err - } - if tr.RawAccounting { - tr.rawBytes.Write(blk[:]) - } - s = blk.Sparse() - continue - } - return spd, nil // Done - } -} - -// readGNUSparseMap1x0 reads the sparse map as stored in GNU's PAX sparse format -// version 1.0. The format of the sparse map consists of a series of -// newline-terminated numeric fields. The first field is the number of entries -// and is always present. Following this are the entries, consisting of two -// fields (offset, length). This function must stop reading at the end -// boundary of the block containing the last newline. -// -// Note that the GNU manual says that numeric values should be encoded in octal -// format. However, the GNU tar utility itself outputs these values in decimal. -// As such, this library treats values as being encoded in decimal. -func readGNUSparseMap1x0(r io.Reader) (sparseDatas, error) { - var ( - cntNewline int64 - buf bytes.Buffer - blk block - ) - - // feedTokens copies data in blocks from r into buf until there are - // at least cnt newlines in buf. It will not read more blocks than needed. - feedTokens := func(n int64) error { - for cntNewline < n { - if _, err := mustReadFull(r, blk[:]); err != nil { - return err - } - buf.Write(blk[:]) - for _, c := range blk { - if c == '\n' { - cntNewline++ - } - } - } - return nil - } - - // nextToken gets the next token delimited by a newline. This assumes that - // at least one newline exists in the buffer. - nextToken := func() string { - cntNewline-- - tok, _ := buf.ReadString('\n') - return strings.TrimRight(tok, "\n") - } - - // Parse for the number of entries. - // Use integer overflow resistant math to check this. - if err := feedTokens(1); err != nil { - return nil, err - } - numEntries, err := strconv.ParseInt(nextToken(), 10, 0) // Intentionally parse as native int - if err != nil || numEntries < 0 || int(2*numEntries) < int(numEntries) { - return nil, ErrHeader - } - - // Parse for all member entries. - // numEntries is trusted after this since a potential attacker must have - // committed resources proportional to what this library used. - if err := feedTokens(2 * numEntries); err != nil { - return nil, err - } - spd := make(sparseDatas, 0, numEntries) - for i := int64(0); i < numEntries; i++ { - offset, err1 := strconv.ParseInt(nextToken(), 10, 64) - length, err2 := strconv.ParseInt(nextToken(), 10, 64) - if err1 != nil || err2 != nil { - return nil, ErrHeader - } - spd = append(spd, sparseEntry{Offset: offset, Length: length}) - } - return spd, nil -} - -// readGNUSparseMap0x1 reads the sparse map as stored in GNU's PAX sparse format -// version 0.1. The sparse map is stored in the PAX headers. -func readGNUSparseMap0x1(paxHdrs map[string]string) (sparseDatas, error) { - // Get number of entries. - // Use integer overflow resistant math to check this. - numEntriesStr := paxHdrs[paxGNUSparseNumBlocks] - numEntries, err := strconv.ParseInt(numEntriesStr, 10, 0) // Intentionally parse as native int - if err != nil || numEntries < 0 || int(2*numEntries) < int(numEntries) { - return nil, ErrHeader - } - - // There should be two numbers in sparseMap for each entry. - sparseMap := strings.Split(paxHdrs[paxGNUSparseMap], ",") - if len(sparseMap) == 1 && sparseMap[0] == "" { - sparseMap = sparseMap[:0] - } - if int64(len(sparseMap)) != 2*numEntries { - return nil, ErrHeader - } - - // Loop through the entries in the sparse map. - // numEntries is trusted now. - spd := make(sparseDatas, 0, numEntries) - for len(sparseMap) >= 2 { - offset, err1 := strconv.ParseInt(sparseMap[0], 10, 64) - length, err2 := strconv.ParseInt(sparseMap[1], 10, 64) - if err1 != nil || err2 != nil { - return nil, ErrHeader - } - spd = append(spd, sparseEntry{Offset: offset, Length: length}) - sparseMap = sparseMap[2:] - } - return spd, nil -} - -// Read reads from the current file in the tar archive. -// It returns (0, io.EOF) when it reaches the end of that file, -// until Next is called to advance to the next file. -// -// If the current file is sparse, then the regions marked as a hole -// are read back as NUL-bytes. -// -// Calling Read on special types like TypeLink, TypeSymlink, TypeChar, -// TypeBlock, TypeDir, and TypeFifo returns (0, io.EOF) regardless of what -// the Header.Size claims. -func (tr *Reader) Read(b []byte) (int, error) { - if tr.err != nil { - return 0, tr.err - } - n, err := tr.curr.Read(b) - if err != nil && err != io.EOF { - tr.err = err - } - return n, err -} - -// writeTo writes the content of the current file to w. -// The bytes written matches the number of remaining bytes in the current file. -// -// If the current file is sparse and w is an io.WriteSeeker, -// then writeTo uses Seek to skip past holes defined in Header.SparseHoles, -// assuming that skipped regions are filled with NULs. -// This always writes the last byte to ensure w is the right size. -// -// TODO(dsnet): Re-export this when adding sparse file support. -// See https://golang.org/issue/22735 -func (tr *Reader) writeTo(w io.Writer) (int64, error) { - if tr.err != nil { - return 0, tr.err - } - n, err := tr.curr.WriteTo(w) - if err != nil { - tr.err = err - } - return n, err -} - -// regFileReader is a fileReader for reading data from a regular file entry. -type regFileReader struct { - r io.Reader // Underlying Reader - nb int64 // Number of remaining bytes to read -} - -func (fr *regFileReader) Read(b []byte) (n int, err error) { - if int64(len(b)) > fr.nb { - b = b[:fr.nb] - } - if len(b) > 0 { - n, err = fr.r.Read(b) - fr.nb -= int64(n) - } - switch { - case err == io.EOF && fr.nb > 0: - return n, io.ErrUnexpectedEOF - case err == nil && fr.nb == 0: - return n, io.EOF - default: - return n, err - } -} - -func (fr *regFileReader) WriteTo(w io.Writer) (int64, error) { - return io.Copy(w, struct{ io.Reader }{fr}) -} - -func (fr regFileReader) LogicalRemaining() int64 { - return fr.nb -} - -func (fr regFileReader) PhysicalRemaining() int64 { - return fr.nb -} - -// sparseFileReader is a fileReader for reading data from a sparse file entry. -type sparseFileReader struct { - fr fileReader // Underlying fileReader - sp sparseHoles // Normalized list of sparse holes - pos int64 // Current position in sparse file -} - -func (sr *sparseFileReader) Read(b []byte) (n int, err error) { - finished := int64(len(b)) >= sr.LogicalRemaining() - if finished { - b = b[:sr.LogicalRemaining()] - } - - b0 := b - endPos := sr.pos + int64(len(b)) - for endPos > sr.pos && err == nil { - var nf int // Bytes read in fragment - holeStart, holeEnd := sr.sp[0].Offset, sr.sp[0].endOffset() - if sr.pos < holeStart { // In a data fragment - bf := b[:min(int64(len(b)), holeStart-sr.pos)] - nf, err = tryReadFull(sr.fr, bf) - } else { // In a hole fragment - bf := b[:min(int64(len(b)), holeEnd-sr.pos)] - nf, err = tryReadFull(zeroReader{}, bf) - } - b = b[nf:] - sr.pos += int64(nf) - if sr.pos >= holeEnd && len(sr.sp) > 1 { - sr.sp = sr.sp[1:] // Ensure last fragment always remains - } - } - - n = len(b0) - len(b) - switch { - case err == io.EOF: - return n, errMissData // Less data in dense file than sparse file - case err != nil: - return n, err - case sr.LogicalRemaining() == 0 && sr.PhysicalRemaining() > 0: - return n, errUnrefData // More data in dense file than sparse file - case finished: - return n, io.EOF - default: - return n, nil - } -} - -func (sr *sparseFileReader) WriteTo(w io.Writer) (n int64, err error) { - ws, ok := w.(io.WriteSeeker) - if ok { - if _, err := ws.Seek(0, io.SeekCurrent); err != nil { - ok = false // Not all io.Seeker can really seek - } - } - if !ok { - return io.Copy(w, struct{ io.Reader }{sr}) - } - - var writeLastByte bool - pos0 := sr.pos - for sr.LogicalRemaining() > 0 && !writeLastByte && err == nil { - var nf int64 // Size of fragment - holeStart, holeEnd := sr.sp[0].Offset, sr.sp[0].endOffset() - if sr.pos < holeStart { // In a data fragment - nf = holeStart - sr.pos - nf, err = io.CopyN(ws, sr.fr, nf) - } else { // In a hole fragment - nf = holeEnd - sr.pos - if sr.PhysicalRemaining() == 0 { - writeLastByte = true - nf-- - } - _, err = ws.Seek(nf, io.SeekCurrent) - } - sr.pos += nf - if sr.pos >= holeEnd && len(sr.sp) > 1 { - sr.sp = sr.sp[1:] // Ensure last fragment always remains - } - } - - // If the last fragment is a hole, then seek to 1-byte before EOF, and - // write a single byte to ensure the file is the right size. - if writeLastByte && err == nil { - _, err = ws.Write([]byte{0}) - sr.pos++ - } - - n = sr.pos - pos0 - switch { - case err == io.EOF: - return n, errMissData // Less data in dense file than sparse file - case err != nil: - return n, err - case sr.LogicalRemaining() == 0 && sr.PhysicalRemaining() > 0: - return n, errUnrefData // More data in dense file than sparse file - default: - return n, nil - } -} - -func (sr sparseFileReader) LogicalRemaining() int64 { - return sr.sp[len(sr.sp)-1].endOffset() - sr.pos -} -func (sr sparseFileReader) PhysicalRemaining() int64 { - return sr.fr.PhysicalRemaining() -} - -type zeroReader struct{} - -func (zeroReader) Read(b []byte) (int, error) { - for i := range b { - b[i] = 0 - } - return len(b), nil -} - -// mustReadFull is like io.ReadFull except it returns -// io.ErrUnexpectedEOF when io.EOF is hit before len(b) bytes are read. -func mustReadFull(r io.Reader, b []byte) (int, error) { - n, err := tryReadFull(r, b) - if err == io.EOF { - err = io.ErrUnexpectedEOF - } - return n, err -} - -// tryReadFull is like io.ReadFull except it returns -// io.EOF when it is hit before len(b) bytes are read. -func tryReadFull(r io.Reader, b []byte) (n int, err error) { - for len(b) > n && err == nil { - var nn int - nn, err = r.Read(b[n:]) - n += nn - } - if len(b) == n && err == io.EOF { - err = nil - } - return n, err -} - -// discard skips n bytes in r, reporting an error if unable to do so. -func discard(tr *Reader, n int64) error { - var seekSkipped, copySkipped int64 - var err error - r := tr.r - if tr.RawAccounting { - - copySkipped, err = io.CopyN(tr.rawBytes, tr.r, n) - goto out - } - - // If possible, Seek to the last byte before the end of the data section. - // Do this because Seek is often lazy about reporting errors; this will mask - // the fact that the stream may be truncated. We can rely on the - // io.CopyN done shortly afterwards to trigger any IO errors. - if sr, ok := r.(io.Seeker); ok && n > 1 { - // Not all io.Seeker can actually Seek. For example, os.Stdin implements - // io.Seeker, but calling Seek always returns an error and performs - // no action. Thus, we try an innocent seek to the current position - // to see if Seek is really supported. - pos1, err := sr.Seek(0, io.SeekCurrent) - if pos1 >= 0 && err == nil { - // Seek seems supported, so perform the real Seek. - pos2, err := sr.Seek(n-1, io.SeekCurrent) - if pos2 < 0 || err != nil { - return err - } - seekSkipped = pos2 - pos1 - } - } - - copySkipped, err = io.CopyN(io.Discard, r, n-seekSkipped) -out: - if err == io.EOF && seekSkipped+copySkipped < n { - err = io.ErrUnexpectedEOF - } - return err -} diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go b/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go deleted file mode 100644 index cf9cc79c..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2012 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. - -// +build linux dragonfly openbsd solaris - -package tar - -import ( - "syscall" - "time" -) - -func statAtime(st *syscall.Stat_t) time.Time { - return time.Unix(st.Atim.Unix()) -} - -func statCtime(st *syscall.Stat_t) time.Time { - return time.Unix(st.Ctim.Unix()) -} diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go b/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go deleted file mode 100644 index 6f17dbe3..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2012 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. - -// +build darwin freebsd netbsd - -package tar - -import ( - "syscall" - "time" -) - -func statAtime(st *syscall.Stat_t) time.Time { - return time.Unix(st.Atimespec.Unix()) -} - -func statCtime(st *syscall.Stat_t) time.Time { - return time.Unix(st.Ctimespec.Unix()) -} diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go b/vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go deleted file mode 100644 index 868105f3..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2012 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. - -// +build linux darwin dragonfly freebsd openbsd netbsd solaris - -package tar - -import ( - "os" - "os/user" - "runtime" - "strconv" - "sync" - "syscall" -) - -func init() { - sysStat = statUnix -} - -// userMap and groupMap caches UID and GID lookups for performance reasons. -// The downside is that renaming uname or gname by the OS never takes effect. -var userMap, groupMap sync.Map // map[int]string - -func statUnix(fi os.FileInfo, h *Header) error { - sys, ok := fi.Sys().(*syscall.Stat_t) - if !ok { - return nil - } - h.Uid = int(sys.Uid) - h.Gid = int(sys.Gid) - - // Best effort at populating Uname and Gname. - // The os/user functions may fail for any number of reasons - // (not implemented on that platform, cgo not enabled, etc). - if u, ok := userMap.Load(h.Uid); ok { - h.Uname = u.(string) - } else if u, err := user.LookupId(strconv.Itoa(h.Uid)); err == nil { - h.Uname = u.Username - userMap.Store(h.Uid, h.Uname) - } - if g, ok := groupMap.Load(h.Gid); ok { - h.Gname = g.(string) - } else if g, err := user.LookupGroupId(strconv.Itoa(h.Gid)); err == nil { - h.Gname = g.Name - groupMap.Store(h.Gid, h.Gname) - } - - h.AccessTime = statAtime(sys) - h.ChangeTime = statCtime(sys) - - // Best effort at populating Devmajor and Devminor. - if h.Typeflag == TypeChar || h.Typeflag == TypeBlock { - dev := uint64(sys.Rdev) // May be int32 or uint32 - switch runtime.GOOS { - case "linux": - // Copied from golang.org/x/sys/unix/dev_linux.go. - major := uint32((dev & 0x00000000000fff00) >> 8) - major |= uint32((dev & 0xfffff00000000000) >> 32) - minor := uint32((dev & 0x00000000000000ff) >> 0) - minor |= uint32((dev & 0x00000ffffff00000) >> 12) - h.Devmajor, h.Devminor = int64(major), int64(minor) - case "darwin": - // Copied from golang.org/x/sys/unix/dev_darwin.go. - major := uint32((dev >> 24) & 0xff) - minor := uint32(dev & 0xffffff) - h.Devmajor, h.Devminor = int64(major), int64(minor) - case "dragonfly": - // Copied from golang.org/x/sys/unix/dev_dragonfly.go. - major := uint32((dev >> 8) & 0xff) - minor := uint32(dev & 0xffff00ff) - h.Devmajor, h.Devminor = int64(major), int64(minor) - case "freebsd": - // Copied from golang.org/x/sys/unix/dev_freebsd.go. - major := uint32((dev >> 8) & 0xff) - minor := uint32(dev & 0xffff00ff) - h.Devmajor, h.Devminor = int64(major), int64(minor) - case "netbsd": - // Copied from golang.org/x/sys/unix/dev_netbsd.go. - major := uint32((dev & 0x000fff00) >> 8) - minor := uint32((dev & 0x000000ff) >> 0) - minor |= uint32((dev & 0xfff00000) >> 12) - h.Devmajor, h.Devminor = int64(major), int64(minor) - case "openbsd": - // Copied from golang.org/x/sys/unix/dev_openbsd.go. - major := uint32((dev & 0x0000ff00) >> 8) - minor := uint32((dev & 0x000000ff) >> 0) - minor |= uint32((dev & 0xffff0000) >> 8) - h.Devmajor, h.Devminor = int64(major), int64(minor) - default: - // TODO: Implement solaris (see https://golang.org/issue/8106) - } - } - return nil -} diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/strconv.go b/vendor/github.com/vbatts/tar-split/archive/tar/strconv.go deleted file mode 100644 index d144485a..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/strconv.go +++ /dev/null @@ -1,326 +0,0 @@ -// Copyright 2016 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 tar - -import ( - "bytes" - "fmt" - "strconv" - "strings" - "time" -) - -// hasNUL reports whether the NUL character exists within s. -func hasNUL(s string) bool { - return strings.IndexByte(s, 0) >= 0 -} - -// isASCII reports whether the input is an ASCII C-style string. -func isASCII(s string) bool { - for _, c := range s { - if c >= 0x80 || c == 0x00 { - return false - } - } - return true -} - -// toASCII converts the input to an ASCII C-style string. -// This a best effort conversion, so invalid characters are dropped. -func toASCII(s string) string { - if isASCII(s) { - return s - } - b := make([]byte, 0, len(s)) - for _, c := range s { - if c < 0x80 && c != 0x00 { - b = append(b, byte(c)) - } - } - return string(b) -} - -type parser struct { - err error // Last error seen -} - -type formatter struct { - err error // Last error seen -} - -// parseString parses bytes as a NUL-terminated C-style string. -// If a NUL byte is not found then the whole slice is returned as a string. -func (*parser) parseString(b []byte) string { - if i := bytes.IndexByte(b, 0); i >= 0 { - return string(b[:i]) - } - return string(b) -} - -// formatString copies s into b, NUL-terminating if possible. -func (f *formatter) formatString(b []byte, s string) { - if len(s) > len(b) { - f.err = ErrFieldTooLong - } - copy(b, s) - if len(s) < len(b) { - b[len(s)] = 0 - } - - // Some buggy readers treat regular files with a trailing slash - // in the V7 path field as a directory even though the full path - // recorded elsewhere (e.g., via PAX record) contains no trailing slash. - if len(s) > len(b) && b[len(b)-1] == '/' { - n := len(strings.TrimRight(s[:len(b)], "/")) - b[n] = 0 // Replace trailing slash with NUL terminator - } -} - -// fitsInBase256 reports whether x can be encoded into n bytes using base-256 -// encoding. Unlike octal encoding, base-256 encoding does not require that the -// string ends with a NUL character. Thus, all n bytes are available for output. -// -// If operating in binary mode, this assumes strict GNU binary mode; which means -// that the first byte can only be either 0x80 or 0xff. Thus, the first byte is -// equivalent to the sign bit in two's complement form. -func fitsInBase256(n int, x int64) bool { - binBits := uint(n-1) * 8 - return n >= 9 || (x >= -1< 0 && b[0]&0x80 != 0 { - // Handling negative numbers relies on the following identity: - // -a-1 == ^a - // - // If the number is negative, we use an inversion mask to invert the - // data bytes and treat the value as an unsigned number. - var inv byte // 0x00 if positive or zero, 0xff if negative - if b[0]&0x40 != 0 { - inv = 0xff - } - - var x uint64 - for i, c := range b { - c ^= inv // Inverts c only if inv is 0xff, otherwise does nothing - if i == 0 { - c &= 0x7f // Ignore signal bit in first byte - } - if (x >> 56) > 0 { - p.err = ErrHeader // Integer overflow - return 0 - } - x = x<<8 | uint64(c) - } - if (x >> 63) > 0 { - p.err = ErrHeader // Integer overflow - return 0 - } - if inv == 0xff { - return ^int64(x) - } - return int64(x) - } - - // Normal case is base-8 (octal) format. - return p.parseOctal(b) -} - -// formatNumeric encodes x into b using base-8 (octal) encoding if possible. -// Otherwise it will attempt to use base-256 (binary) encoding. -func (f *formatter) formatNumeric(b []byte, x int64) { - if fitsInOctal(len(b), x) { - f.formatOctal(b, x) - return - } - - if fitsInBase256(len(b), x) { - for i := len(b) - 1; i >= 0; i-- { - b[i] = byte(x) - x >>= 8 - } - b[0] |= 0x80 // Highest bit indicates binary format - return - } - - f.formatOctal(b, 0) // Last resort, just write zero - f.err = ErrFieldTooLong -} - -func (p *parser) parseOctal(b []byte) int64 { - // Because unused fields are filled with NULs, we need - // to skip leading NULs. Fields may also be padded with - // spaces or NULs. - // So we remove leading and trailing NULs and spaces to - // be sure. - b = bytes.Trim(b, " \x00") - - if len(b) == 0 { - return 0 - } - x, perr := strconv.ParseUint(p.parseString(b), 8, 64) - if perr != nil { - p.err = ErrHeader - } - return int64(x) -} - -func (f *formatter) formatOctal(b []byte, x int64) { - if !fitsInOctal(len(b), x) { - x = 0 // Last resort, just write zero - f.err = ErrFieldTooLong - } - - s := strconv.FormatInt(x, 8) - // Add leading zeros, but leave room for a NUL. - if n := len(b) - len(s) - 1; n > 0 { - s = strings.Repeat("0", n) + s - } - f.formatString(b, s) -} - -// fitsInOctal reports whether the integer x fits in a field n-bytes long -// using octal encoding with the appropriate NUL terminator. -func fitsInOctal(n int, x int64) bool { - octBits := uint(n-1) * 3 - return x >= 0 && (n >= 22 || x < 1<= 0 { - ss, sn = s[:pos], s[pos+1:] - } - - // Parse the seconds. - secs, err := strconv.ParseInt(ss, 10, 64) - if err != nil { - return time.Time{}, ErrHeader - } - if len(sn) == 0 { - return time.Unix(secs, 0), nil // No sub-second values - } - - // Parse the nanoseconds. - if strings.Trim(sn, "0123456789") != "" { - return time.Time{}, ErrHeader - } - if len(sn) < maxNanoSecondDigits { - sn += strings.Repeat("0", maxNanoSecondDigits-len(sn)) // Right pad - } else { - sn = sn[:maxNanoSecondDigits] // Right truncate - } - nsecs, _ := strconv.ParseInt(sn, 10, 64) // Must succeed - if len(ss) > 0 && ss[0] == '-' { - return time.Unix(secs, -1*nsecs), nil // Negative correction - } - return time.Unix(secs, nsecs), nil -} - -// formatPAXTime converts ts into a time of the form %d.%d as described in the -// PAX specification. This function is capable of negative timestamps. -func formatPAXTime(ts time.Time) (s string) { - secs, nsecs := ts.Unix(), ts.Nanosecond() - if nsecs == 0 { - return strconv.FormatInt(secs, 10) - } - - // If seconds is negative, then perform correction. - sign := "" - if secs < 0 { - sign = "-" // Remember sign - secs = -(secs + 1) // Add a second to secs - nsecs = -(nsecs - 1E9) // Take that second away from nsecs - } - return strings.TrimRight(fmt.Sprintf("%s%d.%09d", sign, secs, nsecs), "0") -} - -// parsePAXRecord parses the input PAX record string into a key-value pair. -// If parsing is successful, it will slice off the currently read record and -// return the remainder as r. -func parsePAXRecord(s string) (k, v, r string, err error) { - // The size field ends at the first space. - sp := strings.IndexByte(s, ' ') - if sp == -1 { - return "", "", s, ErrHeader - } - - // Parse the first token as a decimal integer. - n, perr := strconv.ParseInt(s[:sp], 10, 0) // Intentionally parse as native int - if perr != nil || n < 5 || int64(len(s)) < n { - return "", "", s, ErrHeader - } - - // Extract everything between the space and the final newline. - rec, nl, rem := s[sp+1:n-1], s[n-1:n], s[n:] - if nl != "\n" { - return "", "", s, ErrHeader - } - - // The first equals separates the key from the value. - eq := strings.IndexByte(rec, '=') - if eq == -1 { - return "", "", s, ErrHeader - } - k, v = rec[:eq], rec[eq+1:] - - if !validPAXRecord(k, v) { - return "", "", s, ErrHeader - } - return k, v, rem, nil -} - -// formatPAXRecord formats a single PAX record, prefixing it with the -// appropriate length. -func formatPAXRecord(k, v string) (string, error) { - if !validPAXRecord(k, v) { - return "", ErrHeader - } - - const padding = 3 // Extra padding for ' ', '=', and '\n' - size := len(k) + len(v) + padding - size += len(strconv.Itoa(size)) - record := strconv.Itoa(size) + " " + k + "=" + v + "\n" - - // Final adjustment if adding size field increased the record size. - if len(record) != size { - size = len(record) - record = strconv.Itoa(size) + " " + k + "=" + v + "\n" - } - return record, nil -} - -// validPAXRecord reports whether the key-value pair is valid where each -// record is formatted as: -// "%d %s=%s\n" % (size, key, value) -// -// Keys and values should be UTF-8, but the number of bad writers out there -// forces us to be a more liberal. -// Thus, we only reject all keys with NUL, and only reject NULs in values -// for the PAX version of the USTAR string fields. -// The key must not contain an '=' character. -func validPAXRecord(k, v string) bool { - if k == "" || strings.IndexByte(k, '=') >= 0 { - return false - } - switch k { - case paxPath, paxLinkpath, paxUname, paxGname: - return !hasNUL(v) - default: - return !hasNUL(k) - } -} diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/writer.go b/vendor/github.com/vbatts/tar-split/archive/tar/writer.go deleted file mode 100644 index e80498d0..00000000 --- a/vendor/github.com/vbatts/tar-split/archive/tar/writer.go +++ /dev/null @@ -1,653 +0,0 @@ -// Copyright 2009 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 tar - -import ( - "fmt" - "io" - "path" - "sort" - "strings" - "time" -) - -// Writer provides sequential writing of a tar archive. -// Write.WriteHeader begins a new file with the provided Header, -// and then Writer can be treated as an io.Writer to supply that file's data. -type Writer struct { - w io.Writer - pad int64 // Amount of padding to write after current file entry - curr fileWriter // Writer for current file entry - hdr Header // Shallow copy of Header that is safe for mutations - blk block // Buffer to use as temporary local storage - - // err is a persistent error. - // It is only the responsibility of every exported method of Writer to - // ensure that this error is sticky. - err error -} - -// NewWriter creates a new Writer writing to w. -func NewWriter(w io.Writer) *Writer { - return &Writer{w: w, curr: ®FileWriter{w, 0}} -} - -type fileWriter interface { - io.Writer - fileState - - ReadFrom(io.Reader) (int64, error) -} - -// Flush finishes writing the current file's block padding. -// The current file must be fully written before Flush can be called. -// -// This is unnecessary as the next call to WriteHeader or Close -// will implicitly flush out the file's padding. -func (tw *Writer) Flush() error { - if tw.err != nil { - return tw.err - } - if nb := tw.curr.LogicalRemaining(); nb > 0 { - return fmt.Errorf("archive/tar: missed writing %d bytes", nb) - } - if _, tw.err = tw.w.Write(zeroBlock[:tw.pad]); tw.err != nil { - return tw.err - } - tw.pad = 0 - return nil -} - -// WriteHeader writes hdr and prepares to accept the file's contents. -// The Header.Size determines how many bytes can be written for the next file. -// If the current file is not fully written, then this returns an error. -// This implicitly flushes any padding necessary before writing the header. -func (tw *Writer) WriteHeader(hdr *Header) error { - if err := tw.Flush(); err != nil { - return err - } - tw.hdr = *hdr // Shallow copy of Header - - // Avoid usage of the legacy TypeRegA flag, and automatically promote - // it to use TypeReg or TypeDir. - if tw.hdr.Typeflag == TypeRegA { - if strings.HasSuffix(tw.hdr.Name, "/") { - tw.hdr.Typeflag = TypeDir - } else { - tw.hdr.Typeflag = TypeReg - } - } - - // Round ModTime and ignore AccessTime and ChangeTime unless - // the format is explicitly chosen. - // This ensures nominal usage of WriteHeader (without specifying the format) - // does not always result in the PAX format being chosen, which - // causes a 1KiB increase to every header. - if tw.hdr.Format == FormatUnknown { - tw.hdr.ModTime = tw.hdr.ModTime.Round(time.Second) - tw.hdr.AccessTime = time.Time{} - tw.hdr.ChangeTime = time.Time{} - } - - allowedFormats, paxHdrs, err := tw.hdr.allowedFormats() - switch { - case allowedFormats.has(FormatUSTAR): - tw.err = tw.writeUSTARHeader(&tw.hdr) - return tw.err - case allowedFormats.has(FormatPAX): - tw.err = tw.writePAXHeader(&tw.hdr, paxHdrs) - return tw.err - case allowedFormats.has(FormatGNU): - tw.err = tw.writeGNUHeader(&tw.hdr) - return tw.err - default: - return err // Non-fatal error - } -} - -func (tw *Writer) writeUSTARHeader(hdr *Header) error { - // Check if we can use USTAR prefix/suffix splitting. - var namePrefix string - if prefix, suffix, ok := splitUSTARPath(hdr.Name); ok { - namePrefix, hdr.Name = prefix, suffix - } - - // Pack the main header. - var f formatter - blk := tw.templateV7Plus(hdr, f.formatString, f.formatOctal) - f.formatString(blk.USTAR().Prefix(), namePrefix) - blk.SetFormat(FormatUSTAR) - if f.err != nil { - return f.err // Should never happen since header is validated - } - return tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag) -} - -func (tw *Writer) writePAXHeader(hdr *Header, paxHdrs map[string]string) error { - realName, realSize := hdr.Name, hdr.Size - - // TODO(dsnet): Re-enable this when adding sparse support. - // See https://golang.org/issue/22735 - /* - // Handle sparse files. - var spd sparseDatas - var spb []byte - if len(hdr.SparseHoles) > 0 { - sph := append([]sparseEntry{}, hdr.SparseHoles...) // Copy sparse map - sph = alignSparseEntries(sph, hdr.Size) - spd = invertSparseEntries(sph, hdr.Size) - - // Format the sparse map. - hdr.Size = 0 // Replace with encoded size - spb = append(strconv.AppendInt(spb, int64(len(spd)), 10), '\n') - for _, s := range spd { - hdr.Size += s.Length - spb = append(strconv.AppendInt(spb, s.Offset, 10), '\n') - spb = append(strconv.AppendInt(spb, s.Length, 10), '\n') - } - pad := blockPadding(int64(len(spb))) - spb = append(spb, zeroBlock[:pad]...) - hdr.Size += int64(len(spb)) // Accounts for encoded sparse map - - // Add and modify appropriate PAX records. - dir, file := path.Split(realName) - hdr.Name = path.Join(dir, "GNUSparseFile.0", file) - paxHdrs[paxGNUSparseMajor] = "1" - paxHdrs[paxGNUSparseMinor] = "0" - paxHdrs[paxGNUSparseName] = realName - paxHdrs[paxGNUSparseRealSize] = strconv.FormatInt(realSize, 10) - paxHdrs[paxSize] = strconv.FormatInt(hdr.Size, 10) - delete(paxHdrs, paxPath) // Recorded by paxGNUSparseName - } - */ - _ = realSize - - // Write PAX records to the output. - isGlobal := hdr.Typeflag == TypeXGlobalHeader - if len(paxHdrs) > 0 || isGlobal { - // Sort keys for deterministic ordering. - var keys []string - for k := range paxHdrs { - keys = append(keys, k) - } - sort.Strings(keys) - - // Write each record to a buffer. - var buf strings.Builder - for _, k := range keys { - rec, err := formatPAXRecord(k, paxHdrs[k]) - if err != nil { - return err - } - buf.WriteString(rec) - } - - // Write the extended header file. - var name string - var flag byte - if isGlobal { - name = realName - if name == "" { - name = "GlobalHead.0.0" - } - flag = TypeXGlobalHeader - } else { - dir, file := path.Split(realName) - name = path.Join(dir, "PaxHeaders.0", file) - flag = TypeXHeader - } - data := buf.String() - if err := tw.writeRawFile(name, data, flag, FormatPAX); err != nil || isGlobal { - return err // Global headers return here - } - } - - // Pack the main header. - var f formatter // Ignore errors since they are expected - fmtStr := func(b []byte, s string) { f.formatString(b, toASCII(s)) } - blk := tw.templateV7Plus(hdr, fmtStr, f.formatOctal) - blk.SetFormat(FormatPAX) - if err := tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag); err != nil { - return err - } - - // TODO(dsnet): Re-enable this when adding sparse support. - // See https://golang.org/issue/22735 - /* - // Write the sparse map and setup the sparse writer if necessary. - if len(spd) > 0 { - // Use tw.curr since the sparse map is accounted for in hdr.Size. - if _, err := tw.curr.Write(spb); err != nil { - return err - } - tw.curr = &sparseFileWriter{tw.curr, spd, 0} - } - */ - return nil -} - -func (tw *Writer) writeGNUHeader(hdr *Header) error { - // Use long-link files if Name or Linkname exceeds the field size. - const longName = "././@LongLink" - if len(hdr.Name) > nameSize { - data := hdr.Name + "\x00" - if err := tw.writeRawFile(longName, data, TypeGNULongName, FormatGNU); err != nil { - return err - } - } - if len(hdr.Linkname) > nameSize { - data := hdr.Linkname + "\x00" - if err := tw.writeRawFile(longName, data, TypeGNULongLink, FormatGNU); err != nil { - return err - } - } - - // Pack the main header. - var f formatter // Ignore errors since they are expected - var spd sparseDatas - var spb []byte - blk := tw.templateV7Plus(hdr, f.formatString, f.formatNumeric) - if !hdr.AccessTime.IsZero() { - f.formatNumeric(blk.GNU().AccessTime(), hdr.AccessTime.Unix()) - } - if !hdr.ChangeTime.IsZero() { - f.formatNumeric(blk.GNU().ChangeTime(), hdr.ChangeTime.Unix()) - } - // TODO(dsnet): Re-enable this when adding sparse support. - // See https://golang.org/issue/22735 - /* - if hdr.Typeflag == TypeGNUSparse { - sph := append([]sparseEntry{}, hdr.SparseHoles...) // Copy sparse map - sph = alignSparseEntries(sph, hdr.Size) - spd = invertSparseEntries(sph, hdr.Size) - - // Format the sparse map. - formatSPD := func(sp sparseDatas, sa sparseArray) sparseDatas { - for i := 0; len(sp) > 0 && i < sa.MaxEntries(); i++ { - f.formatNumeric(sa.Entry(i).Offset(), sp[0].Offset) - f.formatNumeric(sa.Entry(i).Length(), sp[0].Length) - sp = sp[1:] - } - if len(sp) > 0 { - sa.IsExtended()[0] = 1 - } - return sp - } - sp2 := formatSPD(spd, blk.GNU().Sparse()) - for len(sp2) > 0 { - var spHdr block - sp2 = formatSPD(sp2, spHdr.Sparse()) - spb = append(spb, spHdr[:]...) - } - - // Update size fields in the header block. - realSize := hdr.Size - hdr.Size = 0 // Encoded size; does not account for encoded sparse map - for _, s := range spd { - hdr.Size += s.Length - } - copy(blk.V7().Size(), zeroBlock[:]) // Reset field - f.formatNumeric(blk.V7().Size(), hdr.Size) - f.formatNumeric(blk.GNU().RealSize(), realSize) - } - */ - blk.SetFormat(FormatGNU) - if err := tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag); err != nil { - return err - } - - // Write the extended sparse map and setup the sparse writer if necessary. - if len(spd) > 0 { - // Use tw.w since the sparse map is not accounted for in hdr.Size. - if _, err := tw.w.Write(spb); err != nil { - return err - } - tw.curr = &sparseFileWriter{tw.curr, spd, 0} - } - return nil -} - -type ( - stringFormatter func([]byte, string) - numberFormatter func([]byte, int64) -) - -// templateV7Plus fills out the V7 fields of a block using values from hdr. -// It also fills out fields (uname, gname, devmajor, devminor) that are -// shared in the USTAR, PAX, and GNU formats using the provided formatters. -// -// The block returned is only valid until the next call to -// templateV7Plus or writeRawFile. -func (tw *Writer) templateV7Plus(hdr *Header, fmtStr stringFormatter, fmtNum numberFormatter) *block { - tw.blk.Reset() - - modTime := hdr.ModTime - if modTime.IsZero() { - modTime = time.Unix(0, 0) - } - - v7 := tw.blk.V7() - v7.TypeFlag()[0] = hdr.Typeflag - fmtStr(v7.Name(), hdr.Name) - fmtStr(v7.LinkName(), hdr.Linkname) - fmtNum(v7.Mode(), hdr.Mode) - fmtNum(v7.UID(), int64(hdr.Uid)) - fmtNum(v7.GID(), int64(hdr.Gid)) - fmtNum(v7.Size(), hdr.Size) - fmtNum(v7.ModTime(), modTime.Unix()) - - ustar := tw.blk.USTAR() - fmtStr(ustar.UserName(), hdr.Uname) - fmtStr(ustar.GroupName(), hdr.Gname) - fmtNum(ustar.DevMajor(), hdr.Devmajor) - fmtNum(ustar.DevMinor(), hdr.Devminor) - - return &tw.blk -} - -// writeRawFile writes a minimal file with the given name and flag type. -// It uses format to encode the header format and will write data as the body. -// It uses default values for all of the other fields (as BSD and GNU tar does). -func (tw *Writer) writeRawFile(name, data string, flag byte, format Format) error { - tw.blk.Reset() - - // Best effort for the filename. - name = toASCII(name) - if len(name) > nameSize { - name = name[:nameSize] - } - name = strings.TrimRight(name, "/") - - var f formatter - v7 := tw.blk.V7() - v7.TypeFlag()[0] = flag - f.formatString(v7.Name(), name) - f.formatOctal(v7.Mode(), 0) - f.formatOctal(v7.UID(), 0) - f.formatOctal(v7.GID(), 0) - f.formatOctal(v7.Size(), int64(len(data))) // Must be < 8GiB - f.formatOctal(v7.ModTime(), 0) - tw.blk.SetFormat(format) - if f.err != nil { - return f.err // Only occurs if size condition is violated - } - - // Write the header and data. - if err := tw.writeRawHeader(&tw.blk, int64(len(data)), flag); err != nil { - return err - } - _, err := io.WriteString(tw, data) - return err -} - -// writeRawHeader writes the value of blk, regardless of its value. -// It sets up the Writer such that it can accept a file of the given size. -// If the flag is a special header-only flag, then the size is treated as zero. -func (tw *Writer) writeRawHeader(blk *block, size int64, flag byte) error { - if err := tw.Flush(); err != nil { - return err - } - if _, err := tw.w.Write(blk[:]); err != nil { - return err - } - if isHeaderOnlyType(flag) { - size = 0 - } - tw.curr = ®FileWriter{tw.w, size} - tw.pad = blockPadding(size) - return nil -} - -// splitUSTARPath splits a path according to USTAR prefix and suffix rules. -// If the path is not splittable, then it will return ("", "", false). -func splitUSTARPath(name string) (prefix, suffix string, ok bool) { - length := len(name) - if length <= nameSize || !isASCII(name) { - return "", "", false - } else if length > prefixSize+1 { - length = prefixSize + 1 - } else if name[length-1] == '/' { - length-- - } - - i := strings.LastIndex(name[:length], "/") - nlen := len(name) - i - 1 // nlen is length of suffix - plen := i // plen is length of prefix - if i <= 0 || nlen > nameSize || nlen == 0 || plen > prefixSize { - return "", "", false - } - return name[:i], name[i+1:], true -} - -// Write writes to the current file in the tar archive. -// Write returns the error ErrWriteTooLong if more than -// Header.Size bytes are written after WriteHeader. -// -// Calling Write on special types like TypeLink, TypeSymlink, TypeChar, -// TypeBlock, TypeDir, and TypeFifo returns (0, ErrWriteTooLong) regardless -// of what the Header.Size claims. -func (tw *Writer) Write(b []byte) (int, error) { - if tw.err != nil { - return 0, tw.err - } - n, err := tw.curr.Write(b) - if err != nil && err != ErrWriteTooLong { - tw.err = err - } - return n, err -} - -// readFrom populates the content of the current file by reading from r. -// The bytes read must match the number of remaining bytes in the current file. -// -// If the current file is sparse and r is an io.ReadSeeker, -// then readFrom uses Seek to skip past holes defined in Header.SparseHoles, -// assuming that skipped regions are all NULs. -// This always reads the last byte to ensure r is the right size. -// -// TODO(dsnet): Re-export this when adding sparse file support. -// See https://golang.org/issue/22735 -func (tw *Writer) readFrom(r io.Reader) (int64, error) { - if tw.err != nil { - return 0, tw.err - } - n, err := tw.curr.ReadFrom(r) - if err != nil && err != ErrWriteTooLong { - tw.err = err - } - return n, err -} - -// Close closes the tar archive by flushing the padding, and writing the footer. -// If the current file (from a prior call to WriteHeader) is not fully written, -// then this returns an error. -func (tw *Writer) Close() error { - if tw.err == ErrWriteAfterClose { - return nil - } - if tw.err != nil { - return tw.err - } - - // Trailer: two zero blocks. - err := tw.Flush() - for i := 0; i < 2 && err == nil; i++ { - _, err = tw.w.Write(zeroBlock[:]) - } - - // Ensure all future actions are invalid. - tw.err = ErrWriteAfterClose - return err // Report IO errors -} - -// regFileWriter is a fileWriter for writing data to a regular file entry. -type regFileWriter struct { - w io.Writer // Underlying Writer - nb int64 // Number of remaining bytes to write -} - -func (fw *regFileWriter) Write(b []byte) (n int, err error) { - overwrite := int64(len(b)) > fw.nb - if overwrite { - b = b[:fw.nb] - } - if len(b) > 0 { - n, err = fw.w.Write(b) - fw.nb -= int64(n) - } - switch { - case err != nil: - return n, err - case overwrite: - return n, ErrWriteTooLong - default: - return n, nil - } -} - -func (fw *regFileWriter) ReadFrom(r io.Reader) (int64, error) { - return io.Copy(struct{ io.Writer }{fw}, r) -} - -func (fw regFileWriter) LogicalRemaining() int64 { - return fw.nb -} -func (fw regFileWriter) PhysicalRemaining() int64 { - return fw.nb -} - -// sparseFileWriter is a fileWriter for writing data to a sparse file entry. -type sparseFileWriter struct { - fw fileWriter // Underlying fileWriter - sp sparseDatas // Normalized list of data fragments - pos int64 // Current position in sparse file -} - -func (sw *sparseFileWriter) Write(b []byte) (n int, err error) { - overwrite := int64(len(b)) > sw.LogicalRemaining() - if overwrite { - b = b[:sw.LogicalRemaining()] - } - - b0 := b - endPos := sw.pos + int64(len(b)) - for endPos > sw.pos && err == nil { - var nf int // Bytes written in fragment - dataStart, dataEnd := sw.sp[0].Offset, sw.sp[0].endOffset() - if sw.pos < dataStart { // In a hole fragment - bf := b[:min(int64(len(b)), dataStart-sw.pos)] - nf, err = zeroWriter{}.Write(bf) - } else { // In a data fragment - bf := b[:min(int64(len(b)), dataEnd-sw.pos)] - nf, err = sw.fw.Write(bf) - } - b = b[nf:] - sw.pos += int64(nf) - if sw.pos >= dataEnd && len(sw.sp) > 1 { - sw.sp = sw.sp[1:] // Ensure last fragment always remains - } - } - - n = len(b0) - len(b) - switch { - case err == ErrWriteTooLong: - return n, errMissData // Not possible; implies bug in validation logic - case err != nil: - return n, err - case sw.LogicalRemaining() == 0 && sw.PhysicalRemaining() > 0: - return n, errUnrefData // Not possible; implies bug in validation logic - case overwrite: - return n, ErrWriteTooLong - default: - return n, nil - } -} - -func (sw *sparseFileWriter) ReadFrom(r io.Reader) (n int64, err error) { - rs, ok := r.(io.ReadSeeker) - if ok { - if _, err := rs.Seek(0, io.SeekCurrent); err != nil { - ok = false // Not all io.Seeker can really seek - } - } - if !ok { - return io.Copy(struct{ io.Writer }{sw}, r) - } - - var readLastByte bool - pos0 := sw.pos - for sw.LogicalRemaining() > 0 && !readLastByte && err == nil { - var nf int64 // Size of fragment - dataStart, dataEnd := sw.sp[0].Offset, sw.sp[0].endOffset() - if sw.pos < dataStart { // In a hole fragment - nf = dataStart - sw.pos - if sw.PhysicalRemaining() == 0 { - readLastByte = true - nf-- - } - _, err = rs.Seek(nf, io.SeekCurrent) - } else { // In a data fragment - nf = dataEnd - sw.pos - nf, err = io.CopyN(sw.fw, rs, nf) - } - sw.pos += nf - if sw.pos >= dataEnd && len(sw.sp) > 1 { - sw.sp = sw.sp[1:] // Ensure last fragment always remains - } - } - - // If the last fragment is a hole, then seek to 1-byte before EOF, and - // read a single byte to ensure the file is the right size. - if readLastByte && err == nil { - _, err = mustReadFull(rs, []byte{0}) - sw.pos++ - } - - n = sw.pos - pos0 - switch { - case err == io.EOF: - return n, io.ErrUnexpectedEOF - case err == ErrWriteTooLong: - return n, errMissData // Not possible; implies bug in validation logic - case err != nil: - return n, err - case sw.LogicalRemaining() == 0 && sw.PhysicalRemaining() > 0: - return n, errUnrefData // Not possible; implies bug in validation logic - default: - return n, ensureEOF(rs) - } -} - -func (sw sparseFileWriter) LogicalRemaining() int64 { - return sw.sp[len(sw.sp)-1].endOffset() - sw.pos -} -func (sw sparseFileWriter) PhysicalRemaining() int64 { - return sw.fw.PhysicalRemaining() -} - -// zeroWriter may only be written with NULs, otherwise it returns errWriteHole. -type zeroWriter struct{} - -func (zeroWriter) Write(b []byte) (int, error) { - for i, c := range b { - if c != 0 { - return i, errWriteHole - } - } - return len(b), nil -} - -// ensureEOF checks whether r is at EOF, reporting ErrWriteTooLong if not so. -func ensureEOF(r io.Reader) error { - n, err := tryReadFull(r, []byte{0}) - switch { - case n > 0: - return ErrWriteTooLong - case err == io.EOF: - return nil - default: - return err - } -} diff --git a/vendor/golang.org/x/sync/errgroup/errgroup.go b/vendor/golang.org/x/sync/errgroup/errgroup.go deleted file mode 100644 index b18efb74..00000000 --- a/vendor/golang.org/x/sync/errgroup/errgroup.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2016 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 errgroup provides synchronization, error propagation, and Context -// cancelation for groups of goroutines working on subtasks of a common task. -package errgroup - -import ( - "context" - "fmt" - "sync" -) - -type token struct{} - -// A Group is a collection of goroutines working on subtasks that are part of -// the same overall task. -// -// A zero Group is valid, has no limit on the number of active goroutines, -// and does not cancel on error. -type Group struct { - cancel func(error) - - wg sync.WaitGroup - - sem chan token - - errOnce sync.Once - err error -} - -func (g *Group) done() { - if g.sem != nil { - <-g.sem - } - g.wg.Done() -} - -// WithContext returns a new Group and an associated Context derived from ctx. -// -// The derived Context is canceled the first time a function passed to Go -// returns a non-nil error or the first time Wait returns, whichever occurs -// first. -func WithContext(ctx context.Context) (*Group, context.Context) { - ctx, cancel := withCancelCause(ctx) - return &Group{cancel: cancel}, ctx -} - -// Wait blocks until all function calls from the Go method have returned, then -// returns the first non-nil error (if any) from them. -func (g *Group) Wait() error { - g.wg.Wait() - if g.cancel != nil { - g.cancel(g.err) - } - return g.err -} - -// Go calls the given function in a new goroutine. -// It blocks until the new goroutine can be added without the number of -// active goroutines in the group exceeding the configured limit. -// -// The first call to return a non-nil error cancels the group's context, if the -// group was created by calling WithContext. The error will be returned by Wait. -func (g *Group) Go(f func() error) { - if g.sem != nil { - g.sem <- token{} - } - - g.wg.Add(1) - go func() { - defer g.done() - - if err := f(); err != nil { - g.errOnce.Do(func() { - g.err = err - if g.cancel != nil { - g.cancel(g.err) - } - }) - } - }() -} - -// TryGo calls the given function in a new goroutine only if the number of -// active goroutines in the group is currently below the configured limit. -// -// The return value reports whether the goroutine was started. -func (g *Group) TryGo(f func() error) bool { - if g.sem != nil { - select { - case g.sem <- token{}: - // Note: this allows barging iff channels in general allow barging. - default: - return false - } - } - - g.wg.Add(1) - go func() { - defer g.done() - - if err := f(); err != nil { - g.errOnce.Do(func() { - g.err = err - if g.cancel != nil { - g.cancel(g.err) - } - }) - } - }() - return true -} - -// SetLimit limits the number of active goroutines in this group to at most n. -// A negative value indicates no limit. -// -// Any subsequent call to the Go method will block until it can add an active -// goroutine without exceeding the configured limit. -// -// The limit must not be modified while any goroutines in the group are active. -func (g *Group) SetLimit(n int) { - if n < 0 { - g.sem = nil - return - } - if len(g.sem) != 0 { - panic(fmt.Errorf("errgroup: modify limit while %v goroutines in the group are still active", len(g.sem))) - } - g.sem = make(chan token, n) -} diff --git a/vendor/golang.org/x/sync/errgroup/go120.go b/vendor/golang.org/x/sync/errgroup/go120.go deleted file mode 100644 index f93c740b..00000000 --- a/vendor/golang.org/x/sync/errgroup/go120.go +++ /dev/null @@ -1,13 +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. - -//go:build go1.20 - -package errgroup - -import "context" - -func withCancelCause(parent context.Context) (context.Context, func(error)) { - return context.WithCancelCause(parent) -} diff --git a/vendor/golang.org/x/sync/errgroup/pre_go120.go b/vendor/golang.org/x/sync/errgroup/pre_go120.go deleted file mode 100644 index 88ce3343..00000000 --- a/vendor/golang.org/x/sync/errgroup/pre_go120.go +++ /dev/null @@ -1,14 +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. - -//go:build !go1.20 - -package errgroup - -import "context" - -func withCancelCause(parent context.Context) (context.Context, func(error)) { - ctx, cancel := context.WithCancel(parent) - return ctx, func(error) { cancel() } -} diff --git a/vendor/golang.org/x/sys/execabs/execabs.go b/vendor/golang.org/x/sys/execabs/execabs.go deleted file mode 100644 index 3bf40fdf..00000000 --- a/vendor/golang.org/x/sys/execabs/execabs.go +++ /dev/null @@ -1,102 +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 execabs is a drop-in replacement for os/exec -// that requires PATH lookups to find absolute paths. -// That is, execabs.Command("cmd") runs the same PATH lookup -// as exec.Command("cmd"), but if the result is a path -// which is relative, the Run and Start methods will report -// an error instead of running the executable. -// -// See https://blog.golang.org/path-security for more information -// about when it may be necessary or appropriate to use this package. -package execabs - -import ( - "context" - "fmt" - "os/exec" - "path/filepath" - "reflect" - "unsafe" -) - -// ErrNotFound is the error resulting if a path search failed to find an executable file. -// It is an alias for exec.ErrNotFound. -var ErrNotFound = exec.ErrNotFound - -// Cmd represents an external command being prepared or run. -// It is an alias for exec.Cmd. -type Cmd = exec.Cmd - -// Error is returned by LookPath when it fails to classify a file as an executable. -// It is an alias for exec.Error. -type Error = exec.Error - -// An ExitError reports an unsuccessful exit by a command. -// It is an alias for exec.ExitError. -type ExitError = exec.ExitError - -func relError(file, path string) error { - return fmt.Errorf("%s resolves to executable in current directory (.%c%s)", file, filepath.Separator, path) -} - -// LookPath searches for an executable named file in the directories -// named by the PATH environment variable. If file contains a slash, -// it is tried directly and the PATH is not consulted. The result will be -// an absolute path. -// -// LookPath differs from exec.LookPath in its handling of PATH lookups, -// which are used for file names without slashes. If exec.LookPath's -// PATH lookup would have returned an executable from the current directory, -// LookPath instead returns an error. -func LookPath(file string) (string, error) { - path, err := exec.LookPath(file) - if err != nil && !isGo119ErrDot(err) { - return "", err - } - if filepath.Base(file) == file && !filepath.IsAbs(path) { - return "", relError(file, path) - } - return path, nil -} - -func fixCmd(name string, cmd *exec.Cmd) { - if filepath.Base(name) == name && !filepath.IsAbs(cmd.Path) && !isGo119ErrFieldSet(cmd) { - // exec.Command was called with a bare binary name and - // exec.LookPath returned a path which is not absolute. - // Set cmd.lookPathErr and clear cmd.Path so that it - // cannot be run. - lookPathErr := (*error)(unsafe.Pointer(reflect.ValueOf(cmd).Elem().FieldByName("lookPathErr").Addr().Pointer())) - if *lookPathErr == nil { - *lookPathErr = relError(name, cmd.Path) - } - cmd.Path = "" - } -} - -// CommandContext is like Command but includes a context. -// -// The provided context is used to kill the process (by calling os.Process.Kill) -// if the context becomes done before the command completes on its own. -func CommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd { - cmd := exec.CommandContext(ctx, name, arg...) - fixCmd(name, cmd) - return cmd - -} - -// Command returns the Cmd struct to execute the named program with the given arguments. -// See exec.Command for most details. -// -// Command differs from exec.Command in its handling of PATH lookups, -// which are used when the program name contains no slashes. -// If exec.Command would have returned an exec.Cmd configured to run an -// executable from the current directory, Command instead -// returns an exec.Cmd that will return an error from Start or Run. -func Command(name string, arg ...string) *exec.Cmd { - cmd := exec.Command(name, arg...) - fixCmd(name, cmd) - return cmd -} diff --git a/vendor/golang.org/x/sys/execabs/execabs_go118.go b/vendor/golang.org/x/sys/execabs/execabs_go118.go deleted file mode 100644 index 5627d70e..00000000 --- a/vendor/golang.org/x/sys/execabs/execabs_go118.go +++ /dev/null @@ -1,17 +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. - -//go:build !go1.19 - -package execabs - -import "os/exec" - -func isGo119ErrDot(err error) bool { - return false -} - -func isGo119ErrFieldSet(cmd *exec.Cmd) bool { - return false -} diff --git a/vendor/golang.org/x/sys/execabs/execabs_go119.go b/vendor/golang.org/x/sys/execabs/execabs_go119.go deleted file mode 100644 index d60ab1b4..00000000 --- a/vendor/golang.org/x/sys/execabs/execabs_go119.go +++ /dev/null @@ -1,20 +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. - -//go:build go1.19 - -package execabs - -import ( - "errors" - "os/exec" -) - -func isGo119ErrDot(err error) bool { - return errors.Is(err, exec.ErrDot) -} - -func isGo119ErrFieldSet(cmd *exec.Cmd) bool { - return cmd.Err != nil -} diff --git a/vendor/gomodules.xyz/sets/.gitignore b/vendor/gomodules.xyz/sets/.gitignore deleted file mode 100644 index 77a1207e..00000000 --- a/vendor/gomodules.xyz/sets/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor -.idea - diff --git a/vendor/gomodules.xyz/sets/LICENSE b/vendor/gomodules.xyz/sets/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/vendor/gomodules.xyz/sets/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/gomodules.xyz/sets/README.md b/vendor/gomodules.xyz/sets/README.md deleted file mode 100644 index 5f3a418d..00000000 --- a/vendor/gomodules.xyz/sets/README.md +++ /dev/null @@ -1,13 +0,0 @@ -[![PkgGoDev](https://pkg.go.dev/badge/gomodules.xyz/sets)](https://pkg.go.dev/gomodules.xyz/sets) - -# sets - -This library has been forked from https://github.com/kubernetes/apimachinery/tree/v0.18.3/pkg/util/sets so that it can easily used in non-k8s related projects. - -## Generate set types - -```bash -set-gen \ - --input-dirs=gomodules.xyz/sets/types \ - --output-package=gomodules.xyz/sets -``` diff --git a/vendor/gomodules.xyz/sets/byte.go b/vendor/gomodules.xyz/sets/byte.go deleted file mode 100644 index b7f3500d..00000000 --- a/vendor/gomodules.xyz/sets/byte.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Byte is a set of bytes, implemented via map[byte]struct{} for minimal memory consumption. -type Byte map[byte]Empty - -// NewByte creates a Byte from a list of values. -func NewByte(items ...byte) Byte { - ss := make(Byte, len(items)) - ss.Insert(items...) - return ss -} - -// ByteKeySet creates a Byte from a keys of a map[byte](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func ByteKeySet(theMap interface{}) Byte { - v := reflect.ValueOf(theMap) - ret := Byte{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(byte)) - } - return ret -} - -// Insert adds items to the set. -func (s Byte) Insert(items ...byte) Byte { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Byte) Delete(items ...byte) Byte { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Byte) Has(item byte) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Byte) HasAll(items ...byte) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Byte) HasAny(items ...byte) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Byte) Difference(s2 Byte) Byte { - result := NewByte() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Byte) Union(s2 Byte) Byte { - result := NewByte() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Byte) Intersection(s2 Byte) Byte { - var walk, other Byte - result := NewByte() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Byte) IsSuperset(s2 Byte) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Byte) Equal(s2 Byte) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfByte []byte - -func (s sortableSliceOfByte) Len() int { return len(s) } -func (s sortableSliceOfByte) Less(i, j int) bool { return lessByte(s[i], s[j]) } -func (s sortableSliceOfByte) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted byte slice. -func (s Byte) List() []byte { - res := make(sortableSliceOfByte, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []byte(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Byte) UnsortedList() []byte { - res := make([]byte, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Byte) PopAny() (byte, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue byte - return zeroValue, false -} - -// Len returns the size of the set. -func (s Byte) Len() int { - return len(s) -} - -func lessByte(lhs, rhs byte) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/doc.go b/vendor/gomodules.xyz/sets/doc.go deleted file mode 100644 index b152a0bf..00000000 --- a/vendor/gomodules.xyz/sets/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -// Package sets has auto-generated set types. -package sets diff --git a/vendor/gomodules.xyz/sets/empty.go b/vendor/gomodules.xyz/sets/empty.go deleted file mode 100644 index e11e622c..00000000 --- a/vendor/gomodules.xyz/sets/empty.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -// Empty is public since it is used by some internal API objects for conversions between external -// string arrays and internal sets, and conversion logic requires public types today. -type Empty struct{} diff --git a/vendor/gomodules.xyz/sets/float32.go b/vendor/gomodules.xyz/sets/float32.go deleted file mode 100644 index cd2ee27f..00000000 --- a/vendor/gomodules.xyz/sets/float32.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Float32 is a set of float32s, implemented via map[float32]struct{} for minimal memory consumption. -type Float32 map[float32]Empty - -// NewFloat32 creates a Float32 from a list of values. -func NewFloat32(items ...float32) Float32 { - ss := make(Float32, len(items)) - ss.Insert(items...) - return ss -} - -// Float32KeySet creates a Float32 from a keys of a map[float32](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Float32KeySet(theMap interface{}) Float32 { - v := reflect.ValueOf(theMap) - ret := Float32{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(float32)) - } - return ret -} - -// Insert adds items to the set. -func (s Float32) Insert(items ...float32) Float32 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Float32) Delete(items ...float32) Float32 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Float32) Has(item float32) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Float32) HasAll(items ...float32) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Float32) HasAny(items ...float32) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Float32) Difference(s2 Float32) Float32 { - result := NewFloat32() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Float32) Union(s2 Float32) Float32 { - result := NewFloat32() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Float32) Intersection(s2 Float32) Float32 { - var walk, other Float32 - result := NewFloat32() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Float32) IsSuperset(s2 Float32) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Float32) Equal(s2 Float32) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfFloat32 []float32 - -func (s sortableSliceOfFloat32) Len() int { return len(s) } -func (s sortableSliceOfFloat32) Less(i, j int) bool { return lessFloat32(s[i], s[j]) } -func (s sortableSliceOfFloat32) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted float32 slice. -func (s Float32) List() []float32 { - res := make(sortableSliceOfFloat32, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []float32(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Float32) UnsortedList() []float32 { - res := make([]float32, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Float32) PopAny() (float32, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue float32 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Float32) Len() int { - return len(s) -} - -func lessFloat32(lhs, rhs float32) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/float64.go b/vendor/gomodules.xyz/sets/float64.go deleted file mode 100644 index 58278717..00000000 --- a/vendor/gomodules.xyz/sets/float64.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Float64 is a set of float64s, implemented via map[float64]struct{} for minimal memory consumption. -type Float64 map[float64]Empty - -// NewFloat64 creates a Float64 from a list of values. -func NewFloat64(items ...float64) Float64 { - ss := make(Float64, len(items)) - ss.Insert(items...) - return ss -} - -// Float64KeySet creates a Float64 from a keys of a map[float64](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Float64KeySet(theMap interface{}) Float64 { - v := reflect.ValueOf(theMap) - ret := Float64{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(float64)) - } - return ret -} - -// Insert adds items to the set. -func (s Float64) Insert(items ...float64) Float64 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Float64) Delete(items ...float64) Float64 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Float64) Has(item float64) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Float64) HasAll(items ...float64) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Float64) HasAny(items ...float64) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Float64) Difference(s2 Float64) Float64 { - result := NewFloat64() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Float64) Union(s2 Float64) Float64 { - result := NewFloat64() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Float64) Intersection(s2 Float64) Float64 { - var walk, other Float64 - result := NewFloat64() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Float64) IsSuperset(s2 Float64) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Float64) Equal(s2 Float64) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfFloat64 []float64 - -func (s sortableSliceOfFloat64) Len() int { return len(s) } -func (s sortableSliceOfFloat64) Less(i, j int) bool { return lessFloat64(s[i], s[j]) } -func (s sortableSliceOfFloat64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted float64 slice. -func (s Float64) List() []float64 { - res := make(sortableSliceOfFloat64, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []float64(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Float64) UnsortedList() []float64 { - res := make([]float64, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Float64) PopAny() (float64, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue float64 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Float64) Len() int { - return len(s) -} - -func lessFloat64(lhs, rhs float64) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/int.go b/vendor/gomodules.xyz/sets/int.go deleted file mode 100644 index 43c4a271..00000000 --- a/vendor/gomodules.xyz/sets/int.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int is a set of ints, implemented via map[int]struct{} for minimal memory consumption. -type Int map[int]Empty - -// NewInt creates a Int from a list of values. -func NewInt(items ...int) Int { - ss := make(Int, len(items)) - ss.Insert(items...) - return ss -} - -// IntKeySet creates a Int from a keys of a map[int](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func IntKeySet(theMap interface{}) Int { - v := reflect.ValueOf(theMap) - ret := Int{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int)) - } - return ret -} - -// Insert adds items to the set. -func (s Int) Insert(items ...int) Int { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Int) Delete(items ...int) Int { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Int) Has(item int) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int) HasAll(items ...int) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int) HasAny(items ...int) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Int) Difference(s2 Int) Int { - result := NewInt() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int) Union(s2 Int) Int { - result := NewInt() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int) Intersection(s2 Int) Int { - var walk, other Int - result := NewInt() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int) IsSuperset(s2 Int) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int) Equal(s2 Int) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt []int - -func (s sortableSliceOfInt) Len() int { return len(s) } -func (s sortableSliceOfInt) Less(i, j int) bool { return lessInt(s[i], s[j]) } -func (s sortableSliceOfInt) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int slice. -func (s Int) List() []int { - res := make(sortableSliceOfInt, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int) UnsortedList() []int { - res := make([]int, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int) PopAny() (int, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int) Len() int { - return len(s) -} - -func lessInt(lhs, rhs int) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/int32.go b/vendor/gomodules.xyz/sets/int32.go deleted file mode 100644 index 11b9df5a..00000000 --- a/vendor/gomodules.xyz/sets/int32.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int32 is a set of int32s, implemented via map[int32]struct{} for minimal memory consumption. -type Int32 map[int32]Empty - -// NewInt32 creates a Int32 from a list of values. -func NewInt32(items ...int32) Int32 { - ss := make(Int32, len(items)) - ss.Insert(items...) - return ss -} - -// Int32KeySet creates a Int32 from a keys of a map[int32](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Int32KeySet(theMap interface{}) Int32 { - v := reflect.ValueOf(theMap) - ret := Int32{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int32)) - } - return ret -} - -// Insert adds items to the set. -func (s Int32) Insert(items ...int32) Int32 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Int32) Delete(items ...int32) Int32 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Int32) Has(item int32) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int32) HasAll(items ...int32) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int32) HasAny(items ...int32) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Int32) Difference(s2 Int32) Int32 { - result := NewInt32() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int32) Union(s2 Int32) Int32 { - result := NewInt32() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int32) Intersection(s2 Int32) Int32 { - var walk, other Int32 - result := NewInt32() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int32) IsSuperset(s2 Int32) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int32) Equal(s2 Int32) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt32 []int32 - -func (s sortableSliceOfInt32) Len() int { return len(s) } -func (s sortableSliceOfInt32) Less(i, j int) bool { return lessInt32(s[i], s[j]) } -func (s sortableSliceOfInt32) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int32 slice. -func (s Int32) List() []int32 { - res := make(sortableSliceOfInt32, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int32(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int32) UnsortedList() []int32 { - res := make([]int32, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int32) PopAny() (int32, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int32 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int32) Len() int { - return len(s) -} - -func lessInt32(lhs, rhs int32) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/int64.go b/vendor/gomodules.xyz/sets/int64.go deleted file mode 100644 index 1a2c674e..00000000 --- a/vendor/gomodules.xyz/sets/int64.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Int64 is a set of int64s, implemented via map[int64]struct{} for minimal memory consumption. -type Int64 map[int64]Empty - -// NewInt64 creates a Int64 from a list of values. -func NewInt64(items ...int64) Int64 { - ss := make(Int64, len(items)) - ss.Insert(items...) - return ss -} - -// Int64KeySet creates a Int64 from a keys of a map[int64](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Int64KeySet(theMap interface{}) Int64 { - v := reflect.ValueOf(theMap) - ret := Int64{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(int64)) - } - return ret -} - -// Insert adds items to the set. -func (s Int64) Insert(items ...int64) Int64 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Int64) Delete(items ...int64) Int64 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Int64) Has(item int64) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Int64) HasAll(items ...int64) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Int64) HasAny(items ...int64) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Int64) Difference(s2 Int64) Int64 { - result := NewInt64() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Int64) Union(s2 Int64) Int64 { - result := NewInt64() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Int64) Intersection(s2 Int64) Int64 { - var walk, other Int64 - result := NewInt64() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Int64) IsSuperset(s2 Int64) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Int64) Equal(s2 Int64) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfInt64 []int64 - -func (s sortableSliceOfInt64) Len() int { return len(s) } -func (s sortableSliceOfInt64) Less(i, j int) bool { return lessInt64(s[i], s[j]) } -func (s sortableSliceOfInt64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted int64 slice. -func (s Int64) List() []int64 { - res := make(sortableSliceOfInt64, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []int64(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Int64) UnsortedList() []int64 { - res := make([]int64, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Int64) PopAny() (int64, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue int64 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Int64) Len() int { - return len(s) -} - -func lessInt64(lhs, rhs int64) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/string.go b/vendor/gomodules.xyz/sets/string.go deleted file mode 100644 index bcba151f..00000000 --- a/vendor/gomodules.xyz/sets/string.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption. -type String map[string]Empty - -// NewString creates a String from a list of values. -func NewString(items ...string) String { - ss := make(String, len(items)) - ss.Insert(items...) - return ss -} - -// StringKeySet creates a String from a keys of a map[string](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func StringKeySet(theMap interface{}) String { - v := reflect.ValueOf(theMap) - ret := String{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(string)) - } - return ret -} - -// Insert adds items to the set. -func (s String) Insert(items ...string) String { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s String) Delete(items ...string) String { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s String) Has(item string) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s String) HasAll(items ...string) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s String) HasAny(items ...string) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s String) Difference(s2 String) String { - result := NewString() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 String) Union(s2 String) String { - result := NewString() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 String) Intersection(s2 String) String { - var walk, other String - result := NewString() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 String) IsSuperset(s2 String) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 String) Equal(s2 String) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfString []string - -func (s sortableSliceOfString) Len() int { return len(s) } -func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) } -func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted string slice. -func (s String) List() []string { - res := make(sortableSliceOfString, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []string(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s String) UnsortedList() []string { - res := make([]string, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s String) PopAny() (string, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue string - return zeroValue, false -} - -// Len returns the size of the set. -func (s String) Len() int { - return len(s) -} - -func lessString(lhs, rhs string) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/uint.go b/vendor/gomodules.xyz/sets/uint.go deleted file mode 100644 index 3626c92b..00000000 --- a/vendor/gomodules.xyz/sets/uint.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Uint is a set of uints, implemented via map[uint]struct{} for minimal memory consumption. -type Uint map[uint]Empty - -// NewUint creates a Uint from a list of values. -func NewUint(items ...uint) Uint { - ss := make(Uint, len(items)) - ss.Insert(items...) - return ss -} - -// UintKeySet creates a Uint from a keys of a map[uint](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func UintKeySet(theMap interface{}) Uint { - v := reflect.ValueOf(theMap) - ret := Uint{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(uint)) - } - return ret -} - -// Insert adds items to the set. -func (s Uint) Insert(items ...uint) Uint { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Uint) Delete(items ...uint) Uint { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Uint) Has(item uint) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Uint) HasAll(items ...uint) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Uint) HasAny(items ...uint) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Uint) Difference(s2 Uint) Uint { - result := NewUint() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Uint) Union(s2 Uint) Uint { - result := NewUint() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Uint) Intersection(s2 Uint) Uint { - var walk, other Uint - result := NewUint() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Uint) IsSuperset(s2 Uint) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Uint) Equal(s2 Uint) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfUint []uint - -func (s sortableSliceOfUint) Len() int { return len(s) } -func (s sortableSliceOfUint) Less(i, j int) bool { return lessUint(s[i], s[j]) } -func (s sortableSliceOfUint) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted uint slice. -func (s Uint) List() []uint { - res := make(sortableSliceOfUint, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []uint(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Uint) UnsortedList() []uint { - res := make([]uint, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Uint) PopAny() (uint, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue uint - return zeroValue, false -} - -// Len returns the size of the set. -func (s Uint) Len() int { - return len(s) -} - -func lessUint(lhs, rhs uint) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/uint16.go b/vendor/gomodules.xyz/sets/uint16.go deleted file mode 100644 index 2261da9c..00000000 --- a/vendor/gomodules.xyz/sets/uint16.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Uint16 is a set of uint16s, implemented via map[uint16]struct{} for minimal memory consumption. -type Uint16 map[uint16]Empty - -// NewUint16 creates a Uint16 from a list of values. -func NewUint16(items ...uint16) Uint16 { - ss := make(Uint16, len(items)) - ss.Insert(items...) - return ss -} - -// Uint16KeySet creates a Uint16 from a keys of a map[uint16](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Uint16KeySet(theMap interface{}) Uint16 { - v := reflect.ValueOf(theMap) - ret := Uint16{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(uint16)) - } - return ret -} - -// Insert adds items to the set. -func (s Uint16) Insert(items ...uint16) Uint16 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Uint16) Delete(items ...uint16) Uint16 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Uint16) Has(item uint16) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Uint16) HasAll(items ...uint16) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Uint16) HasAny(items ...uint16) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Uint16) Difference(s2 Uint16) Uint16 { - result := NewUint16() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Uint16) Union(s2 Uint16) Uint16 { - result := NewUint16() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Uint16) Intersection(s2 Uint16) Uint16 { - var walk, other Uint16 - result := NewUint16() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Uint16) IsSuperset(s2 Uint16) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Uint16) Equal(s2 Uint16) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfUint16 []uint16 - -func (s sortableSliceOfUint16) Len() int { return len(s) } -func (s sortableSliceOfUint16) Less(i, j int) bool { return lessUint16(s[i], s[j]) } -func (s sortableSliceOfUint16) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted uint16 slice. -func (s Uint16) List() []uint16 { - res := make(sortableSliceOfUint16, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []uint16(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Uint16) UnsortedList() []uint16 { - res := make([]uint16, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Uint16) PopAny() (uint16, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue uint16 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Uint16) Len() int { - return len(s) -} - -func lessUint16(lhs, rhs uint16) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/uint32.go b/vendor/gomodules.xyz/sets/uint32.go deleted file mode 100644 index f0a211c1..00000000 --- a/vendor/gomodules.xyz/sets/uint32.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Uint32 is a set of uint32s, implemented via map[uint32]struct{} for minimal memory consumption. -type Uint32 map[uint32]Empty - -// NewUint32 creates a Uint32 from a list of values. -func NewUint32(items ...uint32) Uint32 { - ss := make(Uint32, len(items)) - ss.Insert(items...) - return ss -} - -// Uint32KeySet creates a Uint32 from a keys of a map[uint32](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Uint32KeySet(theMap interface{}) Uint32 { - v := reflect.ValueOf(theMap) - ret := Uint32{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(uint32)) - } - return ret -} - -// Insert adds items to the set. -func (s Uint32) Insert(items ...uint32) Uint32 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Uint32) Delete(items ...uint32) Uint32 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Uint32) Has(item uint32) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Uint32) HasAll(items ...uint32) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Uint32) HasAny(items ...uint32) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Uint32) Difference(s2 Uint32) Uint32 { - result := NewUint32() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Uint32) Union(s2 Uint32) Uint32 { - result := NewUint32() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Uint32) Intersection(s2 Uint32) Uint32 { - var walk, other Uint32 - result := NewUint32() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Uint32) IsSuperset(s2 Uint32) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Uint32) Equal(s2 Uint32) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfUint32 []uint32 - -func (s sortableSliceOfUint32) Len() int { return len(s) } -func (s sortableSliceOfUint32) Less(i, j int) bool { return lessUint32(s[i], s[j]) } -func (s sortableSliceOfUint32) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted uint32 slice. -func (s Uint32) List() []uint32 { - res := make(sortableSliceOfUint32, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []uint32(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Uint32) UnsortedList() []uint32 { - res := make([]uint32, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Uint32) PopAny() (uint32, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue uint32 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Uint32) Len() int { - return len(s) -} - -func lessUint32(lhs, rhs uint32) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/sets/uint64.go b/vendor/gomodules.xyz/sets/uint64.go deleted file mode 100644 index 762c719e..00000000 --- a/vendor/gomodules.xyz/sets/uint64.go +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by set-gen. DO NOT EDIT. - -package sets - -import ( - "reflect" - "sort" -) - -// sets.Uint64 is a set of uint64s, implemented via map[uint64]struct{} for minimal memory consumption. -type Uint64 map[uint64]Empty - -// NewUint64 creates a Uint64 from a list of values. -func NewUint64(items ...uint64) Uint64 { - ss := make(Uint64, len(items)) - ss.Insert(items...) - return ss -} - -// Uint64KeySet creates a Uint64 from a keys of a map[uint64](? extends interface{}). -// If the value passed in is not actually a map, this will panic. -func Uint64KeySet(theMap interface{}) Uint64 { - v := reflect.ValueOf(theMap) - ret := Uint64{} - - for _, keyValue := range v.MapKeys() { - ret.Insert(keyValue.Interface().(uint64)) - } - return ret -} - -// Insert adds items to the set. -func (s Uint64) Insert(items ...uint64) Uint64 { - for _, item := range items { - s[item] = Empty{} - } - return s -} - -// Delete removes all items from the set. -func (s Uint64) Delete(items ...uint64) Uint64 { - for _, item := range items { - delete(s, item) - } - return s -} - -// Has returns true if and only if item is contained in the set. -func (s Uint64) Has(item uint64) bool { - _, contained := s[item] - return contained -} - -// HasAll returns true if and only if all items are contained in the set. -func (s Uint64) HasAll(items ...uint64) bool { - for _, item := range items { - if !s.Has(item) { - return false - } - } - return true -} - -// HasAny returns true if any items are contained in the set. -func (s Uint64) HasAny(items ...uint64) bool { - for _, item := range items { - if s.Has(item) { - return true - } - } - return false -} - -// Difference returns a set of objects that are not in s2 -// For example: -// s1 = {a1, a2, a3} -// s2 = {a1, a2, a4, a5} -// s1.Difference(s2) = {a3} -// s2.Difference(s1) = {a4, a5} -func (s Uint64) Difference(s2 Uint64) Uint64 { - result := NewUint64() - for key := range s { - if !s2.Has(key) { - result.Insert(key) - } - } - return result -} - -// Union returns a new set which includes items in either s1 or s2. -// For example: -// s1 = {a1, a2} -// s2 = {a3, a4} -// s1.Union(s2) = {a1, a2, a3, a4} -// s2.Union(s1) = {a1, a2, a3, a4} -func (s1 Uint64) Union(s2 Uint64) Uint64 { - result := NewUint64() - for key := range s1 { - result.Insert(key) - } - for key := range s2 { - result.Insert(key) - } - return result -} - -// Intersection returns a new set which includes the item in BOTH s1 and s2 -// For example: -// s1 = {a1, a2} -// s2 = {a2, a3} -// s1.Intersection(s2) = {a2} -func (s1 Uint64) Intersection(s2 Uint64) Uint64 { - var walk, other Uint64 - result := NewUint64() - if s1.Len() < s2.Len() { - walk = s1 - other = s2 - } else { - walk = s2 - other = s1 - } - for key := range walk { - if other.Has(key) { - result.Insert(key) - } - } - return result -} - -// IsSuperset returns true if and only if s1 is a superset of s2. -func (s1 Uint64) IsSuperset(s2 Uint64) bool { - for item := range s2 { - if !s1.Has(item) { - return false - } - } - return true -} - -// Equal returns true if and only if s1 is equal (as a set) to s2. -// Two sets are equal if their membership is identical. -// (In practice, this means same elements, order doesn't matter) -func (s1 Uint64) Equal(s2 Uint64) bool { - return len(s1) == len(s2) && s1.IsSuperset(s2) -} - -type sortableSliceOfUint64 []uint64 - -func (s sortableSliceOfUint64) Len() int { return len(s) } -func (s sortableSliceOfUint64) Less(i, j int) bool { return lessUint64(s[i], s[j]) } -func (s sortableSliceOfUint64) Swap(i, j int) { s[i], s[j] = s[j], s[i] } - -// List returns the contents as a sorted uint64 slice. -func (s Uint64) List() []uint64 { - res := make(sortableSliceOfUint64, 0, len(s)) - for key := range s { - res = append(res, key) - } - sort.Sort(res) - return []uint64(res) -} - -// UnsortedList returns the slice with contents in random order. -func (s Uint64) UnsortedList() []uint64 { - res := make([]uint64, 0, len(s)) - for key := range s { - res = append(res, key) - } - return res -} - -// Returns a single element from the set. -func (s Uint64) PopAny() (uint64, bool) { - for key := range s { - s.Delete(key) - return key, true - } - var zeroValue uint64 - return zeroValue, false -} - -// Len returns the size of the set. -func (s Uint64) Len() int { - return len(s) -} - -func lessUint64(lhs, rhs uint64) bool { - return lhs < rhs -} diff --git a/vendor/gomodules.xyz/x/LICENSE b/vendor/gomodules.xyz/x/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/vendor/gomodules.xyz/x/LICENSE +++ /dev/null @@ -1,201 +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/gomodules.xyz/x/ioutil/copy.go b/vendor/gomodules.xyz/x/ioutil/copy.go deleted file mode 100644 index e31b1cb6..00000000 --- a/vendor/gomodules.xyz/x/ioutil/copy.go +++ /dev/null @@ -1,166 +0,0 @@ -/* MIT License - * - * Copyright (c) 2017 Roland Singer [roland.singer@desertbit.com] - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -package ioutil - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" -) - -// ref: https://gist.github.com/r0l1/92462b38df26839a3ca324697c8cba04 - -// CopyFile copies the contents of the file named src to the file named -// by dst. The file will be created if it does not already exist. If the -// destination file exists, all it's contents will be replaced by the contents -// of the source file. The file mode will be copied from the source and -// the copied data is synced/flushed to stable storage. -func CopyFile(dst, src string) (err error) { - in, err := os.Open(src) - if err != nil { - return - } - defer in.Close() - - out, err := os.Create(dst) - if err != nil { - return - } - defer func() { - if e := out.Close(); e != nil { - err = e - } - }() - - _, err = io.Copy(out, in) - if err != nil { - return - } - - err = out.Sync() - if err != nil { - return - } - - si, err := os.Stat(src) - if err != nil { - return - } - err = os.Chmod(dst, si.Mode()) - if err != nil { - return - } - - return -} - -type options struct { - IgnoreDestination bool - ReplaceDestination bool -} - -type CopyDirFn func(*options) - -func IgnoreDestination() CopyDirFn { - return func(opts *options) { - opts.IgnoreDestination = true - } -} - -func ReplaceDestination() CopyDirFn { - return func(opts *options) { - opts.ReplaceDestination = true - } -} - -// CopyDir recursively copies a directory tree, attempting to preserve permissions. -// Source directory must exist, destination directory must *not* exist. -// Symlinks are ignored and skipped. -func CopyDir(dst, src string, fns ...CopyDirFn) (err error) { - var opts options - for _, fn := range fns { - fn(&opts) - } - - src = filepath.Clean(src) - dst = filepath.Clean(dst) - - si, err := os.Stat(src) - if err != nil { - return err - } - if !si.IsDir() { - return fmt.Errorf("source is not a directory") - } - - _, err = os.Stat(dst) - if err != nil && !os.IsNotExist(err) { - return - } - if err == nil { - if opts.ReplaceDestination { - err = os.RemoveAll(dst) - if err != nil { - return err - } - } else if !opts.IgnoreDestination { - return fmt.Errorf("destination already exists") - } - } - - err = os.MkdirAll(dst, si.Mode()) - if err != nil { - return - } - - entries, err := ioutil.ReadDir(src) - if err != nil { - return - } - - for _, entry := range entries { - srcPath := filepath.Join(src, entry.Name()) - dstPath := filepath.Join(dst, entry.Name()) - - if entry.IsDir() { - err = CopyDir(dstPath, srcPath) - if err != nil { - return - } - } else { - // Skip symlinks. - if entry.Mode()&os.ModeSymlink != 0 { - continue - } - - err = CopyFile(dstPath, srcPath) - if err != nil { - return - } - } - } - - return -} diff --git a/vendor/gomodules.xyz/x/ioutil/helpers.go b/vendor/gomodules.xyz/x/ioutil/helpers.go deleted file mode 100644 index 3c952d40..00000000 --- a/vendor/gomodules.xyz/x/ioutil/helpers.go +++ /dev/null @@ -1,137 +0,0 @@ -package ioutil - -import ( - "bufio" - "encoding/json" - "errors" - "io" - "io/fs" - "os" - "path/filepath" - "strings" -) - -func ReadFile(path string) (string, error) { - content, err := os.ReadFile(path) - if err != nil { - return "", err - } - return string(content), nil -} - -func ReadFileAs(path string, obj interface{}) error { - d, err := os.ReadFile(path) - if err != nil { - return err - } - err = json.Unmarshal(d, obj) - if err != nil { - return err - } - return nil -} - -/* -ReadINIConfig loads a ini config file without any sections. Example: ---- --- --- -a=b -c=d ---- --- --- -*/ -func ReadINIConfig(path string) (map[string]string, error) { - file, err := os.Open(path) - if err != nil { - return nil, err - } - defer file.Close() - - mp := make(map[string]string) - scanner := bufio.NewScanner(file) - for scanner.Scan() { - result := strings.Split(scanner.Text(), "=") - if len(result) != 2 { - continue - } - mp[string(result[0])] = result[1] - } - - if err := scanner.Err(); err != nil { - return nil, err - } - return mp, nil -} - -func WriteJson(path string, obj interface{}) error { - d, err := json.MarshalIndent(obj, "", " ") - if err != nil { - return err - } - EnsureDirectory(path) - err = os.WriteFile(path, d, os.ModePerm) - if err != nil { - return err - } - return nil -} - -func WriteString(path string, data string) bool { - EnsureDirectory(path) - err := os.WriteFile(path, []byte(data), os.ModePerm) - if err != nil { - return false - } - return true -} - -func AppendToFile(path string, values string) error { - EnsureDirectory(path) - if _, err := os.Stat(path); err != nil { - os.WriteFile(path, []byte(""), os.ModePerm) - } - f, err := os.OpenFile(path, os.O_APPEND|os.O_WRONLY, 0o666) - if err != nil { - return err - } - defer f.Close() - f.WriteString("\n") - _, err = f.WriteString(values) - if err != nil { - return err - } - return nil -} - -func EnsureDirectory(path string) error { - parent := filepath.Dir(path) - if _, err := os.Stat(parent); err != nil { - return os.MkdirAll(parent, os.ModePerm) - } - return nil -} - -func PathExists(path string) bool { - _, err := os.Stat(path) - return err == nil -} - -func PathNotExists(path string) bool { - _, err := os.Stat(path) - return errors.Is(err, fs.ErrNotExist) -} - -// WriteFile writes the contents from src to dst using io.Copy. -// If dst does not exist, WriteFile creates it with permissions perm; -// otherwise WriteFile truncates it before writing. -func WriteFile(dst string, src io.Reader, perm os.FileMode) (err error) { - out, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm) - if err != nil { - return - } - defer func() { - if e := out.Close(); e != nil { - err = e - } - }() - _, err = io.Copy(out, src) - return -} diff --git a/vendor/gomodules.xyz/x/ioutil/reloader.go b/vendor/gomodules.xyz/x/ioutil/reloader.go deleted file mode 100644 index fa3a3076..00000000 --- a/vendor/gomodules.xyz/x/ioutil/reloader.go +++ /dev/null @@ -1,55 +0,0 @@ -package ioutil - -import ( - "bytes" - "embed" - iofs "io/fs" - "os" -) - -const ( - TriggerFile = "trigger" -) - -type Reloader struct { - dir string - fs embed.FS - - trigger []byte - loaded bool - loadFn func(fsys iofs.FS) -} - -func NewReloader(dir string, fs embed.FS, loadFn func(fsys iofs.FS)) *Reloader { - return &Reloader{ - dir: dir, - fs: fs, - trigger: nil, - loaded: false, - loadFn: loadFn, - } -} - -func (r *Reloader) FS() iofs.FS { - if fi, err := os.Stat(r.dir); os.IsNotExist(err) || !fi.IsDir() { - return r.fs - } - return os.DirFS(r.dir) -} - -func (r *Reloader) needsReload(fsys iofs.FS) bool { - if data, err := iofs.ReadFile(fsys, TriggerFile); err == nil { - yes := bytes.Compare(r.trigger, data) != 0 - r.trigger = data - return yes || !r.loaded // ensure loads at least first time - } - return !r.loaded -} - -func (r *Reloader) ReloadIfTriggered() { - fsys := r.FS() - if r.needsReload(fsys) { - r.loadFn(fsys) - r.loaded = true - } -} diff --git a/vendor/gomodules.xyz/x/ioutil/watcher.go b/vendor/gomodules.xyz/x/ioutil/watcher.go deleted file mode 100644 index 60becd37..00000000 --- a/vendor/gomodules.xyz/x/ioutil/watcher.go +++ /dev/null @@ -1,81 +0,0 @@ -package ioutil - -import ( - "fmt" - "path/filepath" - "sync/atomic" - - "github.com/fsnotify/fsnotify" - "gomodules.xyz/sets" - "k8s.io/klog/v2" -) - -type Watcher struct { - WatchFiles []string - WatchDir string - Reload func() error - - reloadCount uint64 -} - -func (w *Watcher) incReloadCount(filename string) { - atomic.AddUint64(&w.reloadCount, 1) - klog.Infof("file %s reloaded: %d", filename, atomic.LoadUint64(&w.reloadCount)) -} - -func (w *Watcher) Run(stopCh <-chan struct{}) error { - fileset := sets.NewString(w.WatchFiles...) - - watcher, err := fsnotify.NewWatcher() - if err != nil { - return err - } - go func() { - <-stopCh - defer watcher.Close() - }() - - go func() { - for { - select { - case event := <-watcher.Events: - klog.Infoln("file watcher event: --------------------------------------", event) - - filename := filepath.Clean(event.Name) - if !fileset.Has(filename) { - continue - } - - switch event.Op { - case fsnotify.Create: - if err = watcher.Add(filename); err != nil { - klog.Errorln("error:", err) - } - case fsnotify.Write: - if err := w.Reload(); err != nil { - klog.Errorln(err) - } else { - w.incReloadCount(filename) - } - case fsnotify.Remove, fsnotify.Rename: - if err = watcher.Remove(filename); err != nil { - klog.Errorln("error:", err) - } - } - case err := <-watcher.Errors: - klog.Errorln("error:", err) - } - } - }() - - for _, filename := range w.WatchFiles { - if err = watcher.Add(filename); err != nil { - klog.Errorf("error watching file %s. Reason: %s", filename, err) - } - } - if err = watcher.Add(w.WatchDir); err != nil { - return fmt.Errorf("error watching dir %s. Reason: %s", w.WatchDir, err) - } - - return nil -} diff --git a/vendor/helm.sh/helm/v3/pkg/strvals/doc.go b/vendor/helm.sh/helm/v3/pkg/strvals/doc.go deleted file mode 100644 index e9931300..00000000 --- a/vendor/helm.sh/helm/v3/pkg/strvals/doc.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright The Helm 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 strvals provides tools for working with strval lines. - -Helm supports a compressed format for YAML settings which we call strvals. -The format is roughly like this: - - name=value,topname.subname=value - -The above is equivalent to the YAML document - - name: value - topname: - subname: value - -This package provides a parser and utilities for converting the strvals format -to other formats. -*/ -package strvals diff --git a/vendor/helm.sh/helm/v3/pkg/strvals/literal_parser.go b/vendor/helm.sh/helm/v3/pkg/strvals/literal_parser.go deleted file mode 100644 index f7565581..00000000 --- a/vendor/helm.sh/helm/v3/pkg/strvals/literal_parser.go +++ /dev/null @@ -1,244 +0,0 @@ -/* -Copyright The Helm 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 strvals - -import ( - "bytes" - "fmt" - "io" - "strconv" - - "github.com/pkg/errors" -) - -// ParseLiteral parses a set line interpreting the value as a literal string. -// -// A set line is of the form name1=value1 -func ParseLiteral(s string) (map[string]interface{}, error) { - vals := map[string]interface{}{} - scanner := bytes.NewBufferString(s) - t := newLiteralParser(scanner, vals) - err := t.parse() - return vals, err -} - -// ParseLiteralInto parses a strvals line and merges the result into dest. -// The value is interpreted as a literal string. -// -// If the strval string has a key that exists in dest, it overwrites the -// dest version. -func ParseLiteralInto(s string, dest map[string]interface{}) error { - scanner := bytes.NewBufferString(s) - t := newLiteralParser(scanner, dest) - return t.parse() -} - -// literalParser is a simple parser that takes a strvals line and parses -// it into a map representation. -// -// Values are interpreted as a literal string. -// -// where sc is the source of the original data being parsed -// where data is the final parsed data from the parses with correct types -type literalParser struct { - sc *bytes.Buffer - data map[string]interface{} -} - -func newLiteralParser(sc *bytes.Buffer, data map[string]interface{}) *literalParser { - return &literalParser{sc: sc, data: data} -} - -func (t *literalParser) parse() error { - for { - err := t.key(t.data, 0) - if err == nil { - continue - } - if err == io.EOF { - return nil - } - return err - } -} - -func runesUntilLiteral(in io.RuneReader, stop map[rune]bool) ([]rune, rune, error) { - v := []rune{} - for { - switch r, _, e := in.ReadRune(); { - case e != nil: - return v, r, e - case inMap(r, stop): - return v, r, nil - default: - v = append(v, r) - } - } -} - -func (t *literalParser) key(data map[string]interface{}, nestedNameLevel int) (reterr error) { - defer func() { - if r := recover(); r != nil { - reterr = fmt.Errorf("unable to parse key: %s", r) - } - }() - stop := runeSet([]rune{'=', '[', '.'}) - for { - switch key, lastRune, err := runesUntilLiteral(t.sc, stop); { - case err != nil: - if len(key) == 0 { - return err - } - return errors.Errorf("key %q has no value", string(key)) - - case lastRune == '=': - // found end of key: swallow the '=' and get the value - value, err := t.val() - if err == nil && err != io.EOF { - return err - } - set(data, string(key), string(value)) - return nil - - case lastRune == '.': - // Check value name is within the maximum nested name level - nestedNameLevel++ - if nestedNameLevel > MaxNestedNameLevel { - return fmt.Errorf("value name nested level is greater than maximum supported nested level of %d", MaxNestedNameLevel) - } - - // first, create or find the target map in the given data - inner := map[string]interface{}{} - if _, ok := data[string(key)]; ok { - inner = data[string(key)].(map[string]interface{}) - } - - // recurse on sub-tree with remaining data - err := t.key(inner, nestedNameLevel) - if err == nil && len(inner) == 0 { - return errors.Errorf("key map %q has no value", string(key)) - } - if len(inner) != 0 { - set(data, string(key), inner) - } - return err - - case lastRune == '[': - // We are in a list index context, so we need to set an index. - i, err := t.keyIndex() - if err != nil { - return errors.Wrap(err, "error parsing index") - } - kk := string(key) - - // find or create target list - list := []interface{}{} - if _, ok := data[kk]; ok { - list = data[kk].([]interface{}) - } - - // now we need to get the value after the ] - list, err = t.listItem(list, i, nestedNameLevel) - set(data, kk, list) - return err - } - } -} - -func (t *literalParser) keyIndex() (int, error) { - // First, get the key. - stop := runeSet([]rune{']'}) - v, _, err := runesUntilLiteral(t.sc, stop) - if err != nil { - return 0, err - } - - // v should be the index - return strconv.Atoi(string(v)) -} - -func (t *literalParser) listItem(list []interface{}, i, nestedNameLevel int) ([]interface{}, error) { - if i < 0 { - return list, fmt.Errorf("negative %d index not allowed", i) - } - stop := runeSet([]rune{'[', '.', '='}) - - switch key, lastRune, err := runesUntilLiteral(t.sc, stop); { - case len(key) > 0: - return list, errors.Errorf("unexpected data at end of array index: %q", key) - - case err != nil: - return list, err - - case lastRune == '=': - value, err := t.val() - if err != nil && err != io.EOF { - return list, err - } - return setIndex(list, i, string(value)) - - case lastRune == '.': - // we have a nested object. Send to t.key - inner := map[string]interface{}{} - if len(list) > i { - var ok bool - inner, ok = list[i].(map[string]interface{}) - if !ok { - // We have indices out of order. Initialize empty value. - list[i] = map[string]interface{}{} - inner = list[i].(map[string]interface{}) - } - } - - // recurse - err := t.key(inner, nestedNameLevel) - if err != nil { - return list, err - } - return setIndex(list, i, inner) - - case lastRune == '[': - // now we have a nested list. Read the index and handle. - nextI, err := t.keyIndex() - if err != nil { - return list, errors.Wrap(err, "error parsing index") - } - var crtList []interface{} - if len(list) > i { - // If nested list already exists, take the value of list to next cycle. - existed := list[i] - if existed != nil { - crtList = list[i].([]interface{}) - } - } - - // Now we need to get the value after the ]. - list2, err := t.listItem(crtList, nextI, nestedNameLevel) - if err != nil { - return list, err - } - return setIndex(list, i, list2) - - default: - return nil, errors.Errorf("parse error: unexpected token %v", lastRune) - } -} - -func (t *literalParser) val() ([]rune, error) { - stop := runeSet([]rune{}) - v, _, err := runesUntilLiteral(t.sc, stop) - return v, err -} diff --git a/vendor/helm.sh/helm/v3/pkg/strvals/parser.go b/vendor/helm.sh/helm/v3/pkg/strvals/parser.go deleted file mode 100644 index 2828f20c..00000000 --- a/vendor/helm.sh/helm/v3/pkg/strvals/parser.go +++ /dev/null @@ -1,559 +0,0 @@ -/* -Copyright The Helm 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 strvals - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "strconv" - "strings" - "unicode" - - "github.com/pkg/errors" - "sigs.k8s.io/yaml" -) - -// ErrNotList indicates that a non-list was treated as a list. -var ErrNotList = errors.New("not a list") - -// MaxIndex is the maximum index that will be allowed by setIndex. -// The default value 65536 = 1024 * 64 -var MaxIndex = 65536 - -// MaxNestedNameLevel is the maximum level of nesting for a value name that -// will be allowed. -var MaxNestedNameLevel = 30 - -// ToYAML takes a string of arguments and converts to a YAML document. -func ToYAML(s string) (string, error) { - m, err := Parse(s) - if err != nil { - return "", err - } - d, err := yaml.Marshal(m) - return strings.TrimSuffix(string(d), "\n"), err -} - -// Parse parses a set line. -// -// A set line is of the form name1=value1,name2=value2 -func Parse(s string) (map[string]interface{}, error) { - vals := map[string]interface{}{} - scanner := bytes.NewBufferString(s) - t := newParser(scanner, vals, false) - err := t.parse() - return vals, err -} - -// ParseString parses a set line and forces a string value. -// -// A set line is of the form name1=value1,name2=value2 -func ParseString(s string) (map[string]interface{}, error) { - vals := map[string]interface{}{} - scanner := bytes.NewBufferString(s) - t := newParser(scanner, vals, true) - err := t.parse() - return vals, err -} - -// ParseInto parses a strvals line and merges the result into dest. -// -// If the strval string has a key that exists in dest, it overwrites the -// dest version. -func ParseInto(s string, dest map[string]interface{}) error { - scanner := bytes.NewBufferString(s) - t := newParser(scanner, dest, false) - return t.parse() -} - -// ParseFile parses a set line, but its final value is loaded from the file at the path specified by the original value. -// -// A set line is of the form name1=path1,name2=path2 -// -// When the files at path1 and path2 contained "val1" and "val2" respectively, the set line is consumed as -// name1=val1,name2=val2 -func ParseFile(s string, reader RunesValueReader) (map[string]interface{}, error) { - vals := map[string]interface{}{} - scanner := bytes.NewBufferString(s) - t := newFileParser(scanner, vals, reader) - err := t.parse() - return vals, err -} - -// ParseIntoString parses a strvals line and merges the result into dest. -// -// This method always returns a string as the value. -func ParseIntoString(s string, dest map[string]interface{}) error { - scanner := bytes.NewBufferString(s) - t := newParser(scanner, dest, true) - return t.parse() -} - -// ParseJSON parses a string with format key1=val1, key2=val2, ... -// where values are json strings (null, or scalars, or arrays, or objects). -// An empty val is treated as null. -// -// If a key exists in dest, the new value overwrites the dest version. -func ParseJSON(s string, dest map[string]interface{}) error { - scanner := bytes.NewBufferString(s) - t := newJSONParser(scanner, dest) - return t.parse() -} - -// ParseIntoFile parses a filevals line and merges the result into dest. -// -// This method always returns a string as the value. -func ParseIntoFile(s string, dest map[string]interface{}, reader RunesValueReader) error { - scanner := bytes.NewBufferString(s) - t := newFileParser(scanner, dest, reader) - return t.parse() -} - -// RunesValueReader is a function that takes the given value (a slice of runes) -// and returns the parsed value -type RunesValueReader func([]rune) (interface{}, error) - -// parser is a simple parser that takes a strvals line and parses it into a -// map representation. -// -// where sc is the source of the original data being parsed -// where data is the final parsed data from the parses with correct types -type parser struct { - sc *bytes.Buffer - data map[string]interface{} - reader RunesValueReader - isjsonval bool -} - -func newParser(sc *bytes.Buffer, data map[string]interface{}, stringBool bool) *parser { - stringConverter := func(rs []rune) (interface{}, error) { - return typedVal(rs, stringBool), nil - } - return &parser{sc: sc, data: data, reader: stringConverter} -} - -func newJSONParser(sc *bytes.Buffer, data map[string]interface{}) *parser { - return &parser{sc: sc, data: data, reader: nil, isjsonval: true} -} - -func newFileParser(sc *bytes.Buffer, data map[string]interface{}, reader RunesValueReader) *parser { - return &parser{sc: sc, data: data, reader: reader} -} - -func (t *parser) parse() error { - for { - err := t.key(t.data, 0) - if err == nil { - continue - } - if err == io.EOF { - return nil - } - return err - } -} - -func runeSet(r []rune) map[rune]bool { - s := make(map[rune]bool, len(r)) - for _, rr := range r { - s[rr] = true - } - return s -} - -func (t *parser) key(data map[string]interface{}, nestedNameLevel int) (reterr error) { - defer func() { - if r := recover(); r != nil { - reterr = fmt.Errorf("unable to parse key: %s", r) - } - }() - stop := runeSet([]rune{'=', '[', ',', '.'}) - for { - switch k, last, err := runesUntil(t.sc, stop); { - case err != nil: - if len(k) == 0 { - return err - } - return errors.Errorf("key %q has no value", string(k)) - //set(data, string(k), "") - //return err - case last == '[': - // We are in a list index context, so we need to set an index. - i, err := t.keyIndex() - if err != nil { - return errors.Wrap(err, "error parsing index") - } - kk := string(k) - // Find or create target list - list := []interface{}{} - if _, ok := data[kk]; ok { - list = data[kk].([]interface{}) - } - - // Now we need to get the value after the ]. - list, err = t.listItem(list, i, nestedNameLevel) - set(data, kk, list) - return err - case last == '=': - if t.isjsonval { - empval, err := t.emptyVal() - if err != nil { - return err - } - if empval { - set(data, string(k), nil) - return nil - } - // parse jsonvals by using Go’s JSON standard library - // Decode is preferred to Unmarshal in order to parse just the json parts of the list key1=jsonval1,key2=jsonval2,... - // Since Decode has its own buffer that consumes more characters (from underlying t.sc) than the ones actually decoded, - // we invoke Decode on a separate reader built with a copy of what is left in t.sc. After Decode is executed, we - // discard in t.sc the chars of the decoded json value (the number of those characters is returned by InputOffset). - var jsonval interface{} - dec := json.NewDecoder(strings.NewReader(t.sc.String())) - if err = dec.Decode(&jsonval); err != nil { - return err - } - set(data, string(k), jsonval) - if _, err = io.CopyN(io.Discard, t.sc, dec.InputOffset()); err != nil { - return err - } - // skip possible blanks and comma - _, err = t.emptyVal() - return err - } - //End of key. Consume =, Get value. - // FIXME: Get value list first - vl, e := t.valList() - switch e { - case nil: - set(data, string(k), vl) - return nil - case io.EOF: - set(data, string(k), "") - return e - case ErrNotList: - rs, e := t.val() - if e != nil && e != io.EOF { - return e - } - v, e := t.reader(rs) - set(data, string(k), v) - return e - default: - return e - } - case last == ',': - // No value given. Set the value to empty string. Return error. - set(data, string(k), "") - return errors.Errorf("key %q has no value (cannot end with ,)", string(k)) - case last == '.': - // Check value name is within the maximum nested name level - nestedNameLevel++ - if nestedNameLevel > MaxNestedNameLevel { - return fmt.Errorf("value name nested level is greater than maximum supported nested level of %d", MaxNestedNameLevel) - } - - // First, create or find the target map. - inner := map[string]interface{}{} - if _, ok := data[string(k)]; ok { - inner = data[string(k)].(map[string]interface{}) - } - - // Recurse - e := t.key(inner, nestedNameLevel) - if e == nil && len(inner) == 0 { - return errors.Errorf("key map %q has no value", string(k)) - } - if len(inner) != 0 { - set(data, string(k), inner) - } - return e - } - } -} - -func set(data map[string]interface{}, key string, val interface{}) { - // If key is empty, don't set it. - if len(key) == 0 { - return - } - data[key] = val -} - -func setIndex(list []interface{}, index int, val interface{}) (l2 []interface{}, err error) { - // There are possible index values that are out of range on a target system - // causing a panic. This will catch the panic and return an error instead. - // The value of the index that causes a panic varies from system to system. - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("error processing index %d: %s", index, r) - } - }() - - if index < 0 { - return list, fmt.Errorf("negative %d index not allowed", index) - } - if index > MaxIndex { - return list, fmt.Errorf("index of %d is greater than maximum supported index of %d", index, MaxIndex) - } - if len(list) <= index { - newlist := make([]interface{}, index+1) - copy(newlist, list) - list = newlist - } - list[index] = val - return list, nil -} - -func (t *parser) keyIndex() (int, error) { - // First, get the key. - stop := runeSet([]rune{']'}) - v, _, err := runesUntil(t.sc, stop) - if err != nil { - return 0, err - } - // v should be the index - return strconv.Atoi(string(v)) - -} -func (t *parser) listItem(list []interface{}, i, nestedNameLevel int) ([]interface{}, error) { - if i < 0 { - return list, fmt.Errorf("negative %d index not allowed", i) - } - stop := runeSet([]rune{'[', '.', '='}) - switch k, last, err := runesUntil(t.sc, stop); { - case len(k) > 0: - return list, errors.Errorf("unexpected data at end of array index: %q", k) - case err != nil: - return list, err - case last == '=': - if t.isjsonval { - empval, err := t.emptyVal() - if err != nil { - return list, err - } - if empval { - return setIndex(list, i, nil) - } - // parse jsonvals by using Go’s JSON standard library - // Decode is preferred to Unmarshal in order to parse just the json parts of the list key1=jsonval1,key2=jsonval2,... - // Since Decode has its own buffer that consumes more characters (from underlying t.sc) than the ones actually decoded, - // we invoke Decode on a separate reader built with a copy of what is left in t.sc. After Decode is executed, we - // discard in t.sc the chars of the decoded json value (the number of those characters is returned by InputOffset). - var jsonval interface{} - dec := json.NewDecoder(strings.NewReader(t.sc.String())) - if err = dec.Decode(&jsonval); err != nil { - return list, err - } - if list, err = setIndex(list, i, jsonval); err != nil { - return list, err - } - if _, err = io.CopyN(io.Discard, t.sc, dec.InputOffset()); err != nil { - return list, err - } - // skip possible blanks and comma - _, err = t.emptyVal() - return list, err - } - vl, e := t.valList() - switch e { - case nil: - return setIndex(list, i, vl) - case io.EOF: - return setIndex(list, i, "") - case ErrNotList: - rs, e := t.val() - if e != nil && e != io.EOF { - return list, e - } - v, e := t.reader(rs) - if e != nil { - return list, e - } - return setIndex(list, i, v) - default: - return list, e - } - case last == '[': - // now we have a nested list. Read the index and handle. - nextI, err := t.keyIndex() - if err != nil { - return list, errors.Wrap(err, "error parsing index") - } - var crtList []interface{} - if len(list) > i { - // If nested list already exists, take the value of list to next cycle. - existed := list[i] - if existed != nil { - crtList = list[i].([]interface{}) - } - } - // Now we need to get the value after the ]. - list2, err := t.listItem(crtList, nextI, nestedNameLevel) - if err != nil { - return list, err - } - return setIndex(list, i, list2) - case last == '.': - // We have a nested object. Send to t.key - inner := map[string]interface{}{} - if len(list) > i { - var ok bool - inner, ok = list[i].(map[string]interface{}) - if !ok { - // We have indices out of order. Initialize empty value. - list[i] = map[string]interface{}{} - inner = list[i].(map[string]interface{}) - } - } - - // Recurse - e := t.key(inner, nestedNameLevel) - if e != nil { - return list, e - } - return setIndex(list, i, inner) - default: - return nil, errors.Errorf("parse error: unexpected token %v", last) - } -} - -// check for an empty value -// read and consume optional spaces until comma or EOF (empty val) or any other char (not empty val) -// comma and spaces are consumed, while any other char is not cosumed -func (t *parser) emptyVal() (bool, error) { - for { - r, _, e := t.sc.ReadRune() - if e == io.EOF { - return true, nil - } - if e != nil { - return false, e - } - if r == ',' { - return true, nil - } - if !unicode.IsSpace(r) { - t.sc.UnreadRune() - return false, nil - } - } -} - -func (t *parser) val() ([]rune, error) { - stop := runeSet([]rune{','}) - v, _, err := runesUntil(t.sc, stop) - return v, err -} - -func (t *parser) valList() ([]interface{}, error) { - r, _, e := t.sc.ReadRune() - if e != nil { - return []interface{}{}, e - } - - if r != '{' { - t.sc.UnreadRune() - return []interface{}{}, ErrNotList - } - - list := []interface{}{} - stop := runeSet([]rune{',', '}'}) - for { - switch rs, last, err := runesUntil(t.sc, stop); { - case err != nil: - if err == io.EOF { - err = errors.New("list must terminate with '}'") - } - return list, err - case last == '}': - // If this is followed by ',', consume it. - if r, _, e := t.sc.ReadRune(); e == nil && r != ',' { - t.sc.UnreadRune() - } - v, e := t.reader(rs) - list = append(list, v) - return list, e - case last == ',': - v, e := t.reader(rs) - if e != nil { - return list, e - } - list = append(list, v) - } - } -} - -func runesUntil(in io.RuneReader, stop map[rune]bool) ([]rune, rune, error) { - v := []rune{} - for { - switch r, _, e := in.ReadRune(); { - case e != nil: - return v, r, e - case inMap(r, stop): - return v, r, nil - case r == '\\': - next, _, e := in.ReadRune() - if e != nil { - return v, next, e - } - v = append(v, next) - default: - v = append(v, r) - } - } -} - -func inMap(k rune, m map[rune]bool) bool { - _, ok := m[k] - return ok -} - -func typedVal(v []rune, st bool) interface{} { - val := string(v) - - if st { - return val - } - - if strings.EqualFold(val, "true") { - return true - } - - if strings.EqualFold(val, "false") { - return false - } - - if strings.EqualFold(val, "null") { - return nil - } - - if strings.EqualFold(val, "0") { - return int64(0) - } - - // If this value does not start with zero, try parsing it to an int - if len(val) != 0 && val[0] != '0' { - if iv, err := strconv.ParseInt(val, 10, 64); err == nil { - return iv - } - } - - return val -} diff --git a/vendor/kmodules.xyz/client-go/api/v1/cluster.go b/vendor/kmodules.xyz/client-go/api/v1/cluster.go index 77c999d6..046ba485 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/cluster.go +++ b/vendor/kmodules.xyz/client-go/api/v1/cluster.go @@ -49,15 +49,28 @@ type ClusterMetadata struct { Provider HostingProvider `json:"provider,omitempty" protobuf:"bytes,4,opt,name=provider,casttype=HostingProvider"` } +/* +ENUM( + + ACE = 1 + OCMHub = 2 + OCMMulticlusterControlplane = 4 + OCMSpoke = 8 + OpenShift = 16 + Rancher = 32 + VirtualCluster = 64 + +) +*/ type ClusterManager int const ( ClusterManagerACE ClusterManager = 1 << iota ClusterManagerOCMHub - ClusterManagerOCMSpoke ClusterManagerOCMMulticlusterControlplane - ClusterManagerRancher + ClusterManagerOCMSpoke ClusterManagerOpenShift + ClusterManagerRancher ClusterManagerVirtualCluster ) diff --git a/vendor/kmodules.xyz/client-go/api/v1/cluster_enum.go b/vendor/kmodules.xyz/client-go/api/v1/cluster_enum.go new file mode 100644 index 00000000..7f84b902 --- /dev/null +++ b/vendor/kmodules.xyz/client-go/api/v1/cluster_enum.go @@ -0,0 +1,84 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + "fmt" + "strings" +) + +var ErrInvalidClusterManager = fmt.Errorf("not a valid ClusterManager, try [%s]", strings.Join(_ClusterManagerNames, ", ")) + +const _ClusterManagerName = "ACEOCMHubOCMMulticlusterControlplaneOCMSpokeOpenShiftRancherVirtualCluster" + +var _ClusterManagerNames = []string{ + _ClusterManagerName[0:3], + _ClusterManagerName[3:9], + _ClusterManagerName[9:36], + _ClusterManagerName[36:44], + _ClusterManagerName[44:53], + _ClusterManagerName[53:60], + _ClusterManagerName[60:74], +} + +// ClusterManagerNames returns a list of possible string values of ClusterManager. +func ClusterManagerNames() []string { + tmp := make([]string, len(_ClusterManagerNames)) + copy(tmp, _ClusterManagerNames) + return tmp +} + +// ClusterManagerValues returns a list of the values for ClusterManager +func ClusterManagerValues() []ClusterManager { + return []ClusterManager{ + ClusterManagerACE, + ClusterManagerOCMHub, + ClusterManagerOCMMulticlusterControlplane, + ClusterManagerOCMSpoke, + ClusterManagerOpenShift, + ClusterManagerRancher, + ClusterManagerVirtualCluster, + } +} + +var _ClusterManagerMap = map[ClusterManager]string{ + ClusterManagerACE: _ClusterManagerName[0:3], + ClusterManagerOCMHub: _ClusterManagerName[3:9], + ClusterManagerOCMMulticlusterControlplane: _ClusterManagerName[9:36], + ClusterManagerOCMSpoke: _ClusterManagerName[36:44], + ClusterManagerOpenShift: _ClusterManagerName[44:53], + ClusterManagerRancher: _ClusterManagerName[53:60], + ClusterManagerVirtualCluster: _ClusterManagerName[60:74], +} + +var _ClusterManagerValue = map[string]ClusterManager{ + _ClusterManagerName[0:3]: ClusterManagerACE, + _ClusterManagerName[3:9]: ClusterManagerOCMHub, + _ClusterManagerName[9:36]: ClusterManagerOCMMulticlusterControlplane, + _ClusterManagerName[36:44]: ClusterManagerOCMSpoke, + _ClusterManagerName[44:53]: ClusterManagerOpenShift, + _ClusterManagerName[53:60]: ClusterManagerRancher, + _ClusterManagerName[60:74]: ClusterManagerVirtualCluster, +} + +// ParseClusterManager attempts to convert a string to a ClusterManager. +func ParseClusterManager(name string) (ClusterManager, error) { + if x, ok := _ClusterManagerValue[name]; ok { + return x, nil + } + return ClusterManager(0), fmt.Errorf("%s is %w", name, ErrInvalidClusterManager) +} diff --git a/vendor/kmodules.xyz/client-go/cluster/ace.go b/vendor/kmodules.xyz/client-go/cluster/ace.go deleted file mode 100644 index 678847fc..00000000 --- a/vendor/kmodules.xyz/client-go/cluster/ace.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "context" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -func IsACEManaged(kc client.Client) bool { - var list unstructured.UnstructuredList - list.SetAPIVersion("apps/v1") - list.SetKind("Deployment") - err := kc.List(context.TODO(), &list, client.InNamespace("kubeops"), client.MatchingLabels{ - "app.kubernetes.io/name": "kube-ui-server", - "app.kubernetes.io/instance": "kube-ui-server", - }) - if err != nil { - klog.Errorln(err) - } - return len(list.Items) > 0 -} diff --git a/vendor/kmodules.xyz/client-go/cluster/lib.go b/vendor/kmodules.xyz/client-go/cluster/lib.go deleted file mode 100644 index 74bd2e15..00000000 --- a/vendor/kmodules.xyz/client-go/cluster/lib.go +++ /dev/null @@ -1,160 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "context" - "errors" - - kmapi "kmodules.xyz/client-go/api/v1" - "kmodules.xyz/client-go/tools/clusterid" - - core "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -func ClusterUID(c client.Reader) (string, error) { - var ns core.Namespace - err := c.Get(context.TODO(), client.ObjectKey{Name: metav1.NamespaceSystem}, &ns) - if err != nil { - return "", err - } - return string(ns.UID), nil -} - -func ClusterMetadata(c client.Reader) (*kmapi.ClusterMetadata, error) { - var ns core.Namespace - err := c.Get(context.TODO(), client.ObjectKey{Name: metav1.NamespaceSystem}, &ns) - if err != nil { - return nil, err - } - return clusterid.ClusterMetadataForNamespace(&ns) -} - -func DetectCAPICluster(kc client.Client) (*kmapi.CAPIClusterInfo, error) { - var list unstructured.UnstructuredList - list.SetGroupVersionKind(schema.GroupVersionKind{ - Group: "cluster.x-k8s.io", - Version: "v1beta1", - Kind: "Cluster", - }) - err := kc.List(context.TODO(), &list) - if meta.IsNoMatchError(err) || len(list.Items) == 0 { - return nil, nil - } else if err != nil { - return nil, err - } else if len(list.Items) > 1 { - return nil, errors.New("multiple CAPI cluster object found") - } - - obj := list.Items[0].UnstructuredContent() - capiProvider, clusterName, ns, err := getCAPIValues(obj) - if err != nil { - return nil, err - } - - return &kmapi.CAPIClusterInfo{ - Provider: getProviderName(capiProvider), - Namespace: ns, - ClusterName: clusterName, - }, nil -} - -func getCAPIValues(values map[string]any) (string, string, string, error) { - capiProvider, ok, err := unstructured.NestedString(values, "spec", "infrastructureRef", "kind") - if err != nil { - return "", "", "", err - } else if !ok || capiProvider == "" { - return "", "", "", nil - } - - clusterName, ok, err := unstructured.NestedString(values, "metadata", "name") - if err != nil { - return "", "", "", err - } else if !ok || clusterName == "" { - return "", "", "", nil - } - - ns, ok, err := unstructured.NestedString(values, "metadata", "namespace") - if err != nil { - return "", "", "", err - } else if !ok || ns == "" { - return "", "", "", nil - } - - return capiProvider, clusterName, ns, nil -} - -func getProviderName(kind string) string { - switch kind { - case "AWSManagedCluster", "AWSManagedControlPlane": - return "capa" - case "AzureManagedCluster": - return "capz" - case "GCPManagedCluster": - return "capg" - } - return "" -} - -func DetectClusterManager(kc client.Client) kmapi.ClusterManager { - var result kmapi.ClusterManager - if IsACEManaged(kc) { - result |= kmapi.ClusterManagerACE - } - if IsOpenClusterHub(kc.RESTMapper()) { - result |= kmapi.ClusterManagerOCMHub - } - if IsOpenClusterSpoke(kc.RESTMapper()) { - result |= kmapi.ClusterManagerOCMSpoke - } - if IsOpenClusterMulticlusterControlplane(kc.RESTMapper()) { - result |= kmapi.ClusterManagerOCMMulticlusterControlplane - } - if IsRancherManaged(kc.RESTMapper()) { - result |= kmapi.ClusterManagerRancher - } - if IsOpenShiftManaged(kc.RESTMapper()) { - result |= kmapi.ClusterManagerOpenShift - } - if MustIsVirtualCluster(kc) { - result |= kmapi.ClusterManagerVirtualCluster - } - return result -} - -func IsDefault(kc client.Client, cm kmapi.ClusterManager, gvk schema.GroupVersionKind, key types.NamespacedName) (bool, error) { - if cm.ManagedByRancher() { - return IsInSystemProject(kc, key.Namespace) - } - return IsSingletonResource(kc, gvk, key) -} - -func IsSingletonResource(kc client.Client, gvk schema.GroupVersionKind, key types.NamespacedName) (bool, error) { - var list unstructured.UnstructuredList - list.SetGroupVersionKind(gvk) - err := kc.List(context.TODO(), &list, client.InNamespace(key.Namespace)) - if err != nil { - return false, err - } - return len(list.Items) == 1, nil -} diff --git a/vendor/kmodules.xyz/client-go/cluster/ocm.go b/vendor/kmodules.xyz/client-go/cluster/ocm.go deleted file mode 100644 index 71e6f088..00000000 --- a/vendor/kmodules.xyz/client-go/cluster/ocm.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func IsOpenClusterHub(mapper meta.RESTMapper) bool { - if _, err := mapper.RESTMappings(schema.GroupKind{ - Group: "cluster.open-cluster-management.io", - Kind: "ManagedCluster", - }); err == nil { - return true - } - return false -} - -func IsOpenClusterSpoke(mapper meta.RESTMapper) bool { - if _, err := mapper.RESTMappings(schema.GroupKind{ - Group: "work.open-cluster-management.io", - Kind: "AppliedManifestWork", - }); err == nil { - return true - } - return false -} - -func IsOpenClusterMulticlusterControlplane(mapper meta.RESTMapper) bool { - var missingDeployment bool - if _, err := mapper.RESTMappings(schema.GroupKind{ - Group: "apps", - Kind: "Deployment", - }); meta.IsNoMatchError(err) { - missingDeployment = true - } - return IsOpenClusterHub(mapper) && missingDeployment -} diff --git a/vendor/kmodules.xyz/client-go/cluster/openshift.go b/vendor/kmodules.xyz/client-go/cluster/openshift.go deleted file mode 100644 index 1aa49964..00000000 --- a/vendor/kmodules.xyz/client-go/cluster/openshift.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -func IsOpenShiftManaged(mapper meta.RESTMapper) bool { - if _, err := mapper.RESTMappings(schema.GroupKind{ - Group: "project.openshift.io", - Kind: "Project", - }); err == nil { - return true - } - return false -} diff --git a/vendor/kmodules.xyz/client-go/cluster/rancher.go b/vendor/kmodules.xyz/client-go/cluster/rancher.go deleted file mode 100644 index df2a7e69..00000000 --- a/vendor/kmodules.xyz/client-go/cluster/rancher.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "context" - "sort" - - core "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -const ( - LabelKeyRancherFieldProjectId = "field.cattle.io/projectId" - LabelKeyRancherHelmProjectId = "helm.cattle.io/projectId" - LabelKeyRancherHelmProjectOperated = "helm.cattle.io/helm-project-operated" - - NamespaceRancherMonitoring = "cattle-monitoring-system" - PrometheusRancherMonitoring = "rancher-monitoring-prometheus" -) - -func IsRancherManaged(mapper meta.RESTMapper) bool { - if _, err := mapper.RESTMappings(schema.GroupKind{ - Group: "management.cattle.io", - Kind: "Cluster", - }); err == nil { - return true - } - return false -} - -func IsInDefaultProject(kc client.Client, nsName string) (bool, error) { - return isInProject(kc, nsName, metav1.NamespaceDefault) -} - -func IsInSystemProject(kc client.Client, nsName string) (bool, error) { - return isInProject(kc, nsName, metav1.NamespaceSystem) -} - -func IsInUserProject(kc client.Client, nsName string) (bool, error) { - isDefault, err := IsInDefaultProject(kc, nsName) - if err != nil { - return false, err - } - isSys, err := IsInSystemProject(kc, nsName) - if err != nil { - return false, err - } - return !isDefault && !isSys, nil -} - -func isInProject(kc client.Client, nsName, seedNS string) (bool, error) { - if nsName == seedNS { - return true, nil - } - - var ns core.Namespace - err := kc.Get(context.TODO(), client.ObjectKey{Name: nsName}, &ns) - if err != nil { - return false, err - } - projectId, exists := ns.Labels[LabelKeyRancherFieldProjectId] - if !exists { - return false, nil - } - - seedProjectId, _, err := GetProjectId(kc, seedNS) - if err != nil { - return false, err - } - return projectId == seedProjectId, nil -} - -func GetDefaultProjectId(kc client.Client) (string, bool, error) { - return GetProjectId(kc, metav1.NamespaceDefault) -} - -func GetSystemProjectId(kc client.Client) (string, bool, error) { - return GetProjectId(kc, metav1.NamespaceSystem) -} - -func GetProjectId(kc client.Client, nsName string) (string, bool, error) { - var ns core.Namespace - err := kc.Get(context.TODO(), client.ObjectKey{Name: nsName}, &ns) - if err != nil { - return "", false, err - } - projectId, found := ns.Labels[LabelKeyRancherFieldProjectId] - return projectId, found, nil -} - -func ListSiblingNamespaces(kc client.Client, nsName string) ([]core.Namespace, error) { - projectId, found, err := GetProjectId(kc, nsName) - if err != nil || !found { - return nil, err - } - return ListProjectNamespaces(kc, projectId) -} - -func AreSiblingNamespaces(kc client.Client, ns1, ns2 string) (bool, error) { - if ns1 == ns2 { - return true, nil - } - - p1, found, err := GetProjectId(kc, ns1) - if err != nil || !found { - return false, err - } - p2, found, err := GetProjectId(kc, ns2) - if err != nil || !found { - return false, err - } - return p1 == p2, nil -} - -func ListProjectNamespaces(kc client.Client, projectId string) ([]core.Namespace, error) { - var list core.NamespaceList - err := kc.List(context.TODO(), &list, client.MatchingLabels{ - LabelKeyRancherFieldProjectId: projectId, - }) - if err != nil { - return nil, err - } - namespaces := list.Items - sort.Slice(namespaces, func(i, j int) bool { - return namespaces[i].Name < namespaces[j].Name - }) - return namespaces, nil -} - -func Names(in []core.Namespace) (ret []string) { - ret = make([]string, 0, len(in)) - for _, ns := range in { - ret = append(ret, ns.Name) - } - return -} diff --git a/vendor/kmodules.xyz/client-go/cluster/vcluster.go b/vendor/kmodules.xyz/client-go/cluster/vcluster.go deleted file mode 100644 index 0e132403..00000000 --- a/vendor/kmodules.xyz/client-go/cluster/vcluster.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cluster - -import ( - "context" - "strings" - - core "k8s.io/api/core/v1" - "sigs.k8s.io/controller-runtime/pkg/client" -) - -func IsVirtualCluster(kc client.Client) (bool, error) { - var list core.NodeList - err := kc.List(context.TODO(), &list) - if err != nil { - return false, err - } - for _, node := range list.Items { - _, f1 := node.Annotations["vcluster.loft.sh/managed-annotations"] - _, f2 := node.Annotations["vcluster.loft.sh/managed-labels"] - for _, addr := range node.Status.Addresses { - if addr.Type == core.NodeHostName { - if f1 && f2 && strings.HasSuffix(addr.Address, ".nodes.vcluster.com") { - return true, nil - } - } - } - } - return false, nil -} - -func MustIsVirtualCluster(kc client.Client) bool { - ok, _ := IsVirtualCluster(kc) - return ok -} diff --git a/vendor/kmodules.xyz/client-go/tools/clusterid/lib.go b/vendor/kmodules.xyz/client-go/tools/clusterid/lib.go deleted file mode 100644 index 0e29fe4d..00000000 --- a/vendor/kmodules.xyz/client-go/tools/clusterid/lib.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package clusterid - -import ( - "context" - "flag" - "fmt" - - kmapi "kmodules.xyz/client-go/api/v1" - - "github.com/spf13/pflag" - core "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - corev1 "k8s.io/client-go/kubernetes/typed/core/v1" -) - -var clusterName = "" - -func AddFlags(fs *pflag.FlagSet) { - fs.StringVar(&clusterName, "cluster-name", clusterName, "Name of cluster used in a multi-cluster setup") -} - -func AddGoFlags(fs *flag.FlagSet) { - fs.StringVar(&clusterName, "cluster-name", clusterName, "Name of cluster used in a multi-cluster setup") -} - -func ClusterName() string { - return clusterName -} - -func ClusterUID(client corev1.NamespaceInterface) (string, error) { - ns, err := client.Get(context.TODO(), metav1.NamespaceSystem, metav1.GetOptions{}) - if err != nil { - return "", err - } - return string(ns.UID), nil -} - -func ClusterMetadataForNamespace(ns *core.Namespace) (*kmapi.ClusterMetadata, error) { - if ns.Name != metav1.NamespaceSystem { - return nil, fmt.Errorf("expected namespace %s, found namespace %s", metav1.NamespaceSystem, ns.Name) - } - name := ns.Annotations[kmapi.ClusterNameKey] - if name == "" { - name = ClusterName() - } - obj := &kmapi.ClusterMetadata{ - UID: string(ns.UID), - Name: name, - DisplayName: ns.Annotations[kmapi.ClusterDisplayNameKey], - Provider: kmapi.HostingProvider(ns.Annotations[kmapi.ClusterProviderNameKey]), - } - return obj, nil -} - -func ClusterMetadata(client corev1.NamespaceInterface) (*kmapi.ClusterMetadata, error) { - ns, err := client.Get(context.TODO(), metav1.NamespaceSystem, metav1.GetOptions{}) - if err != nil { - return nil, err - } - return ClusterMetadataForNamespace(ns) -} diff --git a/vendor/kmodules.xyz/go-containerregistry/LICENSE b/vendor/kmodules.xyz/go-containerregistry/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/vendor/kmodules.xyz/go-containerregistry/LICENSE +++ /dev/null @@ -1,201 +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/kmodules.xyz/go-containerregistry/name/lib.go b/vendor/kmodules.xyz/go-containerregistry/name/lib.go deleted file mode 100644 index 334b5173..00000000 --- a/vendor/kmodules.xyz/go-containerregistry/name/lib.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package name - -import ( - "fmt" - "strings" - - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/crane" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" -) - -type Image struct { - Original string - Name string - Registry string - Repository string - Tag string - Digest string -} - -func parseReference(s string, extractTag bool, opts ...name.Option) (*Image, error) { - ref, err := name.ParseReference(s, opts...) - if err != nil { - return nil, err - } - - var img Image - switch u := ref.(type) { - case name.Tag: - img.Registry = u.RegistryStr() - img.Repository = u.RepositoryStr() - img.Tag = u.TagStr() - if extractTag { - img.Digest, err = crane.Digest(s, crane.WithAuthFromKeychain(authn.DefaultKeychain)) - if err != nil { - return nil, err - } - } else { - img.Digest = "" - } - img.Name = u.Name() - img.Original = u.String() - case name.Digest: - img.Registry = u.RegistryStr() - img.Repository = u.RepositoryStr() - if tag, err := name.NewTag( - strings.Split(s, "@")[0], // skip the digest - append(opts, name.WithDefaultTag(""))..., // don't use defaultTag "latest" - ); err == nil { - img.Tag = tag.TagStr() - } - img.Digest = u.DigestStr() - img.Name = u.Name() - img.Original = u.String() - default: - return nil, fmt.Errorf("unknown image %T", ref) - } - return &img, nil -} - -func ParseReference(s string, opts ...name.Option) (*Image, error) { - return parseReference(s, false, opts...) -} - -func ParseOrExtractDigest(s string, opts ...name.Option) (*Image, error) { - return parseReference(s, true, opts...) -} - -func IsPrivateImage(img string) (bool, error) { - reference, err := name.ParseReference(img) - if err != nil { - return false, err - } - - _, err = remote.Get(reference, remote.WithAuthFromKeychain(authn.DefaultKeychain)) - if err == nil { - return false, nil - } - if strings.Contains(err.Error(), "UNAUTHORIZED") { - return true, nil - } - if strings.Contains(err.Error(), "MANIFEST_UNKNOWN") { // If the image is kind loaded (not available online) - return true, nil - } - - return true, err -} diff --git a/vendor/kmodules.xyz/resource-metadata/LICENSE b/vendor/kmodules.xyz/resource-metadata/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/vendor/kmodules.xyz/resource-metadata/LICENSE +++ /dev/null @@ -1,201 +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/kmodules.xyz/resource-metadata/apis/shared/doc.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/doc.go deleted file mode 100644 index 9f088e3b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:openapi-gen=true -// +gencrdrefdocs:force=true -package shared // import "kmodules.xyz/resource-metadata/apis/shared" diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/helm.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/helm.go deleted file mode 100644 index e24be4b7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/helm.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package shared - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -type BootstrapPresets struct { - // +optional - OfflineInstaller bool `json:"offlineInstaller"` - Image ImageRegistrySpec `json:"image"` - Registry RegistryInfo `json:"registry"` - Helm HelmInfo `json:"helm"` -} - -type ImageRegistrySpec struct { - //+optional - Proxies RegistryProxies `json:"proxies"` -} - -type RegistryProxies struct { - // company/bin:1.23 - //+optional - DockerHub string `json:"dockerHub"` - // alpine, nginx etc. - //+optional - DockerLibrary string `json:"dockerLibrary"` - // ghcr.io - //+optional - GHCR string `json:"ghcr"` - // quay.io - //+optional - Quay string `json:"quay"` - // registry.k8s.io - //+optional - Kubernetes string `json:"kubernetes"` - // r.appscode.com - //+optional - AppsCode string `json:"appscode"` -} - -type RegistryInfo struct { - //+optional - Credentials map[string]string `json:"credentials"` -} - -type HelmInfo struct { - Repositories map[string]*HelmRepository `json:"repositories"` - Releases map[string]*HelmRelease `json:"releases"` -} - -type HelmRepository struct { - // URL of the Helm repository, a valid URL contains at least a protocol and - // host. - // +required - URL string `json:"url"` - - // SecretRef specifies the Secret containing authentication credentials - // for the HelmRepository. - // For HTTP/S basic auth the secret must contain 'username' and 'password' - // fields. - // For TLS the secret must contain a 'certFile' and 'keyFile', and/or - // 'caFile' fields. - // +optional - SecretName string `json:"secretName,omitempty"` - - // Interval at which to check the URL for updates. - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" - // +optional - Interval *metav1.Duration `json:"interval,omitempty"` - - // The timeout of index downloading, defaults to 60s. - // +optional - Timeout *metav1.Duration `json:"timeout,omitempty"` - - // Type of the HelmRepository. - // When this field is set to "oci", the URL field value must be prefixed with "oci://". - // +kubebuilder:validation:Enum=default;oci - // +optional - Type string `json:"type,omitempty"` - - // Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. - // This field is optional, and only taken into account if the .spec.type field is set to 'oci'. - // When not specified, defaults to 'generic'. - // +kubebuilder:validation:Enum=generic;aws;azure;gcp - // +kubebuilder:default:=generic - // +optional - Provider string `json:"provider,omitempty"` -} - -type HelmRelease struct { - Enabled bool `json:"enabled"` - Version string `json:"version"` - Values *runtime.RawExtension `json:"values,omitempty"` -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/helpers.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/helpers.go deleted file mode 100644 index 6a8475b5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/helpers.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package shared - -import ( - "bytes" - "fmt" - "strings" - "sync" - "text/template" - - kmapi "kmodules.xyz/client-go/api/v1" - "kmodules.xyz/go-containerregistry/name" - - "github.com/Masterminds/sprig/v3" - "github.com/pkg/errors" -) - -const ( - GraphQueryVarSource = "src" - GraphQueryVarTargetGroup = "targetGroup" - GraphQueryVarTargetKind = "targetKind" -) - -var pool = sync.Pool{ - New: func() interface{} { - return new(bytes.Buffer) - }, -} - -func (r ResourceLocator) GraphQuery(oid kmapi.OID) (string, map[string]interface{}, error) { - if r.Query.Type == GraphQLQuery { - vars := map[string]interface{}{ - GraphQueryVarSource: string(oid), - GraphQueryVarTargetGroup: r.Ref.Group, - GraphQueryVarTargetKind: r.Ref.Kind, - } - - if r.Query.Raw != "" { - return r.Query.Raw, vars, nil - } - return fmt.Sprintf(`query Find($src: String!, $targetGroup: String!, $targetKind: String!) { - find(oid: $src) { - refs: %s(group: $targetGroup, kind: $targetKind) { - namespace - name - } - } -}`, r.Query.ByLabel), vars, nil - } else if r.Query.Type == RESTQuery { - if r.Query.Raw == "" || !strings.Contains(r.Query.Raw, "{{") { - return r.Query.Raw, nil, nil - } - - tpl, err := template.New("").Funcs(sprig.TxtFuncMap()).Parse(r.Query.Raw) - if err != nil { - return "", nil, errors.Wrap(err, "failed to parse raw query") - } - // Do nothing and continue execution. - // If printed, the result of the index operation is the string "". - // We mitigate that later. - tpl.Option("missingkey=default") - - objID, err := kmapi.ObjectIDMap(oid) - if err != nil { - return "", nil, errors.Wrapf(err, "failed to parse oid=%s", oid) - } - - buf := pool.Get().(*bytes.Buffer) - defer pool.Put(buf) - buf.Reset() - - err = tpl.Execute(buf, objID) - if err != nil { - return "", nil, errors.Wrap(err, "failed to resolve template") - } - return buf.String(), nil, nil - } - return "", nil, fmt.Errorf("unknown query type %+v, oid %s", r, oid) -} - -func (r ImageRegistrySpec) DockerHubProxy() string { - addr := r.Proxies.DockerHub - addr = strings.TrimSpace(addr) - addr = strings.TrimSuffix(addr, "/") - return addr -} - -func (r ImageRegistrySpec) DockerLibraryProxy() string { - addr := r.Proxies.DockerLibrary - if addr == "" { - addr = r.Proxies.DockerHub - } - addr = strings.TrimSpace(addr) - addr = strings.TrimSuffix(addr, "/") - return addr -} - -func (r ImageRegistrySpec) GHCRProxy() string { - addr := r.Proxies.GHCR - addr = strings.TrimSpace(addr) - addr = strings.TrimSuffix(addr, "/") - return addr -} - -func (r ImageRegistrySpec) QuayProxy() string { - addr := r.Proxies.Quay - addr = strings.TrimSpace(addr) - addr = strings.TrimSuffix(addr, "/") - return addr -} - -func (r ImageRegistrySpec) KubernetesRegistryProxy() string { - addr := r.Proxies.Kubernetes - addr = strings.TrimSpace(addr) - addr = strings.TrimSuffix(addr, "/") - return addr -} - -func (r ImageRegistrySpec) AppsCodeRegistryProxy() string { - addr := r.Proxies.AppsCode - addr = strings.TrimSpace(addr) - addr = strings.TrimSuffix(addr, "/") - return addr -} - -const defaultTag = "latest" - -func NewRef(spec ImageRegistrySpec, img string) (string, error) { - ref, err := name.ParseReference(img) - if err != nil { - return "", err - } - - // https://github.com/kmodules/go-containerregistry/blob/master/name/lib_test.go - switch ref.Registry { - case "index.docker.io": - var result string - _, bin, found := strings.Cut(ref.Repository, "library/") - if found { - addr := spec.DockerLibraryProxy() - if addr != "" { - result = addr + "/" + bin - } else { - result = bin - } - } else { - addr := spec.DockerHubProxy() - if addr != "" { - result = addr + "/" + ref.Repository - } else { - result = ref.Repository - } - } - if ref.Tag != "" && ref.Tag != defaultTag { - result += ":" + ref.Tag - } - return result, nil - case "ghcr.io": - result := spec.GHCRProxy() + "/" + ref.Repository - if ref.Tag != "" && ref.Tag != defaultTag { - result += ":" + ref.Tag - } - return result, nil - case "quay.io": - result := spec.QuayProxy() + "/" + ref.Repository - if ref.Tag != "" && ref.Tag != defaultTag { - result += ":" + ref.Tag - } - return result, nil - case "registry.k8s.io": - result := spec.KubernetesRegistryProxy() + "/" + ref.Repository - if ref.Tag != "" && ref.Tag != defaultTag { - result += ":" + ref.Tag - } - return result, nil - case "r.appscode.com": - result := spec.AppsCodeRegistryProxy() + "/" + ref.Repository - if ref.Tag != "" && ref.Tag != defaultTag { - result += ":" + ref.Tag - } - return result, nil - } - return "", fmt.Errorf("registry not support for image %s", img) -} - -func MustNewRef(spec ImageRegistrySpec, img string) string { - out, err := NewRef(spec, img) - if err != nil { - panic(err) - } - return out -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go deleted file mode 100644 index 44748728..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go +++ /dev/null @@ -1,911 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -// This file was autogenerated by openapi-gen. Do not edit it manually! - -package shared - -import ( - common "k8s.io/kube-openapi/pkg/common" - spec "k8s.io/kube-openapi/pkg/validation/spec" -) - -func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { - return map[string]common.OpenAPIDefinition{ - "kmodules.xyz/resource-metadata/apis/shared.Action": schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionInfo": schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref), - "kmodules.xyz/resource-metadata/apis/shared.BootstrapPresets": schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref), - "kmodules.xyz/resource-metadata/apis/shared.Dashboard": schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref), - "kmodules.xyz/resource-metadata/apis/shared.DashboardVar": schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref), - "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters": schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref), - "kmodules.xyz/resource-metadata/apis/shared.HelmInfo": schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref), - "kmodules.xyz/resource-metadata/apis/shared.HelmRelease": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref), - "kmodules.xyz/resource-metadata/apis/shared.HelmRepository": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref), - "kmodules.xyz/resource-metadata/apis/shared.If": schema_kmodulesxyz_resource_metadata_apis_shared_If(ref), - "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec": schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref), - "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref), - "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref), - "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref), - "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref), - "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), - "kmodules.xyz/resource-metadata/apis/shared.UIParameterTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_UIParameterTemplate(ref), - "kmodules.xyz/resource-metadata/apis/shared.UIParameters": schema_kmodulesxyz_resource_metadata_apis_shared_UIParameters(ref), - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "operationId": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "flow": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "disabled": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - }, - Required: []string{"operationId", "flow", "disabled"}, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.Action"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.Action"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "operationId": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "flow": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "disabledTemplate": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "enforceQuota": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"operationId", "flow", "enforceQuota"}, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ActionTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "offlineInstaller": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec"), - }, - }, - "registry": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"), - }, - }, - "helm": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmInfo"), - }, - }, - }, - Required: []string{"image", "registry", "helm"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.HelmInfo", "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec", "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "title": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "vars": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.DashboardVar"), - }, - }, - }, - }, - }, - "panels": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "if": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.If"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.DashboardVar", "kmodules.xyz/resource-metadata/apis/shared.If"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "productID": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "planID": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "chart": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "repositories": { - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRepository"), - }, - }, - }, - }, - }, - "releases": { - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRelease"), - }, - }, - }, - }, - }, - }, - Required: []string{"repositories", "releases"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.HelmRelease", "kmodules.xyz/resource-metadata/apis/shared.HelmRepository"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "enabled": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"enabled", "version"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "url": { - SchemaProps: spec.SchemaProps{ - Description: "URL of the Helm repository, a valid URL contains at least a protocol and host.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef specifies the Secret containing authentication credentials for the HelmRepository. For HTTP/S basic auth the secret must contain 'username' and 'password' fields. For TLS the secret must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.", - Type: []string{"string"}, - Format: "", - }, - }, - "interval": { - SchemaProps: spec.SchemaProps{ - Description: "Interval at which to check the URL for updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "timeout": { - SchemaProps: spec.SchemaProps{ - Description: "The timeout of index downloading, defaults to 60s.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of the HelmRepository. When this field is set to \"oci\", the URL field value must be prefixed with \"oci://\".", - Type: []string{"string"}, - Format: "", - }, - }, - "provider": { - SchemaProps: spec.SchemaProps{ - Description: "Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. This field is optional, and only taken into account if the .spec.type field is set to 'oci'. When not specified, defaults to 'generic'.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"url"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "condition": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "connected": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceLocator"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "proxies": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "credentials": { - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "dockerHub": { - SchemaProps: spec.SchemaProps{ - Description: "company/bin:1.23", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "dockerLibrary": { - SchemaProps: spec.SchemaProps{ - Description: "alpine, nginx etc.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "ghcr": { - SchemaProps: spec.SchemaProps{ - Description: "ghcr.io", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "quay": { - SchemaProps: spec.SchemaProps{ - Description: "quay.io", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kubernetes": { - SchemaProps: spec.SchemaProps{ - Description: "registry.k8s.io", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "appscode": { - SchemaProps: spec.SchemaProps{ - Description: "r.appscode.com", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ref": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind"), - }, - }, - "query": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), - }, - }, - }, - Required: []string{"ref", "query"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind", "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "byLabel": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "raw": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type"}, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resource": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.ResourceID"), - }, - }, - "ref": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/client-go/api/v1.ResourceID"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_UIParameterTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "options": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "enforceQuota": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "actions": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup"), - }, - }, - }, - }, - }, - "instanceLabelPaths": { - SchemaProps: spec.SchemaProps{ - Description: "app.kubernetes.io/instance label must be updated at these paths when refilling metadata", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"enforceQuota"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup", "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_UIParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "options": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "actions": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ActionGroup"), - }, - }, - }, - }, - }, - "instanceLabelPaths": { - SchemaProps: spec.SchemaProps{ - Description: "app.kubernetes.io/instance label must be updated at these paths when refilling metadata", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ActionGroup", "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, - } -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/types.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/types.go deleted file mode 100644 index 930c6bf4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/types.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package shared - -import ( - kmapi "kmodules.xyz/client-go/api/v1" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - releasesapi "x-helm.dev/apimachinery/apis/releases/v1alpha1" - helmshared "x-helm.dev/apimachinery/apis/shared" -) - -type SourceLocator struct { - // +optional - Resource kmapi.ResourceID `json:"resource"` - // +optional - Ref kmapi.ObjectReference `json:"ref"` -} - -type DeploymentParameters struct { - ProductID string `json:"productID,omitempty"` - PlanID string `json:"planID,omitempty"` - Chart *releasesapi.ChartSourceRef `json:"chart,omitempty"` -} - -type ResourceLocator struct { - Ref metav1.GroupKind `json:"ref"` - Query ResourceQuery `json:"query"` -} - -// +kubebuilder:validation:Enum=REST;GraphQL -type QueryType string - -const ( - RESTQuery QueryType = "REST" - GraphQLQuery QueryType = "GraphQL" -) - -type ResourceQuery struct { - Type QueryType `json:"type"` - ByLabel kmapi.EdgeLabel `json:"byLabel,omitempty"` - Raw string `json:"raw,omitempty"` -} - -type UIParameters struct { - Options *releasesapi.ChartSourceRef `json:"options,omitempty"` - Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` - // +optional - Actions []*ActionGroup `json:"actions,omitempty"` - // app.kubernetes.io/instance label must be updated at these paths when refilling metadata - // +optional - InstanceLabelPaths []string `json:"instanceLabelPaths,omitempty"` -} - -type UIParameterTemplate struct { - Options *releasesapi.ChartSourceRef `json:"options,omitempty"` - Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` - EnforceQuota bool `json:"enforceQuota"` - // +optional - Actions []*ActionTemplateGroup `json:"actions,omitempty"` - // app.kubernetes.io/instance label must be updated at these paths when refilling metadata - // +optional - InstanceLabelPaths []string `json:"instanceLabelPaths,omitempty"` -} - -type ActionGroup struct { - ActionInfo `json:",inline,omitempty"` - Items []Action `json:"items"` -} - -type Action struct { - ActionInfo `json:",inline,omitempty"` - // +optional - Icons []helmshared.ImageSpec `json:"icons,omitempty"` - OperationID string `json:"operationId"` - Flow string `json:"flow"` - Disabled bool `json:"disabled"` - Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` -} - -// +kubebuilder:validation:Enum=Source;Target -type DashboardVarType string - -const ( - DashboardVarTypeSource DashboardVarType = "Source" - DashboardVarTypeTarget DashboardVarType = "Target" -) - -type DashboardVar struct { - Name string `json:"name"` - Value string `json:"value"` - // +optional - // +kubebuilder:default:=Source - Type DashboardVarType `json:"type,omitempty"` -} - -type Dashboard struct { - // +optional - Title string `json:"title,omitempty"` - // +optional - Vars []DashboardVar `json:"vars,omitempty"` - // +optional - Panels []string `json:"panels,omitempty"` - // +optional - If *If `json:"if,omitempty"` -} - -type If struct { - Condition string `json:"condition,omitempty"` - Connected *ResourceLocator `json:"connected,omitempty"` -} - -type ActionTemplateGroup struct { - ActionInfo `json:",inline,omitempty"` - Items []ActionTemplate `json:"items"` -} - -type ActionTemplate struct { - ActionInfo `json:",inline,omitempty"` - // +optional - Icons []helmshared.ImageSpec `json:"icons,omitempty"` - OperationID string `json:"operationId"` - Flow string `json:"flow"` - DisabledTemplate string `json:"disabledTemplate,omitempty"` - Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` - EnforceQuota bool `json:"enforceQuota"` -} - -type ActionInfo struct { - Name string `json:"name,omitempty"` - Description string `json:"description,omitempty"` -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/zz_generated.deepcopy.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/zz_generated.deepcopy.go deleted file mode 100644 index 39939a07..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/zz_generated.deepcopy.go +++ /dev/null @@ -1,540 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package shared - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - v1alpha1 "x-helm.dev/apimachinery/apis/releases/v1alpha1" - apisshared "x-helm.dev/apimachinery/apis/shared" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Action) DeepCopyInto(out *Action) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]apisshared.ImageSpec, len(*in)) - copy(*out, *in) - } - if in.Editor != nil { - in, out := &in.Editor, &out.Editor - *out = new(v1alpha1.ChartSourceRef) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action. -func (in *Action) DeepCopy() *Action { - if in == nil { - return nil - } - out := new(Action) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionGroup) DeepCopyInto(out *ActionGroup) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Action, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionGroup. -func (in *ActionGroup) DeepCopy() *ActionGroup { - if in == nil { - return nil - } - out := new(ActionGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionInfo) DeepCopyInto(out *ActionInfo) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionInfo. -func (in *ActionInfo) DeepCopy() *ActionInfo { - if in == nil { - return nil - } - out := new(ActionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionTemplate) DeepCopyInto(out *ActionTemplate) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]apisshared.ImageSpec, len(*in)) - copy(*out, *in) - } - if in.Editor != nil { - in, out := &in.Editor, &out.Editor - *out = new(v1alpha1.ChartSourceRef) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionTemplate. -func (in *ActionTemplate) DeepCopy() *ActionTemplate { - if in == nil { - return nil - } - out := new(ActionTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionTemplateGroup) DeepCopyInto(out *ActionTemplateGroup) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ActionTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionTemplateGroup. -func (in *ActionTemplateGroup) DeepCopy() *ActionTemplateGroup { - if in == nil { - return nil - } - out := new(ActionTemplateGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BootstrapPresets) DeepCopyInto(out *BootstrapPresets) { - *out = *in - out.Image = in.Image - in.Registry.DeepCopyInto(&out.Registry) - in.Helm.DeepCopyInto(&out.Helm) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootstrapPresets. -func (in *BootstrapPresets) DeepCopy() *BootstrapPresets { - if in == nil { - return nil - } - out := new(BootstrapPresets) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Dashboard) DeepCopyInto(out *Dashboard) { - *out = *in - if in.Vars != nil { - in, out := &in.Vars, &out.Vars - *out = make([]DashboardVar, len(*in)) - copy(*out, *in) - } - if in.Panels != nil { - in, out := &in.Panels, &out.Panels - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.If != nil { - in, out := &in.If, &out.If - *out = new(If) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dashboard. -func (in *Dashboard) DeepCopy() *Dashboard { - if in == nil { - return nil - } - out := new(Dashboard) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DashboardVar) DeepCopyInto(out *DashboardVar) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DashboardVar. -func (in *DashboardVar) DeepCopy() *DashboardVar { - if in == nil { - return nil - } - out := new(DashboardVar) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentParameters) DeepCopyInto(out *DeploymentParameters) { - *out = *in - if in.Chart != nil { - in, out := &in.Chart, &out.Chart - *out = new(v1alpha1.ChartSourceRef) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentParameters. -func (in *DeploymentParameters) DeepCopy() *DeploymentParameters { - if in == nil { - return nil - } - out := new(DeploymentParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmInfo) DeepCopyInto(out *HelmInfo) { - *out = *in - if in.Repositories != nil { - in, out := &in.Repositories, &out.Repositories - *out = make(map[string]*HelmRepository, len(*in)) - for key, val := range *in { - var outVal *HelmRepository - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(HelmRepository) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.Releases != nil { - in, out := &in.Releases, &out.Releases - *out = make(map[string]*HelmRelease, len(*in)) - for key, val := range *in { - var outVal *HelmRelease - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(HelmRelease) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmInfo. -func (in *HelmInfo) DeepCopy() *HelmInfo { - if in == nil { - return nil - } - out := new(HelmInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmRelease) DeepCopyInto(out *HelmRelease) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRelease. -func (in *HelmRelease) DeepCopy() *HelmRelease { - if in == nil { - return nil - } - out := new(HelmRelease) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmRepository) DeepCopyInto(out *HelmRepository) { - *out = *in - if in.Interval != nil { - in, out := &in.Interval, &out.Interval - *out = new(v1.Duration) - **out = **in - } - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepository. -func (in *HelmRepository) DeepCopy() *HelmRepository { - if in == nil { - return nil - } - out := new(HelmRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *If) DeepCopyInto(out *If) { - *out = *in - if in.Connected != nil { - in, out := &in.Connected, &out.Connected - *out = new(ResourceLocator) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new If. -func (in *If) DeepCopy() *If { - if in == nil { - return nil - } - out := new(If) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistrySpec) DeepCopyInto(out *ImageRegistrySpec) { - *out = *in - out.Proxies = in.Proxies - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistrySpec. -func (in *ImageRegistrySpec) DeepCopy() *ImageRegistrySpec { - if in == nil { - return nil - } - out := new(ImageRegistrySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegistryInfo) DeepCopyInto(out *RegistryInfo) { - *out = *in - if in.Credentials != nil { - in, out := &in.Credentials, &out.Credentials - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryInfo. -func (in *RegistryInfo) DeepCopy() *RegistryInfo { - if in == nil { - return nil - } - out := new(RegistryInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegistryProxies) DeepCopyInto(out *RegistryProxies) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryProxies. -func (in *RegistryProxies) DeepCopy() *RegistryProxies { - if in == nil { - return nil - } - out := new(RegistryProxies) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceLocator) DeepCopyInto(out *ResourceLocator) { - *out = *in - out.Ref = in.Ref - out.Query = in.Query - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceLocator. -func (in *ResourceLocator) DeepCopy() *ResourceLocator { - if in == nil { - return nil - } - out := new(ResourceLocator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuery) DeepCopyInto(out *ResourceQuery) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuery. -func (in *ResourceQuery) DeepCopy() *ResourceQuery { - if in == nil { - return nil - } - out := new(ResourceQuery) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceLocator) DeepCopyInto(out *SourceLocator) { - *out = *in - out.Resource = in.Resource - out.Ref = in.Ref - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceLocator. -func (in *SourceLocator) DeepCopy() *SourceLocator { - if in == nil { - return nil - } - out := new(SourceLocator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UIParameterTemplate) DeepCopyInto(out *UIParameterTemplate) { - *out = *in - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = new(v1alpha1.ChartSourceRef) - **out = **in - } - if in.Editor != nil { - in, out := &in.Editor, &out.Editor - *out = new(v1alpha1.ChartSourceRef) - **out = **in - } - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]*ActionTemplateGroup, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(ActionTemplateGroup) - (*in).DeepCopyInto(*out) - } - } - } - if in.InstanceLabelPaths != nil { - in, out := &in.InstanceLabelPaths, &out.InstanceLabelPaths - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UIParameterTemplate. -func (in *UIParameterTemplate) DeepCopy() *UIParameterTemplate { - if in == nil { - return nil - } - out := new(UIParameterTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UIParameters) DeepCopyInto(out *UIParameters) { - *out = *in - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = new(v1alpha1.ChartSourceRef) - **out = **in - } - if in.Editor != nil { - in, out := &in.Editor, &out.Editor - *out = new(v1alpha1.ChartSourceRef) - **out = **in - } - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]*ActionGroup, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(ActionGroup) - (*in).DeepCopyInto(*out) - } - } - } - if in.InstanceLabelPaths != nil { - in, out := &in.InstanceLabelPaths, &out.InstanceLabelPaths - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UIParameters. -func (in *UIParameters) DeepCopy() *UIParameters { - if in == nil { - return nil - } - out := new(UIParameters) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/constants.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/constants.go deleted file mode 100644 index d42050f5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/constants.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package ui - -const ( - LabelFeatureSet = "app.kubernetes.io/part-of" -) diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/doc.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/doc.go deleted file mode 100644 index 8f06b37f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package ui - -const ( - GroupName = "ui.k8s.appscode.com" -) diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/doc.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/doc.go deleted file mode 100644 index 8e7cf1df..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha1 is the v1alpha1 version of the API. - -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta -// +groupName=ui.k8s.appscode.com -package v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_helpers.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_helpers.go deleted file mode 100644 index 03bf7065..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_helpers.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "kmodules.xyz/client-go/apiextensions" - "kmodules.xyz/resource-metadata/apis/ui" - "kmodules.xyz/resource-metadata/crds" - - "k8s.io/apimachinery/pkg/labels" -) - -func (v Feature) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourceFeatures)) -} - -func (_ Feature) FormatLabels(featureSet string) labels.Selector { - return labels.SelectorFromSet(map[string]string{ - ui.LabelFeatureSet: featureSet, - }) -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go deleted file mode 100644 index e1892759..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go +++ /dev/null @@ -1,140 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - v1 "kmodules.xyz/client-go/api/v1" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - helmshared "x-helm.dev/apimachinery/apis/shared" -) - -const ( - ResourceKindFeature = "Feature" - ResourceFeature = "feature" - ResourceFeatures = "features" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=features,singular=feature,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Enabled",type="boolean",JSONPath=".status.enabled" -// +kubebuilder:printcolumn:name="Managed",type="boolean",JSONPath=".status.managed" -// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -type Feature struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec FeatureSpec `json:"spec,omitempty"` - Status FeatureStatus `json:"status,omitempty"` -} - -type FeatureSpec struct { - // Title specifies the title of this feature. - Title string `json:"title"` - // Description specifies a short description of the service this feature provides. - Description string `json:"description"` - // Icons is an optional list of icons for an application. Icon information includes the source, size, - // and mime type. These icons will be used in UI. - Icons []helmshared.ImageSpec `json:"icons,omitempty"` - // FeatureSet specifies the name of the FeatureSet where this feature belong to. - FeatureSet string `json:"featureSet"` - // FeatureBlock specifies the ui block name of this feature. - // +optional - FeatureBlock string `json:"featureBlock,omitempty"` - // Required specifies whether this feature is mandatory or not for enabling the respecting FeatureSet. - // +optional - Recommended bool `json:"recommended,omitempty"` - // Requirements specifies the requirements to enable this feature. - // +optional - Requirements Requirements `json:"requirements,omitempty"` - // ReadinessChecks specifies the conditions for this feature to be considered enabled. - // +optional - ReadinessChecks ReadinessChecks `json:"readinessChecks,omitempty"` - // Chart specifies the chart information that will be used by the FluxCD to install the respective feature - // +optional - Chart ChartInfo `json:"chart,omitempty"` - // Values holds the values for this Helm release. - // +optional - Values *apiextensionsv1.JSON `json:"values,omitempty"` -} - -type Requirements struct { - // Features specifies a list of Feature names that must be enabled for using this feature. - // +optional - Features []string `json:"features,omitempty"` -} - -type ReadinessChecks struct { - // Resources specifies the resources that should be registered to consider this feature as enabled. - // +optional - Resources []metav1.GroupVersionKind `json:"resources,omitempty"` - // Workloads specifies the workloads that should exist to consider this feature as enabled. - // +optional - Workloads []WorkloadInfo `json:"workloads,omitempty"` -} - -type WorkloadInfo struct { - metav1.GroupVersionKind `json:",inline"` - // Selector specifies label selector that should be used to select this workload - Selector map[string]string `json:"selector"` -} - -type ChartInfo struct { - // Name specifies the name of the chart - Name string `json:"name"` - // Namespace where the respective feature resources will be deployed. - // +optional - Namespace string `json:"namespace,omitempty"` - // Version specifies the version of the chart. - // +optional - Version string `json:"version,omitempty"` - // SourceRef specifies the source of the chart - SourceRef v1.TypedObjectReference `json:"sourceRef"` -} - -type FeatureStatus struct { - // Enabled specifies whether this feature is enabled or not. - // +optional - Enabled *bool `json:"enabled,omitempty"` - // Managed specifies whether this feature is managed by AppsCode Inc. or not. - // +optional - Managed *bool `json:"managed,omitempty"` - // Ready specifies whether this feature is ready to user or not. This field will be present only for the - // features that are managed by AppsCode Inc. - // +optional - Ready *bool `json:"ready,omitempty"` - // Note specifies the respective reason if the feature does not meet the requirements or is not ready. - // +optional - Note string `json:"note,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true - -type FeatureList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Feature `json:"items,omitempty"` -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/featureset_helpers.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/featureset_helpers.go deleted file mode 100644 index ab402656..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/featureset_helpers.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "kmodules.xyz/client-go/apiextensions" - "kmodules.xyz/resource-metadata/crds" -) - -const ( - UIServerCleanupFinalizer = "ui-server.kubeops.dev/cleanup" -) - -func (v FeatureSet) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourceFeatureSets)) -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/featureset_types.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/featureset_types.go deleted file mode 100644 index 76269e94..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/featureset_types.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - releasesapi "x-helm.dev/apimachinery/apis/releases/v1alpha1" - helmshared "x-helm.dev/apimachinery/apis/shared" -) - -const ( - ResourceKindFeatureSet = "FeatureSet" - ResourceFeatureSet = "featureset" - ResourceFeatureSets = "featuresets" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=featuresets,singular=featureset,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Required",type="boolean",JSONPath=".spec.required" -// +kubebuilder:printcolumn:name="Enabled",type="boolean",JSONPath=".status.enabled" -// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -type FeatureSet struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec FeatureSetSpec `json:"spec,omitempty"` - Status FeatureSetStatus `json:"status,omitempty"` -} - -type FeatureSetSpec struct { - // Title specify the title of this feature set. - Title string `json:"title"` - // Description specifies a short description of the services this feature set provides. - Description string `json:"description"` - // Icons is an optional list of icons for an application. Icon information includes the source, size, - // and mime type. These icons will be used in UI. - Icons []helmshared.ImageSpec `json:"icons,omitempty"` - // Required specify whether this feature set is mandatory or not for using the UI. - // +optional - Recommended bool `json:"recommended,omitempty"` - // RequiredFeatures specifies list of features that are necessary to consider this feature set as ready. - // +optional - RequiredFeatures []string `json:"requiredFeatures,omitempty"` - // Chart specifies the chart that contains the respective resources for component features and the UI wizard. - Chart releasesapi.ChartSourceRef `json:"chart"` -} - -type FeatureSetStatus struct { - // Enabled specifies whether this feature set is enabled or not. - // +optional - Enabled *bool `json:"enabled,omitempty"` - // Ready specifies whether this feature set is ready not. - // +optional - Ready *bool `json:"ready,omitempty"` - // Features specifies the status of the component features that belong to this feature set. - // +optional - Features []ComponentStatus `json:"features,omitempty"` - // Dependents specifies the feature sets which depend on this FeatureSet - // +optional - Dependents Dependents `json:"dependents,omitempty"` - // Note specifies the respective reason if the feature set is considered as disabled. - // +optional - Note string `json:"note,omitempty"` -} - -type ComponentStatus struct { - // Name specify the name of the component feature. - Name string `json:"name"` - // Enabled specifies whether the component feature has been enabled or not. - // +optional - Enabled *bool `json:"enabled,omitempty"` - // Ready specifies whether the component feature is ready or not. - // +optional - Ready *bool `json:"ready,omitempty"` - // Managed specifies whether the component is managed by platform or not. - // +optional - Managed *bool `json:"managed,omitempty"` -} - -type Dependents struct { - // FeatureSets specifies a list of FeatureSet names that depend on this FeatureSet - // +optional - FeatureSets []DependentFeatureSet `json:"featureSets,omitempty"` -} - -type DependentFeatureSet struct { - // Name specifies the name of the dependent FeatureSet - Name string `json:"name,omitempty"` - // Features specifies the Feature names of the dependent FeatureSet - Features []string `json:"features,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true - -type FeatureSetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []FeatureSet `json:"items,omitempty"` -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go deleted file mode 100644 index 926f6866..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go +++ /dev/null @@ -1,17463 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -// This file was autogenerated by openapi-gen. Do not edit it manually! - -package v1alpha1 - -import ( - resource "k8s.io/apimachinery/pkg/api/resource" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - intstr "k8s.io/apimachinery/pkg/util/intstr" - common "k8s.io/kube-openapi/pkg/common" - spec "k8s.io/kube-openapi/pkg/validation/spec" -) - -func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { - return map[string]common.OpenAPIDefinition{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource": schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref), - "k8s.io/api/core/v1.Affinity": schema_k8sio_api_core_v1_Affinity(ref), - "k8s.io/api/core/v1.AttachedVolume": schema_k8sio_api_core_v1_AttachedVolume(ref), - "k8s.io/api/core/v1.AvoidPods": schema_k8sio_api_core_v1_AvoidPods(ref), - "k8s.io/api/core/v1.AzureDiskVolumeSource": schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref), - "k8s.io/api/core/v1.AzureFilePersistentVolumeSource": schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref), - "k8s.io/api/core/v1.AzureFileVolumeSource": schema_k8sio_api_core_v1_AzureFileVolumeSource(ref), - "k8s.io/api/core/v1.Binding": schema_k8sio_api_core_v1_Binding(ref), - "k8s.io/api/core/v1.CSIPersistentVolumeSource": schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CSIVolumeSource": schema_k8sio_api_core_v1_CSIVolumeSource(ref), - "k8s.io/api/core/v1.Capabilities": schema_k8sio_api_core_v1_Capabilities(ref), - "k8s.io/api/core/v1.CephFSPersistentVolumeSource": schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CephFSVolumeSource": schema_k8sio_api_core_v1_CephFSVolumeSource(ref), - "k8s.io/api/core/v1.CinderPersistentVolumeSource": schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref), - "k8s.io/api/core/v1.CinderVolumeSource": schema_k8sio_api_core_v1_CinderVolumeSource(ref), - "k8s.io/api/core/v1.ClaimSource": schema_k8sio_api_core_v1_ClaimSource(ref), - "k8s.io/api/core/v1.ClientIPConfig": schema_k8sio_api_core_v1_ClientIPConfig(ref), - "k8s.io/api/core/v1.ClusterTrustBundleProjection": schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref), - "k8s.io/api/core/v1.ComponentCondition": schema_k8sio_api_core_v1_ComponentCondition(ref), - "k8s.io/api/core/v1.ComponentStatus": schema_k8sio_api_core_v1_ComponentStatus(ref), - "k8s.io/api/core/v1.ComponentStatusList": schema_k8sio_api_core_v1_ComponentStatusList(ref), - "k8s.io/api/core/v1.ConfigMap": schema_k8sio_api_core_v1_ConfigMap(ref), - "k8s.io/api/core/v1.ConfigMapEnvSource": schema_k8sio_api_core_v1_ConfigMapEnvSource(ref), - "k8s.io/api/core/v1.ConfigMapKeySelector": schema_k8sio_api_core_v1_ConfigMapKeySelector(ref), - "k8s.io/api/core/v1.ConfigMapList": schema_k8sio_api_core_v1_ConfigMapList(ref), - "k8s.io/api/core/v1.ConfigMapNodeConfigSource": schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref), - "k8s.io/api/core/v1.ConfigMapProjection": schema_k8sio_api_core_v1_ConfigMapProjection(ref), - "k8s.io/api/core/v1.ConfigMapVolumeSource": schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref), - "k8s.io/api/core/v1.Container": schema_k8sio_api_core_v1_Container(ref), - "k8s.io/api/core/v1.ContainerImage": schema_k8sio_api_core_v1_ContainerImage(ref), - "k8s.io/api/core/v1.ContainerPort": schema_k8sio_api_core_v1_ContainerPort(ref), - "k8s.io/api/core/v1.ContainerResizePolicy": schema_k8sio_api_core_v1_ContainerResizePolicy(ref), - "k8s.io/api/core/v1.ContainerState": schema_k8sio_api_core_v1_ContainerState(ref), - "k8s.io/api/core/v1.ContainerStateRunning": schema_k8sio_api_core_v1_ContainerStateRunning(ref), - "k8s.io/api/core/v1.ContainerStateTerminated": schema_k8sio_api_core_v1_ContainerStateTerminated(ref), - "k8s.io/api/core/v1.ContainerStateWaiting": schema_k8sio_api_core_v1_ContainerStateWaiting(ref), - "k8s.io/api/core/v1.ContainerStatus": schema_k8sio_api_core_v1_ContainerStatus(ref), - "k8s.io/api/core/v1.DaemonEndpoint": schema_k8sio_api_core_v1_DaemonEndpoint(ref), - "k8s.io/api/core/v1.DownwardAPIProjection": schema_k8sio_api_core_v1_DownwardAPIProjection(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeFile": schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref), - "k8s.io/api/core/v1.DownwardAPIVolumeSource": schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref), - "k8s.io/api/core/v1.EmptyDirVolumeSource": schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref), - "k8s.io/api/core/v1.EndpointAddress": schema_k8sio_api_core_v1_EndpointAddress(ref), - "k8s.io/api/core/v1.EndpointPort": schema_k8sio_api_core_v1_EndpointPort(ref), - "k8s.io/api/core/v1.EndpointSubset": schema_k8sio_api_core_v1_EndpointSubset(ref), - "k8s.io/api/core/v1.Endpoints": schema_k8sio_api_core_v1_Endpoints(ref), - "k8s.io/api/core/v1.EndpointsList": schema_k8sio_api_core_v1_EndpointsList(ref), - "k8s.io/api/core/v1.EnvFromSource": schema_k8sio_api_core_v1_EnvFromSource(ref), - "k8s.io/api/core/v1.EnvVar": schema_k8sio_api_core_v1_EnvVar(ref), - "k8s.io/api/core/v1.EnvVarSource": schema_k8sio_api_core_v1_EnvVarSource(ref), - "k8s.io/api/core/v1.EphemeralContainer": schema_k8sio_api_core_v1_EphemeralContainer(ref), - "k8s.io/api/core/v1.EphemeralContainerCommon": schema_k8sio_api_core_v1_EphemeralContainerCommon(ref), - "k8s.io/api/core/v1.EphemeralVolumeSource": schema_k8sio_api_core_v1_EphemeralVolumeSource(ref), - "k8s.io/api/core/v1.Event": schema_k8sio_api_core_v1_Event(ref), - "k8s.io/api/core/v1.EventList": schema_k8sio_api_core_v1_EventList(ref), - "k8s.io/api/core/v1.EventSeries": schema_k8sio_api_core_v1_EventSeries(ref), - "k8s.io/api/core/v1.EventSource": schema_k8sio_api_core_v1_EventSource(ref), - "k8s.io/api/core/v1.ExecAction": schema_k8sio_api_core_v1_ExecAction(ref), - "k8s.io/api/core/v1.FCVolumeSource": schema_k8sio_api_core_v1_FCVolumeSource(ref), - "k8s.io/api/core/v1.FlexPersistentVolumeSource": schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref), - "k8s.io/api/core/v1.FlexVolumeSource": schema_k8sio_api_core_v1_FlexVolumeSource(ref), - "k8s.io/api/core/v1.FlockerVolumeSource": schema_k8sio_api_core_v1_FlockerVolumeSource(ref), - "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource": schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.GRPCAction": schema_k8sio_api_core_v1_GRPCAction(ref), - "k8s.io/api/core/v1.GitRepoVolumeSource": schema_k8sio_api_core_v1_GitRepoVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource": schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref), - "k8s.io/api/core/v1.GlusterfsVolumeSource": schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref), - "k8s.io/api/core/v1.HTTPGetAction": schema_k8sio_api_core_v1_HTTPGetAction(ref), - "k8s.io/api/core/v1.HTTPHeader": schema_k8sio_api_core_v1_HTTPHeader(ref), - "k8s.io/api/core/v1.HostAlias": schema_k8sio_api_core_v1_HostAlias(ref), - "k8s.io/api/core/v1.HostIP": schema_k8sio_api_core_v1_HostIP(ref), - "k8s.io/api/core/v1.HostPathVolumeSource": schema_k8sio_api_core_v1_HostPathVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIPersistentVolumeSource": schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ISCSIVolumeSource": schema_k8sio_api_core_v1_ISCSIVolumeSource(ref), - "k8s.io/api/core/v1.KeyToPath": schema_k8sio_api_core_v1_KeyToPath(ref), - "k8s.io/api/core/v1.Lifecycle": schema_k8sio_api_core_v1_Lifecycle(ref), - "k8s.io/api/core/v1.LifecycleHandler": schema_k8sio_api_core_v1_LifecycleHandler(ref), - "k8s.io/api/core/v1.LimitRange": schema_k8sio_api_core_v1_LimitRange(ref), - "k8s.io/api/core/v1.LimitRangeItem": schema_k8sio_api_core_v1_LimitRangeItem(ref), - "k8s.io/api/core/v1.LimitRangeList": schema_k8sio_api_core_v1_LimitRangeList(ref), - "k8s.io/api/core/v1.LimitRangeSpec": schema_k8sio_api_core_v1_LimitRangeSpec(ref), - "k8s.io/api/core/v1.List": schema_k8sio_api_core_v1_List(ref), - "k8s.io/api/core/v1.LoadBalancerIngress": schema_k8sio_api_core_v1_LoadBalancerIngress(ref), - "k8s.io/api/core/v1.LoadBalancerStatus": schema_k8sio_api_core_v1_LoadBalancerStatus(ref), - "k8s.io/api/core/v1.LocalObjectReference": schema_k8sio_api_core_v1_LocalObjectReference(ref), - "k8s.io/api/core/v1.LocalVolumeSource": schema_k8sio_api_core_v1_LocalVolumeSource(ref), - "k8s.io/api/core/v1.ModifyVolumeStatus": schema_k8sio_api_core_v1_ModifyVolumeStatus(ref), - "k8s.io/api/core/v1.NFSVolumeSource": schema_k8sio_api_core_v1_NFSVolumeSource(ref), - "k8s.io/api/core/v1.Namespace": schema_k8sio_api_core_v1_Namespace(ref), - "k8s.io/api/core/v1.NamespaceCondition": schema_k8sio_api_core_v1_NamespaceCondition(ref), - "k8s.io/api/core/v1.NamespaceList": schema_k8sio_api_core_v1_NamespaceList(ref), - "k8s.io/api/core/v1.NamespaceSpec": schema_k8sio_api_core_v1_NamespaceSpec(ref), - "k8s.io/api/core/v1.NamespaceStatus": schema_k8sio_api_core_v1_NamespaceStatus(ref), - "k8s.io/api/core/v1.Node": schema_k8sio_api_core_v1_Node(ref), - "k8s.io/api/core/v1.NodeAddress": schema_k8sio_api_core_v1_NodeAddress(ref), - "k8s.io/api/core/v1.NodeAffinity": schema_k8sio_api_core_v1_NodeAffinity(ref), - "k8s.io/api/core/v1.NodeCondition": schema_k8sio_api_core_v1_NodeCondition(ref), - "k8s.io/api/core/v1.NodeConfigSource": schema_k8sio_api_core_v1_NodeConfigSource(ref), - "k8s.io/api/core/v1.NodeConfigStatus": schema_k8sio_api_core_v1_NodeConfigStatus(ref), - "k8s.io/api/core/v1.NodeDaemonEndpoints": schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref), - "k8s.io/api/core/v1.NodeList": schema_k8sio_api_core_v1_NodeList(ref), - "k8s.io/api/core/v1.NodeProxyOptions": schema_k8sio_api_core_v1_NodeProxyOptions(ref), - "k8s.io/api/core/v1.NodeResources": schema_k8sio_api_core_v1_NodeResources(ref), - "k8s.io/api/core/v1.NodeSelector": schema_k8sio_api_core_v1_NodeSelector(ref), - "k8s.io/api/core/v1.NodeSelectorRequirement": schema_k8sio_api_core_v1_NodeSelectorRequirement(ref), - "k8s.io/api/core/v1.NodeSelectorTerm": schema_k8sio_api_core_v1_NodeSelectorTerm(ref), - "k8s.io/api/core/v1.NodeSpec": schema_k8sio_api_core_v1_NodeSpec(ref), - "k8s.io/api/core/v1.NodeStatus": schema_k8sio_api_core_v1_NodeStatus(ref), - "k8s.io/api/core/v1.NodeSystemInfo": schema_k8sio_api_core_v1_NodeSystemInfo(ref), - "k8s.io/api/core/v1.ObjectFieldSelector": schema_k8sio_api_core_v1_ObjectFieldSelector(ref), - "k8s.io/api/core/v1.ObjectReference": schema_k8sio_api_core_v1_ObjectReference(ref), - "k8s.io/api/core/v1.PersistentVolume": schema_k8sio_api_core_v1_PersistentVolume(ref), - "k8s.io/api/core/v1.PersistentVolumeClaim": schema_k8sio_api_core_v1_PersistentVolumeClaim(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimCondition": schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimList": schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimSpec": schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimStatus": schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate": schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref), - "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeList": schema_k8sio_api_core_v1_PersistentVolumeList(ref), - "k8s.io/api/core/v1.PersistentVolumeSource": schema_k8sio_api_core_v1_PersistentVolumeSource(ref), - "k8s.io/api/core/v1.PersistentVolumeSpec": schema_k8sio_api_core_v1_PersistentVolumeSpec(ref), - "k8s.io/api/core/v1.PersistentVolumeStatus": schema_k8sio_api_core_v1_PersistentVolumeStatus(ref), - "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource": schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref), - "k8s.io/api/core/v1.Pod": schema_k8sio_api_core_v1_Pod(ref), - "k8s.io/api/core/v1.PodAffinity": schema_k8sio_api_core_v1_PodAffinity(ref), - "k8s.io/api/core/v1.PodAffinityTerm": schema_k8sio_api_core_v1_PodAffinityTerm(ref), - "k8s.io/api/core/v1.PodAntiAffinity": schema_k8sio_api_core_v1_PodAntiAffinity(ref), - "k8s.io/api/core/v1.PodAttachOptions": schema_k8sio_api_core_v1_PodAttachOptions(ref), - "k8s.io/api/core/v1.PodCondition": schema_k8sio_api_core_v1_PodCondition(ref), - "k8s.io/api/core/v1.PodDNSConfig": schema_k8sio_api_core_v1_PodDNSConfig(ref), - "k8s.io/api/core/v1.PodDNSConfigOption": schema_k8sio_api_core_v1_PodDNSConfigOption(ref), - "k8s.io/api/core/v1.PodExecOptions": schema_k8sio_api_core_v1_PodExecOptions(ref), - "k8s.io/api/core/v1.PodIP": schema_k8sio_api_core_v1_PodIP(ref), - "k8s.io/api/core/v1.PodList": schema_k8sio_api_core_v1_PodList(ref), - "k8s.io/api/core/v1.PodLogOptions": schema_k8sio_api_core_v1_PodLogOptions(ref), - "k8s.io/api/core/v1.PodOS": schema_k8sio_api_core_v1_PodOS(ref), - "k8s.io/api/core/v1.PodPortForwardOptions": schema_k8sio_api_core_v1_PodPortForwardOptions(ref), - "k8s.io/api/core/v1.PodProxyOptions": schema_k8sio_api_core_v1_PodProxyOptions(ref), - "k8s.io/api/core/v1.PodReadinessGate": schema_k8sio_api_core_v1_PodReadinessGate(ref), - "k8s.io/api/core/v1.PodResourceClaim": schema_k8sio_api_core_v1_PodResourceClaim(ref), - "k8s.io/api/core/v1.PodResourceClaimStatus": schema_k8sio_api_core_v1_PodResourceClaimStatus(ref), - "k8s.io/api/core/v1.PodSchedulingGate": schema_k8sio_api_core_v1_PodSchedulingGate(ref), - "k8s.io/api/core/v1.PodSecurityContext": schema_k8sio_api_core_v1_PodSecurityContext(ref), - "k8s.io/api/core/v1.PodSignature": schema_k8sio_api_core_v1_PodSignature(ref), - "k8s.io/api/core/v1.PodSpec": schema_k8sio_api_core_v1_PodSpec(ref), - "k8s.io/api/core/v1.PodStatus": schema_k8sio_api_core_v1_PodStatus(ref), - "k8s.io/api/core/v1.PodStatusResult": schema_k8sio_api_core_v1_PodStatusResult(ref), - "k8s.io/api/core/v1.PodTemplate": schema_k8sio_api_core_v1_PodTemplate(ref), - "k8s.io/api/core/v1.PodTemplateList": schema_k8sio_api_core_v1_PodTemplateList(ref), - "k8s.io/api/core/v1.PodTemplateSpec": schema_k8sio_api_core_v1_PodTemplateSpec(ref), - "k8s.io/api/core/v1.PortStatus": schema_k8sio_api_core_v1_PortStatus(ref), - "k8s.io/api/core/v1.PortworxVolumeSource": schema_k8sio_api_core_v1_PortworxVolumeSource(ref), - "k8s.io/api/core/v1.PreferAvoidPodsEntry": schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref), - "k8s.io/api/core/v1.PreferredSchedulingTerm": schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref), - "k8s.io/api/core/v1.Probe": schema_k8sio_api_core_v1_Probe(ref), - "k8s.io/api/core/v1.ProbeHandler": schema_k8sio_api_core_v1_ProbeHandler(ref), - "k8s.io/api/core/v1.ProjectedVolumeSource": schema_k8sio_api_core_v1_ProjectedVolumeSource(ref), - "k8s.io/api/core/v1.QuobyteVolumeSource": schema_k8sio_api_core_v1_QuobyteVolumeSource(ref), - "k8s.io/api/core/v1.RBDPersistentVolumeSource": schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref), - "k8s.io/api/core/v1.RBDVolumeSource": schema_k8sio_api_core_v1_RBDVolumeSource(ref), - "k8s.io/api/core/v1.RangeAllocation": schema_k8sio_api_core_v1_RangeAllocation(ref), - "k8s.io/api/core/v1.ReplicationController": schema_k8sio_api_core_v1_ReplicationController(ref), - "k8s.io/api/core/v1.ReplicationControllerCondition": schema_k8sio_api_core_v1_ReplicationControllerCondition(ref), - "k8s.io/api/core/v1.ReplicationControllerList": schema_k8sio_api_core_v1_ReplicationControllerList(ref), - "k8s.io/api/core/v1.ReplicationControllerSpec": schema_k8sio_api_core_v1_ReplicationControllerSpec(ref), - "k8s.io/api/core/v1.ReplicationControllerStatus": schema_k8sio_api_core_v1_ReplicationControllerStatus(ref), - "k8s.io/api/core/v1.ResourceClaim": schema_k8sio_api_core_v1_ResourceClaim(ref), - "k8s.io/api/core/v1.ResourceFieldSelector": schema_k8sio_api_core_v1_ResourceFieldSelector(ref), - "k8s.io/api/core/v1.ResourceQuota": schema_k8sio_api_core_v1_ResourceQuota(ref), - "k8s.io/api/core/v1.ResourceQuotaList": schema_k8sio_api_core_v1_ResourceQuotaList(ref), - "k8s.io/api/core/v1.ResourceQuotaSpec": schema_k8sio_api_core_v1_ResourceQuotaSpec(ref), - "k8s.io/api/core/v1.ResourceQuotaStatus": schema_k8sio_api_core_v1_ResourceQuotaStatus(ref), - "k8s.io/api/core/v1.ResourceRequirements": schema_k8sio_api_core_v1_ResourceRequirements(ref), - "k8s.io/api/core/v1.SELinuxOptions": schema_k8sio_api_core_v1_SELinuxOptions(ref), - "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource": schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref), - "k8s.io/api/core/v1.ScaleIOVolumeSource": schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref), - "k8s.io/api/core/v1.ScopeSelector": schema_k8sio_api_core_v1_ScopeSelector(ref), - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement": schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref), - "k8s.io/api/core/v1.SeccompProfile": schema_k8sio_api_core_v1_SeccompProfile(ref), - "k8s.io/api/core/v1.Secret": schema_k8sio_api_core_v1_Secret(ref), - "k8s.io/api/core/v1.SecretEnvSource": schema_k8sio_api_core_v1_SecretEnvSource(ref), - "k8s.io/api/core/v1.SecretKeySelector": schema_k8sio_api_core_v1_SecretKeySelector(ref), - "k8s.io/api/core/v1.SecretList": schema_k8sio_api_core_v1_SecretList(ref), - "k8s.io/api/core/v1.SecretProjection": schema_k8sio_api_core_v1_SecretProjection(ref), - "k8s.io/api/core/v1.SecretReference": schema_k8sio_api_core_v1_SecretReference(ref), - "k8s.io/api/core/v1.SecretVolumeSource": schema_k8sio_api_core_v1_SecretVolumeSource(ref), - "k8s.io/api/core/v1.SecurityContext": schema_k8sio_api_core_v1_SecurityContext(ref), - "k8s.io/api/core/v1.SerializedReference": schema_k8sio_api_core_v1_SerializedReference(ref), - "k8s.io/api/core/v1.Service": schema_k8sio_api_core_v1_Service(ref), - "k8s.io/api/core/v1.ServiceAccount": schema_k8sio_api_core_v1_ServiceAccount(ref), - "k8s.io/api/core/v1.ServiceAccountList": schema_k8sio_api_core_v1_ServiceAccountList(ref), - "k8s.io/api/core/v1.ServiceAccountTokenProjection": schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref), - "k8s.io/api/core/v1.ServiceList": schema_k8sio_api_core_v1_ServiceList(ref), - "k8s.io/api/core/v1.ServicePort": schema_k8sio_api_core_v1_ServicePort(ref), - "k8s.io/api/core/v1.ServiceProxyOptions": schema_k8sio_api_core_v1_ServiceProxyOptions(ref), - "k8s.io/api/core/v1.ServiceSpec": schema_k8sio_api_core_v1_ServiceSpec(ref), - "k8s.io/api/core/v1.ServiceStatus": schema_k8sio_api_core_v1_ServiceStatus(ref), - "k8s.io/api/core/v1.SessionAffinityConfig": schema_k8sio_api_core_v1_SessionAffinityConfig(ref), - "k8s.io/api/core/v1.SleepAction": schema_k8sio_api_core_v1_SleepAction(ref), - "k8s.io/api/core/v1.StorageOSPersistentVolumeSource": schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref), - "k8s.io/api/core/v1.StorageOSVolumeSource": schema_k8sio_api_core_v1_StorageOSVolumeSource(ref), - "k8s.io/api/core/v1.Sysctl": schema_k8sio_api_core_v1_Sysctl(ref), - "k8s.io/api/core/v1.TCPSocketAction": schema_k8sio_api_core_v1_TCPSocketAction(ref), - "k8s.io/api/core/v1.Taint": schema_k8sio_api_core_v1_Taint(ref), - "k8s.io/api/core/v1.Toleration": schema_k8sio_api_core_v1_Toleration(ref), - "k8s.io/api/core/v1.TopologySelectorLabelRequirement": schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref), - "k8s.io/api/core/v1.TopologySelectorTerm": schema_k8sio_api_core_v1_TopologySelectorTerm(ref), - "k8s.io/api/core/v1.TopologySpreadConstraint": schema_k8sio_api_core_v1_TopologySpreadConstraint(ref), - "k8s.io/api/core/v1.TypedLocalObjectReference": schema_k8sio_api_core_v1_TypedLocalObjectReference(ref), - "k8s.io/api/core/v1.TypedObjectReference": schema_k8sio_api_core_v1_TypedObjectReference(ref), - "k8s.io/api/core/v1.Volume": schema_k8sio_api_core_v1_Volume(ref), - "k8s.io/api/core/v1.VolumeDevice": schema_k8sio_api_core_v1_VolumeDevice(ref), - "k8s.io/api/core/v1.VolumeMount": schema_k8sio_api_core_v1_VolumeMount(ref), - "k8s.io/api/core/v1.VolumeNodeAffinity": schema_k8sio_api_core_v1_VolumeNodeAffinity(ref), - "k8s.io/api/core/v1.VolumeProjection": schema_k8sio_api_core_v1_VolumeProjection(ref), - "k8s.io/api/core/v1.VolumeResourceRequirements": schema_k8sio_api_core_v1_VolumeResourceRequirements(ref), - "k8s.io/api/core/v1.VolumeSource": schema_k8sio_api_core_v1_VolumeSource(ref), - "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource": schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref), - "k8s.io/api/core/v1.WeightedPodAffinityTerm": schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref), - "k8s.io/api/core/v1.WindowsSecurityContextOptions": schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref), - "k8s.io/apimachinery/pkg/api/resource.Quantity": schema_apimachinery_pkg_api_resource_Quantity(ref), - "k8s.io/apimachinery/pkg/api/resource.int64Amount": schema_apimachinery_pkg_api_resource_int64Amount(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ApplyOptions": schema_pkg_apis_meta_v1_ApplyOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/util/intstr.IntOrString": schema_apimachinery_pkg_util_intstr_IntOrString(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), - "kmodules.xyz/resource-metadata/apis/shared.Action": schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionInfo": schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref), - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup": schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref), - "kmodules.xyz/resource-metadata/apis/shared.BootstrapPresets": schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref), - "kmodules.xyz/resource-metadata/apis/shared.Dashboard": schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref), - "kmodules.xyz/resource-metadata/apis/shared.DashboardVar": schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref), - "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters": schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref), - "kmodules.xyz/resource-metadata/apis/shared.HelmInfo": schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref), - "kmodules.xyz/resource-metadata/apis/shared.HelmRelease": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref), - "kmodules.xyz/resource-metadata/apis/shared.HelmRepository": schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref), - "kmodules.xyz/resource-metadata/apis/shared.If": schema_kmodulesxyz_resource_metadata_apis_shared_If(ref), - "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec": schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref), - "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref), - "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies": schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref), - "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref), - "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery": schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref), - "kmodules.xyz/resource-metadata/apis/shared.SourceLocator": schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref), - "kmodules.xyz/resource-metadata/apis/shared.UIParameterTemplate": schema_kmodulesxyz_resource_metadata_apis_shared_UIParameterTemplate(ref), - "kmodules.xyz/resource-metadata/apis/shared.UIParameters": schema_kmodulesxyz_resource_metadata_apis_shared_UIParameters(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplate": schema_resource_metadata_apis_ui_v1alpha1_ActionTemplate(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroup": schema_resource_metadata_apis_ui_v1alpha1_ActionTemplateGroup(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo": schema_resource_metadata_apis_ui_v1alpha1_ChartInfo(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ComponentStatus": schema_resource_metadata_apis_ui_v1alpha1_ComponentStatus(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Dashboard": schema_resource_metadata_apis_ui_v1alpha1_Dashboard(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.DependentFeatureSet": schema_resource_metadata_apis_ui_v1alpha1_DependentFeatureSet(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Dependents": schema_resource_metadata_apis_ui_v1alpha1_Dependents(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Feature": schema_resource_metadata_apis_ui_v1alpha1_Feature(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureList": schema_resource_metadata_apis_ui_v1alpha1_FeatureList(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSet": schema_resource_metadata_apis_ui_v1alpha1_FeatureSet(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSetList": schema_resource_metadata_apis_ui_v1alpha1_FeatureSetList(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSetSpec": schema_resource_metadata_apis_ui_v1alpha1_FeatureSetSpec(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSetStatus": schema_resource_metadata_apis_ui_v1alpha1_FeatureSetStatus(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSpec": schema_resource_metadata_apis_ui_v1alpha1_FeatureSpec(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureStatus": schema_resource_metadata_apis_ui_v1alpha1_FeatureStatus(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.PanelLinkRequest": schema_resource_metadata_apis_ui_v1alpha1_PanelLinkRequest(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ReadinessChecks": schema_resource_metadata_apis_ui_v1alpha1_ReadinessChecks(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Requirements": schema_resource_metadata_apis_ui_v1alpha1_Requirements(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceDashboard": schema_resource_metadata_apis_ui_v1alpha1_ResourceDashboard(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceDashboardList": schema_resource_metadata_apis_ui_v1alpha1_ResourceDashboardList(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceDashboardSpec": schema_resource_metadata_apis_ui_v1alpha1_ResourceDashboardSpec(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditor": schema_resource_metadata_apis_ui_v1alpha1_ResourceEditor(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditorList": schema_resource_metadata_apis_ui_v1alpha1_ResourceEditorList(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditorSpec": schema_resource_metadata_apis_ui_v1alpha1_ResourceEditorSpec(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.UIParameters": schema_resource_metadata_apis_ui_v1alpha1_UIParameters(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.VariantRef": schema_resource_metadata_apis_ui_v1alpha1_VariantRef(ref), - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.WorkloadInfo": schema_resource_metadata_apis_ui_v1alpha1_WorkloadInfo(ref), - } -} - -func schema_k8sio_api_core_v1_AWSElasticBlockStoreVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "partition is 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: []string{"integer"}, - Format: "int32", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_Affinity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Affinity is a group of affinity scheduling rules.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "nodeAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes node affinity scheduling rules for the pod.", - Ref: ref("k8s.io/api/core/v1.NodeAffinity"), - }, - }, - "podAffinity": { - SchemaProps: spec.SchemaProps{ - Description: "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - Ref: ref("k8s.io/api/core/v1.PodAffinity"), - }, - }, - "podAntiAffinity": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.PodAntiAffinity"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeAffinity", "k8s.io/api/core/v1.PodAffinity", "k8s.io/api/core/v1.PodAntiAffinity"}, - } -} - -func schema_k8sio_api_core_v1_AttachedVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AttachedVolume describes a volume attached to a node", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the attached volume", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "devicePath": { - SchemaProps: spec.SchemaProps{ - Description: "DevicePath represents the device path where the volume should be available", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "devicePath"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_AvoidPods(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AvoidPods describes pods that should avoid this node. This is the value for a Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and will eventually become a field of NodeStatus.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "preferAvoidPods": { - SchemaProps: spec.SchemaProps{ - Description: "Bounded-sized list of signatures of pods that should avoid this node, sorted in timestamp order from oldest to newest. Size of the slice is unspecified.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferAvoidPodsEntry"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PreferAvoidPodsEntry"}, - } -} - -func schema_k8sio_api_core_v1_AzureDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "diskName": { - SchemaProps: spec.SchemaProps{ - Description: "diskName is the Name of the data disk in the blob storage", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "diskURI": { - SchemaProps: spec.SchemaProps{ - Description: "diskURI is the URI of data disk in the blob storage", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "cachingMode": { - SchemaProps: spec.SchemaProps{ - Description: "cachingMode is the Host Caching mode: None, Read Only, Read Write.\n\nPossible enum values:\n - `\"None\"`\n - `\"ReadOnly\"`\n - `\"ReadWrite\"`", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"None", "ReadOnly", "ReadWrite"}, - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "kind expected values are 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\n\nPossible enum values:\n - `\"Dedicated\"`\n - `\"Managed\"`\n - `\"Shared\"`", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Dedicated", "Managed", "Shared"}, - }, - }, - }, - Required: []string{"diskName", "diskURI"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_AzureFilePersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "secretName is the name of secret that contains Azure Storage Account Name and Key", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "shareName": { - SchemaProps: spec.SchemaProps{ - Description: "shareName is the azure Share Name", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"secretName", "shareName"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_AzureFileVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "secretName is the name of secret that contains Azure Storage Account Name and Key", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "shareName": { - SchemaProps: spec.SchemaProps{ - Description: "shareName is the azure share Name", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"secretName", "shareName"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_Binding(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "target": { - SchemaProps: spec.SchemaProps{ - Description: "The target object that you want to bind to the standard object.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - Required: []string{"target"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_CSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents storage that is managed by an external CSI volume driver (Beta feature)", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "driver is the name of the driver to use for this volume. Required.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeHandle": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).", - Type: []string{"boolean"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "volumeAttributes of the volume to publish.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "controllerPublishSecretRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "nodeStageSecretRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "nodePublishSecretRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "controllerExpandSecretRef": { - SchemaProps: spec.SchemaProps{ - 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 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: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "nodeExpandSecretRef": { - SchemaProps: spec.SchemaProps{ - Description: "nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - }, - Required: []string{"driver", "volumeHandle"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - } -} - -func schema_k8sio_api_core_v1_CSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a source location of a volume to mount, managed by an external CSI driver", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly specifies a read-only configuration for the volume. Defaults to false (read/write).", - Type: []string{"boolean"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType 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{"string"}, - Format: "", - }, - }, - "volumeAttributes": { - SchemaProps: spec.SchemaProps{ - Description: "volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "nodePublishSecretRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - Required: []string{"driver"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_Capabilities(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Adds and removes POSIX capabilities from running containers.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "add": { - SchemaProps: spec.SchemaProps{ - Description: "Added capabilities", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "drop": { - SchemaProps: spec.SchemaProps{ - Description: "Removed capabilities", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_CephFSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "user is 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{"string"}, - Format: "", - }, - }, - "secretFile": { - SchemaProps: spec.SchemaProps{ - Description: "secretFile is 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{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is 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: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly is 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: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - } -} - -func schema_k8sio_api_core_v1_CephFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "user is 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{"string"}, - Format: "", - }, - }, - "secretFile": { - SchemaProps: spec.SchemaProps{ - Description: "secretFile is 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{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is 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: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly is 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: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_CinderPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly is 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: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - } -} - -func schema_k8sio_api_core_v1_CinderVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly 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: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_ClaimSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClaimSource describes a reference to a ResourceClaim.\n\nExactly one of these fields should be set. Consumers of this type must treat an empty object as if it has an unknown value.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resourceClaimName": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceClaimTemplateName": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod.\n\nThe template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses.\n\nThis field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ClientIPConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClientIPConfig represents the configurations of Client IP based session affinity.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ClusterTrustBundleProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ClusterTrustBundleProjection describes how to select a set of ClusterTrustBundle objects and project their contents into the pod filesystem.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector.", - Type: []string{"string"}, - Format: "", - }, - }, - "signerName": { - SchemaProps: spec.SchemaProps{ - Description: "Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated.", - Type: []string{"string"}, - Format: "", - }, - }, - "labelSelector": { - SchemaProps: spec.SchemaProps{ - Description: "Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as \"match nothing\". If set but empty, interpreted as \"match everything\".", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "If true, don't block pod startup if the referenced ClusterTrustBundle(s) aren't available. If using name, then the named ClusterTrustBundle is allowed not to exist. If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Relative path from the volume root to write the bundle.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - } -} - -func schema_k8sio_api_core_v1_ComponentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Information about the condition of a component.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of condition for a component. Valid value: \"Healthy\"", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message about the condition for a component. For example, information about a health check.", - Type: []string{"string"}, - Format: "", - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - Description: "Condition error code for a component. For example, a health check error code.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of component conditions observed", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ComponentCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_ComponentStatusList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ComponentStatus objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ComponentStatus"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ComponentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_ConfigMap(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap holds configuration data for pods to consume.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "immutable": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "binaryData": { - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_ConfigMapEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ConfigMapKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Selects a key from a ConfigMap.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key to select.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the ConfigMap or its key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"key"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ConfigMapList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapList is a resource containing a list of ConfigMap objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of ConfigMaps.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ConfigMap"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMap", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_ConfigMapNodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeletConfigKey": { - SchemaProps: spec.SchemaProps{ - Description: "KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"namespace", "name", "kubeletConfigKey"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ConfigMapProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "optional specify whether the ConfigMap or its keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - } -} - -func schema_k8sio_api_core_v1_ConfigMapVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "defaultMode is 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: []string{"integer"}, - Format: "int32", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "optional specify whether the ConfigMap or its keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - } -} - -func schema_k8sio_api_core_v1_Container(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A single application container that you want to run within a pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Container 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{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The container 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "args": { - SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The container 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "workingDir": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "containerPort", - "protocol", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "containerPort", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of ports to expose from the container. 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. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), - }, - }, - }, - }, - }, - "envFrom": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), - }, - }, - }, - }, - }, - "env": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "resizePolicy": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Resources resize policy for the container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), - }, - }, - }, - }, - }, - "restartPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pod volumes to mount into the container's filesystem. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "volumeDevices": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "devicePath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "volumeDevices is the list of block devices to be used by the container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), - }, - }, - }, - }, - }, - "livenessProbe": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "startupProbe": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "lifecycle": { - SchemaProps: spec.SchemaProps{ - Description: "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), - }, - }, - "terminationMessagePath": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "terminationMessagePolicy": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.\n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"FallbackToLogsOnError", "File"}, - }, - }, - "imagePullPolicy": { - SchemaProps: spec.SchemaProps{ - 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\n\nPossible enum values:\n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.\n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.\n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Always", "IfNotPresent", "Never"}, - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "stdinOnce": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, - } -} - -func schema_k8sio_api_core_v1_ContainerImage(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describe a container image", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "names": { - SchemaProps: spec.SchemaProps{ - Description: "Names by which this image is known. e.g. [\"kubernetes.example/hyperkube:v1.0.7\", \"cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7\"]", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "sizeBytes": { - SchemaProps: spec.SchemaProps{ - Description: "The size of the image in bytes.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ContainerPort(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerPort represents a network port in a single container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "hostPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "containerPort": { - SchemaProps: spec.SchemaProps{ - Description: "Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", - Default: "TCP", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"SCTP", "TCP", "UDP"}, - }, - }, - "hostIP": { - SchemaProps: spec.SchemaProps{ - Description: "What host IP to bind the external port to.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"containerPort"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ContainerResizePolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerResizePolicy represents resource resize policy for the container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resourceName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the resource to which this resource resize policy applies. Supported values: cpu, memory.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "restartPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"resourceName", "restartPolicy"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ContainerState(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "waiting": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a waiting container", - Ref: ref("k8s.io/api/core/v1.ContainerStateWaiting"), - }, - }, - "running": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a running container", - Ref: ref("k8s.io/api/core/v1.ContainerStateRunning"), - }, - }, - "terminated": { - SchemaProps: spec.SchemaProps{ - Description: "Details about a terminated container", - Ref: ref("k8s.io/api/core/v1.ContainerStateTerminated"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStateRunning", "k8s.io/api/core/v1.ContainerStateTerminated", "k8s.io/api/core/v1.ContainerStateWaiting"}, - } -} - -func schema_k8sio_api_core_v1_ContainerStateRunning(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateRunning is a running state of a container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "startedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which the container was last (re-)started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_ContainerStateTerminated(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateTerminated is a terminated state of a container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "exitCode": { - SchemaProps: spec.SchemaProps{ - Description: "Exit status from the last termination of the container", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "signal": { - SchemaProps: spec.SchemaProps{ - Description: "Signal from the last termination of the container", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason from the last termination of the container", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message regarding the last termination of the container", - Type: []string{"string"}, - Format: "", - }, - }, - "startedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which previous execution of the container started", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "finishedAt": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which the container last terminated", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "containerID": { - SchemaProps: spec.SchemaProps{ - Description: "Container's ID in the format '://'", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"exitCode"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_ContainerStateWaiting(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStateWaiting is a waiting state of a container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason the container is not yet running.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Message regarding why the container is not yet running.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ContainerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ContainerStatus contains details for the current status of this container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "state": { - SchemaProps: spec.SchemaProps{ - Description: "State holds details about the container's current condition.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), - }, - }, - "lastState": { - SchemaProps: spec.SchemaProps{ - Description: "LastTerminationState holds the last termination state of the container to help debug container crashes and restarts. This field is not populated if the container is still running and RestartCount is 0.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerState"), - }, - }, - "ready": { - SchemaProps: spec.SchemaProps{ - Description: "Ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field).\n\nThe value is typically used to determine whether a container is ready to accept traffic.", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "restartCount": { - SchemaProps: spec.SchemaProps{ - Description: "RestartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "imageID": { - SchemaProps: spec.SchemaProps{ - Description: "ImageID is the image ID of the container's image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "containerID": { - SchemaProps: spec.SchemaProps{ - Description: "ContainerID is the ID of the container in the format '://'. Where type is a container runtime identifier, returned from Version call of CRI API (for example \"containerd\").", - Type: []string{"string"}, - Format: "", - }, - }, - "started": { - SchemaProps: spec.SchemaProps{ - Description: "Started indicates whether the container has finished its postStart lifecycle hook and 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. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allocatedResources": { - SchemaProps: spec.SchemaProps{ - Description: "AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources represents the compute resource requests and limits that have been successfully enacted on the running container after it has been started or has been successfully resized.", - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - }, - Required: []string{"name", "ready", "restartCount", "image", "imageID"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerState", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_DaemonEndpoint(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DaemonEndpoint contains information about a single Daemon endpoint.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "Port": { - SchemaProps: spec.SchemaProps{ - Description: "Port number of the given endpoint.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"Port"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_DownwardAPIProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of DownwardAPIVolume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - } -} - -func schema_k8sio_api_core_v1_DownwardAPIVolumeFile(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeFile represents information to create the file containing the pod field", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - 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 '..'", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), - }, - }, - "resourceFieldRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ResourceFieldSelector"), - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"path"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector"}, - } -} - -func schema_k8sio_api_core_v1_DownwardAPIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of downward API volume file", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeFile"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DownwardAPIVolumeFile"}, - } -} - -func schema_k8sio_api_core_v1_EmptyDirVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "medium": { - SchemaProps: spec.SchemaProps{ - Description: "medium represents 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{"string"}, - Format: "", - }, - }, - "sizeLimit": { - SchemaProps: spec.SchemaProps{ - Description: "sizeLimit is the 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: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_EndpointAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointAddress is a tuple that describes single IP address.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "The IP of this endpoint. May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16).", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "The Hostname of this endpoint", - Type: []string{"string"}, - Format: "", - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", - Type: []string{"string"}, - Format: "", - }, - }, - "targetRef": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to object providing the endpoint.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - Required: []string{"ip"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_EndpointPort(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointPort is a tuple that describes a single port.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port number of the endpoint.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"SCTP", "TCP", "UDP"}, - }, - }, - "appProtocol": { - SchemaProps: spec.SchemaProps{ - Description: "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-\n * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_EndpointSubset(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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\t{\n\t Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n\t}\n\nThe resulting set of endpoints can be viewed as:\n\n\ta: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n\tb: [ 10.10.1.1:309, 10.10.2.2:309 ]", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "addresses": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "notReadyAddresses": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointAddress"), - }, - }, - }, - }, - }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "Port numbers available on the related IP addresses.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointPort"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EndpointAddress", "k8s.io/api/core/v1.EndpointPort"}, - } -} - -func schema_k8sio_api_core_v1_Endpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Endpoints is a collection of endpoints that implement the actual service. Example:\n\n\t Name: \"mysvc\",\n\t Subsets: [\n\t {\n\t Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n\t },\n\t {\n\t Addresses: [{\"ip\": \"10.10.3.3\"}],\n\t Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n\t },\n\t]", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "subsets": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EndpointSubset"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EndpointSubset", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_EndpointsList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EndpointsList is a list of endpoints.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of endpoints.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Endpoints"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Endpoints", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_EnvFromSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvFromSource represents the source of a set of ConfigMaps", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "prefix": { - SchemaProps: spec.SchemaProps{ - Description: "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", - Type: []string{"string"}, - Format: "", - }, - }, - "configMapRef": { - SchemaProps: spec.SchemaProps{ - Description: "The ConfigMap to select from", - Ref: ref("k8s.io/api/core/v1.ConfigMapEnvSource"), - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "The Secret to select from", - Ref: ref("k8s.io/api/core/v1.SecretEnvSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapEnvSource", "k8s.io/api/core/v1.SecretEnvSource"}, - } -} - -func schema_k8sio_api_core_v1_EnvVar(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvVar represents an environment variable present in a Container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the environment variable. Must be a C_IDENTIFIER.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Variable references $(VAR_NAME) are expanded using the previously 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", - Type: []string{"string"}, - Format: "", - }, - }, - "valueFrom": { - SchemaProps: spec.SchemaProps{ - Description: "Source for the environment variable's value. Cannot be used if value is not empty.", - Ref: ref("k8s.io/api/core/v1.EnvVarSource"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EnvVarSource"}, - } -} - -func schema_k8sio_api_core_v1_EnvVarSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EnvVarSource represents a source for the value of an EnvVar.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "fieldRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.", - Ref: ref("k8s.io/api/core/v1.ObjectFieldSelector"), - }, - }, - "resourceFieldRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ResourceFieldSelector"), - }, - }, - "configMapKeyRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a ConfigMap.", - Ref: ref("k8s.io/api/core/v1.ConfigMapKeySelector"), - }, - }, - "secretKeyRef": { - SchemaProps: spec.SchemaProps{ - Description: "Selects a key of a secret in the pod's namespace", - Ref: ref("k8s.io/api/core/v1.SecretKeySelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapKeySelector", "k8s.io/api/core/v1.ObjectFieldSelector", "k8s.io/api/core/v1.ResourceFieldSelector", "k8s.io/api/core/v1.SecretKeySelector"}, - } -} - -func schema_k8sio_api_core_v1_EphemeralContainer(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "An EphemeralContainer is a temporary container that you may add 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. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation.\n\nTo add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Container image name. More info: https://kubernetes.io/docs/concepts/containers/images", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "args": { - SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "workingDir": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "containerPort", - "protocol", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "containerPort", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Ports are not allowed for ephemeral containers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), - }, - }, - }, - }, - }, - "envFrom": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), - }, - }, - }, - }, - }, - "env": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "resizePolicy": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Resources resize policy for the container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), - }, - }, - }, - }, - }, - "restartPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "volumeDevices": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "devicePath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "volumeDevices is the list of block devices to be used by the container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), - }, - }, - }, - }, - }, - "livenessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "startupProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "lifecycle": { - SchemaProps: spec.SchemaProps{ - Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), - }, - }, - "terminationMessagePath": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "terminationMessagePolicy": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.\n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"FallbackToLogsOnError", "File"}, - }, - }, - "imagePullPolicy": { - SchemaProps: spec.SchemaProps{ - 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\n\nPossible enum values:\n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.\n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.\n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Always", "IfNotPresent", "Never"}, - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "stdinOnce": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "targetContainerName": { - SchemaProps: spec.SchemaProps{ - 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 uses the namespaces configured in the Pod spec.\n\nThe container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, - } -} - -func schema_k8sio_api_core_v1_EphemeralContainerCommon(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EphemeralContainerCommon is a copy of all fields in Container to be inlined in EphemeralContainer. This separate type allows easy conversion from EphemeralContainer to Container and allows separate documentation for the fields of EphemeralContainer. When a new field is added to Container it must be added here as well.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "Container image name. More info: https://kubernetes.io/docs/concepts/containers/images", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Entrypoint array. Not executed within a shell. The 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "args": { - SchemaProps: spec.SchemaProps{ - Description: "Arguments to the entrypoint. The 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. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "workingDir": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "containerPort", - "protocol", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "containerPort", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Ports are not allowed for ephemeral containers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerPort"), - }, - }, - }, - }, - }, - "envFrom": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvFromSource"), - }, - }, - }, - }, - }, - "env": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of environment variables to set in the container. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EnvVar"), - }, - }, - }, - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceRequirements"), - }, - }, - "resizePolicy": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Resources resize policy for the container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerResizePolicy"), - }, - }, - }, - }, - }, - "restartPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeMounts": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeMount"), - }, - }, - }, - }, - }, - "volumeDevices": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "devicePath", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "volumeDevices is the list of block devices to be used by the container.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeDevice"), - }, - }, - }, - }, - }, - "livenessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "readinessProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "startupProbe": { - SchemaProps: spec.SchemaProps{ - Description: "Probes are not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Probe"), - }, - }, - "lifecycle": { - SchemaProps: spec.SchemaProps{ - Description: "Lifecycle is not allowed for ephemeral containers.", - Ref: ref("k8s.io/api/core/v1.Lifecycle"), - }, - }, - "terminationMessagePath": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "terminationMessagePolicy": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents.\n - `\"File\"` is the default behavior and will set the container status message to the contents of the container's terminationMessagePath when the container exits.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"FallbackToLogsOnError", "File"}, - }, - }, - "imagePullPolicy": { - SchemaProps: spec.SchemaProps{ - 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\n\nPossible enum values:\n - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails.\n - `\"IfNotPresent\"` means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.\n - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Always", "IfNotPresent", "Never"}, - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.", - Ref: ref("k8s.io/api/core/v1.SecurityContext"), - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "stdinOnce": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.ContainerResizePolicy", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"}, - } -} - -func schema_k8sio_api_core_v1_EphemeralVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an ephemeral volume that is handled by a normal storage driver.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumeClaimTemplate": { - SchemaProps: spec.SchemaProps{ - 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 `-` where `` 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: ref("k8s.io/api/core/v1.PersistentVolumeClaimTemplate"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimTemplate"}, - } -} - -func schema_k8sio_api_core_v1_Event(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "involvedObject": { - SchemaProps: spec.SchemaProps{ - Description: "The object that this event is about.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", - Type: []string{"string"}, - Format: "", - }, - }, - "source": { - SchemaProps: spec.SchemaProps{ - Description: "The component reporting this event. Should be a short machine understandable string.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EventSource"), - }, - }, - "firstTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTimestamp": { - SchemaProps: spec.SchemaProps{ - Description: "The time at which the most recent occurrence of this event was recorded.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "count": { - SchemaProps: spec.SchemaProps{ - Description: "The number of times this event has occurred.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of this event (Normal, Warning), new types could be added in the future", - Type: []string{"string"}, - Format: "", - }, - }, - "eventTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time when this Event was first observed.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - "series": { - SchemaProps: spec.SchemaProps{ - Description: "Data about the Event series this event represents or nil if it's a singleton Event.", - Ref: ref("k8s.io/api/core/v1.EventSeries"), - }, - }, - "action": { - SchemaProps: spec.SchemaProps{ - Description: "What action was taken/failed regarding to the Regarding object.", - Type: []string{"string"}, - Format: "", - }, - }, - "related": { - SchemaProps: spec.SchemaProps{ - Description: "Optional secondary object for more complex actions.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "reportingComponent": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "reportingInstance": { - SchemaProps: spec.SchemaProps{ - Description: "ID of the controller instance, e.g. `kubelet-xyzf`.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"metadata", "involvedObject"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.EventSeries", "k8s.io/api/core/v1.EventSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_EventList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventList is a list of events.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of events", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Event"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Event", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_EventSeries(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "count": { - SchemaProps: spec.SchemaProps{ - Description: "Number of occurrences in this series up to the last heartbeat time", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "lastObservedTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time of the last occurrence observed", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime"}, - } -} - -func schema_k8sio_api_core_v1_EventSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EventSource contains information for an event.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "component": { - SchemaProps: spec.SchemaProps{ - Description: "Component from which the event is generated.", - Type: []string{"string"}, - Format: "", - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Node name on which the event is generated.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ExecAction(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExecAction describes a \"run in container\" action.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "command": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_FCVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "targetWWNs": { - SchemaProps: spec.SchemaProps{ - Description: "targetWWNs is Optional: FC target worldwide names (WWNs)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "lun is Optional: FC target lun number", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "wwids": { - SchemaProps: spec.SchemaProps{ - Description: "wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_FlexPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "driver is the name of the driver to use for this volume.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is 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: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - Description: "options is Optional: this field holds extra command options if any.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"driver"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - } -} - -func schema_k8sio_api_core_v1_FlexVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "driver": { - SchemaProps: spec.SchemaProps{ - Description: "driver is the name of the driver to use for this volume.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is 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: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - Description: "options is Optional: this field holds extra command options if any.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"driver"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_FlockerVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "datasetName": { - SchemaProps: spec.SchemaProps{ - Description: "datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated", - Type: []string{"string"}, - Format: "", - }, - }, - "datasetUUID": { - SchemaProps: spec.SchemaProps{ - Description: "datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_GCEPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "pdName": { - SchemaProps: spec.SchemaProps{ - Description: "pdName is 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", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is 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{"string"}, - Format: "", - }, - }, - "partition": { - SchemaProps: spec.SchemaProps{ - Description: "partition is 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: []string{"integer"}, - Format: "int32", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"pdName"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_GRPCAction(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Port number of the gRPC service. Number must be in the range 1 to 65535.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "service": { - SchemaProps: spec.SchemaProps{ - Description: "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_GitRepoVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "repository": { - SchemaProps: spec.SchemaProps{ - Description: "repository is the URL", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "revision": { - SchemaProps: spec.SchemaProps{ - Description: "revision is the commit hash for the specified revision.", - Type: []string{"string"}, - Format: "", - }, - }, - "directory": { - SchemaProps: spec.SchemaProps{ - Description: "directory is the 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{"string"}, - Format: "", - }, - }, - }, - Required: []string{"repository"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_GlusterfsPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "endpoints": { - SchemaProps: spec.SchemaProps{ - Description: "endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "endpointsNamespace": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - }, - Required: []string{"endpoints", "path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_GlusterfsVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "endpoints": { - SchemaProps: spec.SchemaProps{ - Description: "endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"endpoints", "path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_HTTPGetAction(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPGetAction describes an action based on HTTP Get requests.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path to access on the HTTP server.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", - Type: []string{"string"}, - Format: "", - }, - }, - "scheme": { - SchemaProps: spec.SchemaProps{ - Description: "Scheme to use for connecting to the host. Defaults to HTTP.\n\nPossible enum values:\n - `\"HTTP\"` means that the scheme used will be http://\n - `\"HTTPS\"` means that the scheme used will be https://", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"HTTP", "HTTPS"}, - }, - }, - "httpHeaders": { - SchemaProps: spec.SchemaProps{ - Description: "Custom headers to set in the request. HTTP allows repeated headers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HTTPHeader"), - }, - }, - }, - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.HTTPHeader", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - } -} - -func schema_k8sio_api_core_v1_HTTPHeader(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HTTPHeader describes a custom header to be used in HTTP probes", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The header field value", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_HostAlias(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP address of the host file entry.", - Type: []string{"string"}, - Format: "", - }, - }, - "hostnames": { - SchemaProps: spec.SchemaProps{ - Description: "Hostnames for the above IP address.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_HostIP(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "HostIP represents a single IP address allocated to the host.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP is the IP address assigned to the host", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_HostPathVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - 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", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n\nPossible enum values:\n - `\"\"` For backwards compatible, leave it empty if unset\n - `\"BlockDevice\"` A block device must exist at the given path\n - `\"CharDevice\"` A character device must exist at the given path\n - `\"Directory\"` A directory must exist at the given path\n - `\"DirectoryOrCreate\"` If nothing exists at the given path, an empty directory will be created there as needed with file mode 0755, having the same group and ownership with Kubelet.\n - `\"File\"` A file must exist at the given path\n - `\"FileOrCreate\"` If nothing exists at the given path, an empty file will be created there as needed with file mode 0644, having the same group and ownership with Kubelet.\n - `\"Socket\"` A UNIX socket must exist at the given path", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"", "BlockDevice", "CharDevice", "Directory", "DirectoryOrCreate", "File", "FileOrCreate", "Socket"}, - }, - }, - }, - Required: []string{"path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ISCSIPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "targetPortal": { - SchemaProps: spec.SchemaProps{ - Description: "targetPortal is 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).", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "iqn": { - SchemaProps: spec.SchemaProps{ - Description: "iqn is Target iSCSI Qualified Name.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "lun is iSCSI Target Lun number.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "iscsiInterface": { - SchemaProps: spec.SchemaProps{ - Description: "iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "portals": { - SchemaProps: spec.SchemaProps{ - Description: "portals is the 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "chapAuthDiscovery": { - SchemaProps: spec.SchemaProps{ - Description: "chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "chapAuthSession": { - SchemaProps: spec.SchemaProps{ - Description: "chapAuthSession defines whether support iSCSI Session CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "initiatorName": { - SchemaProps: spec.SchemaProps{ - Description: "initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"targetPortal", "iqn", "lun"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - } -} - -func schema_k8sio_api_core_v1_ISCSIVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "targetPortal": { - SchemaProps: spec.SchemaProps{ - Description: "targetPortal is 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).", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "iqn": { - SchemaProps: spec.SchemaProps{ - Description: "iqn is the target iSCSI Qualified Name.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "lun": { - SchemaProps: spec.SchemaProps{ - Description: "lun represents iSCSI Target Lun number.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "iscsiInterface": { - SchemaProps: spec.SchemaProps{ - Description: "iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "portals": { - SchemaProps: spec.SchemaProps{ - Description: "portals is the 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "chapAuthDiscovery": { - SchemaProps: spec.SchemaProps{ - Description: "chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "chapAuthSession": { - SchemaProps: spec.SchemaProps{ - Description: "chapAuthSession defines whether support iSCSI Session CHAP authentication", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef is the CHAP Secret for iSCSI target and initiator authentication", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "initiatorName": { - SchemaProps: spec.SchemaProps{ - Description: "initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"targetPortal", "iqn", "lun"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_KeyToPath(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Maps a string key to a path within a volume.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "key is the key to project.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path is 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 '..'.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "mode": { - SchemaProps: spec.SchemaProps{ - Description: "mode is 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: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"key", "path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_Lifecycle(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "postStart": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.LifecycleHandler"), - }, - }, - "preStop": { - SchemaProps: spec.SchemaProps{ - 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 Pod's termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period (unless delayed by finalizers). 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: ref("k8s.io/api/core/v1.LifecycleHandler"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LifecycleHandler"}, - } -} - -func schema_k8sio_api_core_v1_LifecycleHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "exec": { - SchemaProps: spec.SchemaProps{ - Description: "Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), - }, - }, - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "tcpSocket": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), - }, - }, - "sleep": { - SchemaProps: spec.SchemaProps{ - Description: "Sleep represents the duration that the container should sleep before being terminated.", - Ref: ref("k8s.io/api/core/v1.SleepAction"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.SleepAction", "k8s.io/api/core/v1.TCPSocketAction"}, - } -} - -func schema_k8sio_api_core_v1_LimitRange(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRange sets resource usage limits for each kind of resource in a Namespace.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_LimitRangeItem(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of resource that this limit applies to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "max": { - SchemaProps: spec.SchemaProps{ - Description: "Max usage constraints on this kind by resource name.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "min": { - SchemaProps: spec.SchemaProps{ - Description: "Min usage constraints on this kind by resource name.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "default": { - SchemaProps: spec.SchemaProps{ - Description: "Default resource requirement limit value by resource name if resource limit is omitted.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "defaultRequest": { - SchemaProps: spec.SchemaProps{ - Description: "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "maxLimitRequestRatio": { - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - Required: []string{"type"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_LimitRangeList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeList is a list of LimitRange items.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRange"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRange", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_LimitRangeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits is the list of LimitRangeItem objects that are enforced.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LimitRangeItem"), - }, - }, - }, - }, - }, - }, - Required: []string{"limits"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LimitRangeItem"}, - } -} - -func schema_k8sio_api_core_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of objects", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_k8sio_api_core_v1_LoadBalancerIngress(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", - Type: []string{"string"}, - Format: "", - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", - Type: []string{"string"}, - Format: "", - }, - }, - "ipMode": { - SchemaProps: spec.SchemaProps{ - Description: "IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. Setting this to \"VIP\" indicates that traffic is delivered to the node with the destination set to the load-balancer's IP and port. Setting this to \"Proxy\" indicates that traffic is delivered to the node or pod with the destination set to the node's IP and node port or the pod's IP and port. Service implementations may use this information to adjust traffic routing.", - Type: []string{"string"}, - Format: "", - }, - }, - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PortStatus"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PortStatus"}, - } -} - -func schema_k8sio_api_core_v1_LoadBalancerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancerStatus represents the status of a load-balancer.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ingress": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerIngress"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerIngress"}, - } -} - -func schema_k8sio_api_core_v1_LocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_LocalVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Local represents directly-attached storage with node affinity (Beta feature)", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...).", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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 filesystem if unspecified.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ModifyVolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "targetVolumeAttributesClassName": { - SchemaProps: spec.SchemaProps{ - Description: "targetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "status is the status of the ControllerModifyVolume operation. It can be in any of following states:\n - Pending\n Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as\n the specified VolumeAttributesClass not existing.\n - InProgress\n InProgress indicates that the volume is being modified.\n - Infeasible\n Infeasible indicates that the request has been rejected as invalid by the CSI driver. To\n\t resolve the error, a valid VolumeAttributesClass needs to be specified.\nNote: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately.\n\nPossible enum values:\n - `\"InProgress\"` InProgress indicates that the volume is being modified\n - `\"Infeasible\"` Infeasible indicates that the request has been rejected as invalid by the CSI driver. To resolve the error, a valid VolumeAttributesClass needs to be specified\n - `\"Pending\"` Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as the specified VolumeAttributesClass not existing", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"InProgress", "Infeasible", "Pending"}, - }, - }, - }, - Required: []string{"status"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_NFSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "server": { - SchemaProps: spec.SchemaProps{ - Description: "server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"server", "path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_Namespace(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Namespace provides a scope for Names. Use of multiple namespaces is optional.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceSpec", "k8s.io/api/core/v1.NamespaceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_NamespaceCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceCondition contains details about state of namespace.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of namespace controller condition.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_NamespaceList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceList is a list of Namespaces.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Namespace"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Namespace", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_NamespaceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceSpec describes the attributes on a Namespace.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "finalizers": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_NamespaceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NamespaceStatus is information about the current status of a Namespace.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/\n\nPossible enum values:\n - `\"Active\"` means the namespace is available for use in the system\n - `\"Terminating\"` means the namespace is undergoing graceful termination", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Active", "Terminating"}, - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a namespace's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NamespaceCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NamespaceCondition"}, - } -} - -func schema_k8sio_api_core_v1_Node(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSpec", "k8s.io/api/core/v1.NodeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_NodeAddress(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeAddress contains information for the node's address.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Node address type, one of Hostname, ExternalIP or InternalIP.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "address": { - SchemaProps: spec.SchemaProps{ - Description: "The node address.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "address"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_NodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Node affinity is a group of node affinity scheduling rules.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.NodeSelector"), - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PreferredSchedulingTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/core/v1.PreferredSchedulingTerm"}, - } -} - -func schema_k8sio_api_core_v1_NodeCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeCondition contains condition information for a node.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of node condition.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "lastHeartbeatTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we got an update on a given condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transit from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_NodeConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap is a reference to a Node's ConfigMap", - Ref: ref("k8s.io/api/core/v1.ConfigMapNodeConfigSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ConfigMapNodeConfigSource"}, - } -} - -func schema_k8sio_api_core_v1_NodeConfigStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "assigned": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "active": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "lastKnownGood": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource"}, - } -} - -func schema_k8sio_api_core_v1_NodeDaemonEndpoints(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kubeletEndpoint": { - SchemaProps: spec.SchemaProps{ - Description: "Endpoint on which Kubelet is listening.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.DaemonEndpoint"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.DaemonEndpoint"}, - } -} - -func schema_k8sio_api_core_v1_NodeList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeList is the whole list of all Nodes which have been registered with master.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of nodes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Node"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Node", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_NodeProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeProxyOptions is the query options to a Node's proxy call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path to use for the current proxy request to node.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_NodeResources(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeResources is an object for conveying resource information about a node. see https://kubernetes.io/docs/concepts/architecture/nodes/#capacity for more details.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "Capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Capacity represents the available resources of a node", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - Required: []string{"Capacity"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_NodeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "nodeSelectorTerms": { - SchemaProps: spec.SchemaProps{ - Description: "Required. A list of node selector terms. The terms are ORed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), - }, - }, - }, - }, - }, - }, - Required: []string{"nodeSelectorTerms"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, - } -} - -func schema_k8sio_api_core_v1_NodeSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The label key that the selector applies to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n\nPossible enum values:\n - `\"DoesNotExist\"`\n - `\"Exists\"`\n - `\"Gt\"`\n - `\"In\"`\n - `\"Lt\"`\n - `\"NotIn\"`", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"DoesNotExist", "Exists", "Gt", "In", "Lt", "NotIn"}, - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "operator"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_NodeSelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of node selector requirements by node's labels.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), - }, - }, - }, - }, - }, - "matchFields": { - SchemaProps: spec.SchemaProps{ - Description: "A list of node selector requirements by node's fields.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorRequirement"), - }, - }, - }, - }, - }, - }, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorRequirement"}, - } -} - -func schema_k8sio_api_core_v1_NodeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeSpec describes the attributes that a node is created with.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "podCIDR": { - SchemaProps: spec.SchemaProps{ - Description: "PodCIDR represents the pod IP range assigned to the node.", - Type: []string{"string"}, - Format: "", - }, - }, - "podCIDRs": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "providerID": { - SchemaProps: spec.SchemaProps{ - Description: "ID of the node assigned by the cloud provider in the format: ://", - Type: []string{"string"}, - Format: "", - }, - }, - "unschedulable": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "taints": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the node's taints.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Taint"), - }, - }, - }, - }, - }, - "configSource": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated: Previously used to specify the source of the node's configuration for the DynamicKubeletConfig feature. This feature is removed.", - Ref: ref("k8s.io/api/core/v1.NodeConfigSource"), - }, - }, - "externalID": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeConfigSource", "k8s.io/api/core/v1.Taint"}, - } -} - -func schema_k8sio_api_core_v1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeStatus is information about the current status of a node.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "allocatable": { - SchemaProps: spec.SchemaProps{ - Description: "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "phase": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"Pending\"` means the node has been created/added by the system, but not configured.\n - `\"Running\"` means the node has been configured and has Kubernetes components running.\n - `\"Terminated\"` means the node has been removed from the cluster.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Pending", "Running", "Terminated"}, - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeCondition"), - }, - }, - }, - }, - }, - "addresses": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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 https://pr.k8s.io/79391 for an example. Consumers should assume that addresses can change during the lifetime of a Node. However, there are some exceptions where this may not be possible, such as Pods that inherit a Node's address in its own status or consumers of the downward API (status.hostIP).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeAddress"), - }, - }, - }, - }, - }, - "daemonEndpoints": { - SchemaProps: spec.SchemaProps{ - Description: "Endpoints of daemons running on the Node.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeDaemonEndpoints"), - }, - }, - "nodeInfo": { - SchemaProps: spec.SchemaProps{ - Description: "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSystemInfo"), - }, - }, - "images": { - SchemaProps: spec.SchemaProps{ - Description: "List of container images on this node", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerImage"), - }, - }, - }, - }, - }, - "volumesInUse": { - SchemaProps: spec.SchemaProps{ - Description: "List of attachable volumes in use (mounted) by the node.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "volumesAttached": { - SchemaProps: spec.SchemaProps{ - Description: "List of volumes that are attached to the node.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.AttachedVolume"), - }, - }, - }, - }, - }, - "config": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the config assigned to the node via the dynamic Kubelet config feature.", - Ref: ref("k8s.io/api/core/v1.NodeConfigStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AttachedVolume", "k8s.io/api/core/v1.ContainerImage", "k8s.io/api/core/v1.NodeAddress", "k8s.io/api/core/v1.NodeCondition", "k8s.io/api/core/v1.NodeConfigStatus", "k8s.io/api/core/v1.NodeDaemonEndpoints", "k8s.io/api/core/v1.NodeSystemInfo", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "machineID": { - SchemaProps: spec.SchemaProps{ - 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", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "systemUUID": { - SchemaProps: spec.SchemaProps{ - 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", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "bootID": { - SchemaProps: spec.SchemaProps{ - Description: "Boot ID reported by the node.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kernelVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "osImage": { - SchemaProps: spec.SchemaProps{ - Description: "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "containerRuntimeVersion": { - SchemaProps: spec.SchemaProps{ - Description: "ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeletVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Kubelet Version reported by the node.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kubeProxyVersion": { - SchemaProps: spec.SchemaProps{ - Description: "KubeProxy Version reported by the node.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "operatingSystem": { - SchemaProps: spec.SchemaProps{ - Description: "The Operating System reported by the node", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "architecture": { - SchemaProps: spec.SchemaProps{ - Description: "The Architecture reported by the node", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"machineID", "systemUUID", "bootID", "kernelVersion", "osImage", "containerRuntimeVersion", "kubeletVersion", "kubeProxyVersion", "operatingSystem", "architecture"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ObjectFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectFieldSelector selects an APIVersioned field of an object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path of the field to select in the specified API version.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"fieldPath"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectReference contains enough information to let you inspect or modify the referred object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "fieldPath": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - }, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PersistentVolume(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeSpec", "k8s.io/api/core/v1.PersistentVolumeStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaim is a user's request for and claim to a persistent volume", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/api/core/v1.PersistentVolumeClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeClaimCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimCondition contains details about state of pvc", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "lastProbeTime is the time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "lastTransitionTime is the time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "reason is a 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{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "message is the human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaim"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "accessModes": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "selector is a label query over volumes to consider for binding.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeResourceRequirements"), - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "volumeName is the binding reference to the PersistentVolume backing this claim.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageClassName": { - SchemaProps: spec.SchemaProps{ - Description: "storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeMode": { - SchemaProps: spec.SchemaProps{ - Description: "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.\n\nPossible enum values:\n - `\"Block\"` means the volume will not be formatted with a filesystem and will remain a raw block device.\n - `\"Filesystem\"` means the volume will be or is formatted with a filesystem.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Block", "Filesystem"}, - }, - }, - "dataSource": { - SchemaProps: spec.SchemaProps{ - Description: "dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) 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. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.", - Ref: ref("k8s.io/api/core/v1.TypedLocalObjectReference"), - }, - }, - "dataSourceRef": { - SchemaProps: spec.SchemaProps{ - Description: "dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn't specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn't set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While dataSource ignores disallowed values (dropping them), dataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n* While dataSource only allows local objects, dataSourceRef allows objects\n in any namespaces.\n(Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.", - Ref: ref("k8s.io/api/core/v1.TypedObjectReference"), - }, - }, - "volumeAttributesClassName": { - SchemaProps: spec.SchemaProps{ - Description: "volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.TypedLocalObjectReference", "k8s.io/api/core/v1.TypedObjectReference", "k8s.io/api/core/v1.VolumeResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - Description: "phase represents the current phase of PersistentVolumeClaim.\n\nPossible enum values:\n - `\"Bound\"` used for PersistentVolumeClaims that are bound\n - `\"Lost\"` used for PersistentVolumeClaims that lost their underlying PersistentVolume. The claim was bound to a PersistentVolume and this volume does not exist any longer and all data on it was lost.\n - `\"Pending\"` used for PersistentVolumeClaims that are not yet bound", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Bound", "Lost", "Pending"}, - }, - }, - "accessModes": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "capacity represents the actual resources of the underlying volume.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimCondition"), - }, - }, - }, - }, - }, - "allocatedResources": { - SchemaProps: spec.SchemaProps{ - Description: "allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "allocatedResourceStatuses": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "granular", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the capacity of the volume.\n\t* Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when resize has failed in resize controller with a terminal error.\n\t- NodeResizePending:\n\t\tState set when resize controller has finished resizing the volume but further resizing of\n\t\tvolume is needed on the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set when resizing has failed in kubelet with a terminal error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a PVC for more capacity - this field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "currentVolumeAttributesClassName": { - SchemaProps: spec.SchemaProps{ - Description: "currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is an alpha field and requires enabling VolumeAttributesClass feature.", - Type: []string{"string"}, - Format: "", - }, - }, - "modifyVolumeStatus": { - SchemaProps: spec.SchemaProps{ - Description: "ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted. This is an alpha field and requires enabling VolumeAttributesClass feature.", - Ref: ref("k8s.io/api/core/v1.ModifyVolumeStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ModifyVolumeStatus", "k8s.io/api/core/v1.PersistentVolumeClaimCondition", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimSpec"), - }, - }, - }, - Required: []string{"spec"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolumeClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeClaimVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "claimName": { - SchemaProps: spec.SchemaProps{ - 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", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly Will force the ReadOnly setting in VolumeMounts. Default false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"claimName"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeList is a list of PersistentVolume items.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items is a list of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PersistentVolume"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PersistentVolume", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeSource is similar to VolumeSource but meant for the administrator who creates PVs. Exactly one of its members must be set.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), - }, - }, - "local": { - SchemaProps: spec.SchemaProps{ - Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "csi represents storage that is handled by an external CSI driver (Beta feature).", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeSpec is the specification of a persistent volume.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "capacity": { - SchemaProps: spec.SchemaProps{ - Description: "capacity is the description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GlusterfsPersistentVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - Description: "nfs represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - Ref: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.RBDPersistentVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ISCSIPersistentVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.CinderPersistentVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSPersistentVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexPersistentVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFilePersistentVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOPersistentVolumeSource"), - }, - }, - "local": { - SchemaProps: spec.SchemaProps{ - Description: "local represents directly-attached storage with node affinity", - Ref: ref("k8s.io/api/core/v1.LocalVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.StorageOSPersistentVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "csi represents storage that is handled by an external CSI driver (Beta feature).", - Ref: ref("k8s.io/api/core/v1.CSIPersistentVolumeSource"), - }, - }, - "accessModes": { - SchemaProps: spec.SchemaProps{ - Description: "accessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "claimRef": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "granular", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - "persistentVolumeReclaimPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "persistentVolumeReclaimPolicy defines 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\n\nPossible enum values:\n - `\"Delete\"` means the volume will be deleted from Kubernetes on release from its claim. The volume plugin must support Deletion.\n - `\"Recycle\"` means the volume will be recycled back into the pool of unbound persistent volumes on release from its claim. The volume plugin must support Recycling.\n - `\"Retain\"` means the volume will be left in its current phase (Released) for manual reclamation by the administrator. The default policy is Retain.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Delete", "Recycle", "Retain"}, - }, - }, - "storageClassName": { - SchemaProps: spec.SchemaProps{ - Description: "storageClassName is the name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", - Type: []string{"string"}, - Format: "", - }, - }, - "mountOptions": { - SchemaProps: spec.SchemaProps{ - Description: "mountOptions is the 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "volumeMode": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"Block\"` means the volume will not be formatted with a filesystem and will remain a raw block device.\n - `\"Filesystem\"` means the volume will be or is formatted with a filesystem.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Block", "Filesystem"}, - }, - }, - "nodeAffinity": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.VolumeNodeAffinity"), - }, - }, - "volumeAttributesClassName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is an alpha field and requires enabling VolumeAttributesClass feature.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFilePersistentVolumeSource", "k8s.io/api/core/v1.CSIPersistentVolumeSource", "k8s.io/api/core/v1.CephFSPersistentVolumeSource", "k8s.io/api/core/v1.CinderPersistentVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexPersistentVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GlusterfsPersistentVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIPersistentVolumeSource", "k8s.io/api/core/v1.LocalVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.ObjectReference", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDPersistentVolumeSource", "k8s.io/api/core/v1.ScaleIOPersistentVolumeSource", "k8s.io/api/core/v1.StorageOSPersistentVolumeSource", "k8s.io/api/core/v1.VolumeNodeAffinity", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_PersistentVolumeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PersistentVolumeStatus is the current status of a persistent volume.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - 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\n\nPossible enum values:\n - `\"Available\"` used for PersistentVolumes that are not yet bound Available volumes are held by the binder and matched to PersistentVolumeClaims\n - `\"Bound\"` used for PersistentVolumes that are bound\n - `\"Failed\"` used for PersistentVolumes that failed to be correctly recycled or deleted after being released from a claim\n - `\"Pending\"` used for PersistentVolumes that are not available\n - `\"Released\"` used for PersistentVolumes where the bound PersistentVolumeClaim was deleted released volumes must be recycled before becoming available again this phase is used by the persistent volume claim binder to signal to another process to reclaim the resource", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Available", "Bound", "Failed", "Pending", "Released"}, - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "message is a human-readable message indicating details about why the volume is in this state.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "lastPhaseTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_PhotonPersistentDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Photon Controller persistent disk resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "pdID": { - SchemaProps: spec.SchemaProps{ - Description: "pdID is the ID that identifies Photon Controller persistent disk", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - }, - Required: []string{"pdID"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_Pod(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_PodAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod affinity is a group of inter pod affinity scheduling rules.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, - } -} - -func schema_k8sio_api_core_v1_PodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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 matches that of any node on which a pod of the set of pods is running", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "labelSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "namespaces": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "topologyKey": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "namespaceSelector": { - SchemaProps: spec.SchemaProps{ - 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.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "matchLabelKeys": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "mismatchLabelKeys": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"topologyKey"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - } -} - -func schema_k8sio_api_core_v1_PodAntiAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "requiredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - }, - }, - "preferredDuringSchedulingIgnoredDuringExecution": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.WeightedPodAffinityTerm"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm", "k8s.io/api/core/v1.WeightedPodAffinityTerm"}, - } -} - -func schema_k8sio_api_core_v1_PodAttachOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodAttachOptions is the query options to a Pod's remote attach call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdout": { - SchemaProps: spec.SchemaProps{ - Description: "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stderr": { - SchemaProps: spec.SchemaProps{ - Description: "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodCondition contains details for the current condition of this pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "lastProbeTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time we probed the condition.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "Unique, one-word, CamelCase reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human-readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_PodDNSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "nameservers": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "searches": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "options": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodDNSConfigOption"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodDNSConfigOption"}, - } -} - -func schema_k8sio_api_core_v1_PodDNSConfigOption(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodDNSConfigOption defines DNS resolver options of a pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Required.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodExecOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodExecOptions is the query options to a Pod's remote exec call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "stdin": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard input stream of the pod for this call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stdout": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard output stream of the pod for this call.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "stderr": { - SchemaProps: spec.SchemaProps{ - Description: "Redirect the standard error stream of the pod for this call.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tty": { - SchemaProps: spec.SchemaProps{ - Description: "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - "command": { - SchemaProps: spec.SchemaProps{ - Description: "Command is the remote command to execute. argv array. Not executed within a shell.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"command"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodIP(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodIP represents a single IP address allocated to the pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ip": { - SchemaProps: spec.SchemaProps{ - Description: "IP is the IP address assigned to the pod", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodList is a list of Pods.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of pods. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Pod"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Pod", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_PodLogOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodLogOptions is the query options for a Pod's logs REST call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "container": { - SchemaProps: spec.SchemaProps{ - Description: "The container for which to stream logs. Defaults to only container if there is one container in the pod.", - Type: []string{"string"}, - Format: "", - }, - }, - "follow": { - SchemaProps: spec.SchemaProps{ - Description: "Follow the log stream of the pod. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "previous": { - SchemaProps: spec.SchemaProps{ - Description: "Return previous terminated container logs. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "sinceSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "sinceTime": { - SchemaProps: spec.SchemaProps{ - Description: "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "timestamps": { - SchemaProps: spec.SchemaProps{ - Description: "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "tailLines": { - SchemaProps: spec.SchemaProps{ - Description: "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "limitBytes": { - SchemaProps: spec.SchemaProps{ - Description: "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "insecureSkipTLSVerifyBackend": { - SchemaProps: spec.SchemaProps{ - Description: "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_PodOS(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodOS defines the OS parameters of a pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodPortForwardOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodPortForwardOptions is the query options to a Pod's port forward call when using WebSockets. The `port` query parameter must specify the port or ports (comma separated) to forward over. Port forwarding over SPDY does not use these options. It requires the port to be passed in the `port` header as part of request.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "ports": { - SchemaProps: spec.SchemaProps{ - Description: "List of ports to forward Required when using WebSockets", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodProxyOptions is the query options to a Pod's proxy call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the URL path to use for the current proxy request to pod.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodReadinessGate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodReadinessGate contains the reference to a pod condition", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "conditionType": { - SchemaProps: spec.SchemaProps{ - Description: "ConditionType refers to a condition in the pod's condition list with matching type.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"conditionType"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodResourceClaim references exactly one ResourceClaim through a ClaimSource. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "source": { - SchemaProps: spec.SchemaProps{ - Description: "Source describes where to find the ResourceClaim.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ClaimSource"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ClaimSource"}, - } -} - -func schema_k8sio_api_core_v1_PodResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceClaimName": { - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. It this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodSchedulingGate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodSchedulingGate is associated to a Pod to guard its scheduling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the scheduling gate. Each scheduling gate must have a unique name field.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PodSecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "seLinuxOptions": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), - }, - }, - "windowsOptions": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsGroup": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsNonRoot": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "supplementalGroups": { - SchemaProps: spec.SchemaProps{ - Description: "A list of groups applied to the first process run in each container, in addition to the container's primary GID, the fsGroup (if specified), and group memberships defined in the container image for the uid of the container process. If unspecified, no additional groups are added to any container. Note that group memberships defined in the container image for the uid of the container process are still effective, even if they are not included in this list. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - "fsGroup": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "sysctls": { - SchemaProps: spec.SchemaProps{ - Description: "Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Sysctl"), - }, - }, - }, - }, - }, - "fsGroupChangePolicy": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.\n\nPossible enum values:\n - `\"Always\"` indicates that volume's ownership and permissions should always be changed whenever volume is mounted inside a Pod. This the default behavior.\n - `\"OnRootMismatch\"` indicates that volume's ownership and permissions will be changed only when permission and ownership of root directory does not match with expected permissions on the volume. This can help shorten the time it takes to change ownership and permissions of a volume.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Always", "OnRootMismatch"}, - }, - }, - "seccompProfile": { - SchemaProps: spec.SchemaProps{ - Description: "The seccomp options to use by the containers in this pod. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.Sysctl", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, - } -} - -func schema_k8sio_api_core_v1_PodSignature(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes the class of pods that should avoid this node. Exactly one field should be set.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "podController": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to controller whose pods should avoid this node.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"}, - } -} - -func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodSpec is a description of a pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumes": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge,retainKeys", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Volume"), - }, - }, - }, - }, - }, - "initContainers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "containers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - "ephemeralContainers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.EphemeralContainer"), - }, - }, - }, - }, - }, - "restartPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy\n\nPossible enum values:\n - `\"Always\"`\n - `\"Never\"`\n - `\"OnFailure\"`", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Always", "Never", "OnFailure"}, - }, - }, - "terminationGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - "activeDeadlineSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - "dnsPolicy": { - SchemaProps: spec.SchemaProps{ - 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'.\n\nPossible enum values:\n - `\"ClusterFirst\"` indicates that the pod should use cluster DNS first unless hostNetwork is true, if it is available, then fall back on the default (as determined by kubelet) DNS settings.\n - `\"ClusterFirstWithHostNet\"` indicates that the pod should use cluster DNS first, if it is available, then fall back on the default (as determined by kubelet) DNS settings.\n - `\"Default\"` indicates that the pod should use the default (as determined by kubelet) DNS settings.\n - `\"None\"` indicates that the pod should use empty DNS settings. DNS parameters such as nameservers and search paths should be defined via DNSConfig.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"ClusterFirst", "ClusterFirstWithHostNet", "Default", "None"}, - }, - }, - "nodeSelector": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "serviceAccountName": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "serviceAccount": { - SchemaProps: spec.SchemaProps{ - Description: "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", - Type: []string{"string"}, - Format: "", - }, - }, - "automountServiceAccountToken": { - SchemaProps: spec.SchemaProps{ - Description: "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "nodeName": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "hostNetwork": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "hostPID": { - SchemaProps: spec.SchemaProps{ - Description: "Use the host's pid namespace. Optional: Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "hostIPC": { - SchemaProps: spec.SchemaProps{ - Description: "Use the host's ipc namespace. Optional: Default to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "shareProcessNamespace": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "securityContext": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.PodSecurityContext"), - }, - }, - "imagePullSecrets": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - "hostname": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", - Type: []string{"string"}, - Format: "", - }, - }, - "subdomain": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", - Type: []string{"string"}, - Format: "", - }, - }, - "affinity": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod's scheduling constraints", - Ref: ref("k8s.io/api/core/v1.Affinity"), - }, - }, - "schedulerName": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", - Type: []string{"string"}, - Format: "", - }, - }, - "tolerations": { - SchemaProps: spec.SchemaProps{ - Description: "If specified, the pod's tolerations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Toleration"), - }, - }, - }, - }, - }, - "hostAliases": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "ip", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostAlias"), - }, - }, - }, - }, - }, - "priorityClassName": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "priority": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - "dnsConfig": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.", - Ref: ref("k8s.io/api/core/v1.PodDNSConfig"), - }, - }, - "readinessGates": { - SchemaProps: spec.SchemaProps{ - 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/580-pod-readiness-gates", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodReadinessGate"), - }, - }, - }, - }, - }, - "runtimeClassName": { - SchemaProps: spec.SchemaProps{ - 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/585-runtime-class", - Type: []string{"string"}, - Format: "", - }, - }, - "enableServiceLinks": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "preemptionPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.\n\nPossible enum values:\n - `\"Never\"` means that pod never preempts other pods with lower priority.\n - `\"PreemptLowerPriority\"` means that pod can preempt other pods with lower priority.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Never", "PreemptLowerPriority"}, - }, - }, - "overhead": { - SchemaProps: spec.SchemaProps{ - 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/688-pod-overhead/README.md", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "topologySpreadConstraints": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "topologyKey", - "whenUnsatisfiable", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "topologyKey", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySpreadConstraint"), - }, - }, - }, - }, - }, - "setHostnameAsFQDN": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "os": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the OS of the containers in the pod. Some pod and container fields are restricted if this is set.\n\nIf the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions\n\nIf the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.containers[*].securityContext.seLinuxOptions - spec.containers[*].securityContext.seccompProfile - spec.containers[*].securityContext.capabilities - spec.containers[*].securityContext.readOnlyRootFilesystem - spec.containers[*].securityContext.privileged - spec.containers[*].securityContext.allowPrivilegeEscalation - spec.containers[*].securityContext.procMount - spec.containers[*].securityContext.runAsUser - spec.containers[*].securityContext.runAsGroup", - Ref: ref("k8s.io/api/core/v1.PodOS"), - }, - }, - "hostUsers": { - SchemaProps: spec.SchemaProps{ - Description: "Use the host's user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "schedulingGates": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod.\n\nSchedulingGates can only be set at pod creation time, and be removed only afterwards.\n\nThis is a beta feature enabled by the PodSchedulingReadiness feature gate.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSchedulingGate"), - }, - }, - }, - }, - }, - "resourceClaims": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge,retainKeys", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaim"), - }, - }, - }, - }, - }, - }, - Required: []string{"containers"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Affinity", "k8s.io/api/core/v1.Container", "k8s.io/api/core/v1.EphemeralContainer", "k8s.io/api/core/v1.HostAlias", "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.PodDNSConfig", "k8s.io/api/core/v1.PodOS", "k8s.io/api/core/v1.PodReadinessGate", "k8s.io/api/core/v1.PodResourceClaim", "k8s.io/api/core/v1.PodSchedulingGate", "k8s.io/api/core/v1.PodSecurityContext", "k8s.io/api/core/v1.Toleration", "k8s.io/api/core/v1.TopologySpreadConstraint", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_PodStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "phase": { - SchemaProps: spec.SchemaProps{ - 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\n\nPossible enum values:\n - `\"Failed\"` means that all containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system).\n - `\"Pending\"` means the pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host.\n - `\"Running\"` means the pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted.\n - `\"Succeeded\"` means that all containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers.\n - `\"Unknown\"` means that 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. Deprecated: It isn't being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095)", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Failed", "Pending", "Running", "Succeeded", "Unknown"}, - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodCondition"), - }, - }, - }, - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about why the pod is in this condition.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", - Type: []string{"string"}, - Format: "", - }, - }, - "nominatedNodeName": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "hostIP": { - SchemaProps: spec.SchemaProps{ - Description: "hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod", - Type: []string{"string"}, - Format: "", - }, - }, - "hostIPs": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - "x-kubernetes-patch-merge-key": "ip", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.HostIP"), - }, - }, - }, - }, - }, - "podIP": { - SchemaProps: spec.SchemaProps{ - Description: "podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", - Type: []string{"string"}, - Format: "", - }, - }, - "podIPs": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "ip", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodIP"), - }, - }, - }, - }, - }, - "startTime": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "initContainerStatuses": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), - }, - }, - }, - }, - }, - "containerStatuses": { - SchemaProps: spec.SchemaProps{ - Description: "The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), - }, - }, - }, - }, - }, - "qosClass": { - SchemaProps: spec.SchemaProps{ - 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://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes\n\nPossible enum values:\n - `\"BestEffort\"` is the BestEffort qos class.\n - `\"Burstable\"` is the Burstable qos class.\n - `\"Guaranteed\"` is the Guaranteed qos class.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"BestEffort", "Burstable", "Guaranteed"}, - }, - }, - "ephemeralContainerStatuses": { - SchemaProps: spec.SchemaProps{ - Description: "Status for any ephemeral containers that have run in this pod.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ContainerStatus"), - }, - }, - }, - }, - }, - "resize": { - SchemaProps: spec.SchemaProps{ - Description: "Status of resources resize desired for pod's containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\"", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceClaimStatuses": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge,retainKeys", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Status of resource claims.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodResourceClaimStatus"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ContainerStatus", "k8s.io/api/core/v1.HostIP", "k8s.io/api/core/v1.PodCondition", "k8s.io/api/core/v1.PodIP", "k8s.io/api/core/v1.PodResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_PodStatusResult(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_PodTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplate describes a template for creating copies of a predefined pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_PodTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplateList is a list of PodTemplates.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of pod templates", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_PodTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PodTemplateSpec describes the data a pod should have when created from a template", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_PortStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "port": { - SchemaProps: spec.SchemaProps{ - Description: "Port is the port number of the service port of which status is recorded here", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "Protocol is the protocol of the service port of which status is recorded here The supported values are: \"TCP\", \"UDP\", \"SCTP\"\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"SCTP", "TCP", "UDP"}, - }, - }, - "error": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port", "protocol"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PortworxVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PortworxVolumeSource represents a Portworx volume resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumeID": { - SchemaProps: spec.SchemaProps{ - Description: "volumeID uniquely identifies a Portworx volume", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"volumeID"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_PreferAvoidPodsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Describes a class of pods that should avoid this node.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "podSignature": { - SchemaProps: spec.SchemaProps{ - Description: "The class of pods.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodSignature"), - }, - }, - "evictionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Time at which this entry was added to the list.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) reason why this entry was added to the list.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating why this entry was added to the list.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"podSignature"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodSignature", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_PreferredSchedulingTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "weight": { - SchemaProps: spec.SchemaProps{ - Description: "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "preference": { - SchemaProps: spec.SchemaProps{ - Description: "A node selector term, associated with the corresponding weight.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.NodeSelectorTerm"), - }, - }, - }, - Required: []string{"weight", "preference"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelectorTerm"}, - } -} - -func schema_k8sio_api_core_v1_Probe(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "exec": { - SchemaProps: spec.SchemaProps{ - Description: "Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), - }, - }, - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "tcpSocket": { - SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), - }, - }, - "grpc": { - SchemaProps: spec.SchemaProps{ - Description: "GRPC specifies an action involving a GRPC port.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), - }, - }, - "initialDelaySeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - "periodSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "successThreshold": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - "failureThreshold": { - SchemaProps: spec.SchemaProps{ - Description: "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "terminationGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - 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 a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, - } -} - -func schema_k8sio_api_core_v1_ProbeHandler(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ProbeHandler defines a specific action that should be taken in a probe. One and only one of the fields must be specified.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "exec": { - SchemaProps: spec.SchemaProps{ - Description: "Exec specifies the action to take.", - Ref: ref("k8s.io/api/core/v1.ExecAction"), - }, - }, - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "HTTPGet specifies the http request to perform.", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "tcpSocket": { - SchemaProps: spec.SchemaProps{ - Description: "TCPSocket specifies an action involving a TCP port.", - Ref: ref("k8s.io/api/core/v1.TCPSocketAction"), - }, - }, - "grpc": { - SchemaProps: spec.SchemaProps{ - Description: "GRPC specifies an action involving a GRPC port.", - Ref: ref("k8s.io/api/core/v1.GRPCAction"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ExecAction", "k8s.io/api/core/v1.GRPCAction", "k8s.io/api/core/v1.HTTPGetAction", "k8s.io/api/core/v1.TCPSocketAction"}, - } -} - -func schema_k8sio_api_core_v1_ProjectedVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a projected volume source", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "sources": { - SchemaProps: spec.SchemaProps{ - Description: "sources is the list of volume projections", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.VolumeProjection"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "defaultMode are the 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: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.VolumeProjection"}, - } -} - -func schema_k8sio_api_core_v1_QuobyteVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "registry": { - SchemaProps: spec.SchemaProps{ - 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", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "volume": { - SchemaProps: spec.SchemaProps{ - Description: "volume is a string that references an already created Quobyte volume by name.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "user to map volume access to Defaults to serivceaccount user", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "group to map volume access to Default is no group", - Type: []string{"string"}, - Format: "", - }, - }, - "tenant": { - SchemaProps: spec.SchemaProps{ - Description: "tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"registry", "volume"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_RBDPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "pool": { - SchemaProps: spec.SchemaProps{ - Description: "pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "keyring": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors", "image"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - } -} - -func schema_k8sio_api_core_v1_RBDVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "monitors": { - SchemaProps: spec.SchemaProps{ - Description: "monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Description: "image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "pool": { - SchemaProps: spec.SchemaProps{ - Description: "pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "user": { - SchemaProps: spec.SchemaProps{ - Description: "user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", - Type: []string{"string"}, - Format: "", - }, - }, - "keyring": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"monitors", "image"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_RangeAllocation(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RangeAllocation is not a public type.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "range": { - SchemaProps: spec.SchemaProps{ - Description: "Range is string that identifies the range represented by 'data'.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - Description: "Data is a bit array containing all allocated addresses in the previous segment.", - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - Required: []string{"range", "data"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_ReplicationController(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationController represents the configuration of a replication controller.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerSpec", "k8s.io/api/core/v1.ReplicationControllerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_ReplicationControllerCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerCondition describes the state of a replication controller at a certain point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of replication controller condition.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time the condition transitioned from one status to another.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human readable message indicating details about the transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_ReplicationControllerList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerList is a collection of replication controllers.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationController"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationController", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_ReplicationControllerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerSpec is the specification of a replication controller.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - "minReadySeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - "selector": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "template": { - SchemaProps: spec.SchemaProps{ - Description: "Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. The only allowed template.spec.restartPolicy value is \"Always\". More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template", - Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodTemplateSpec"}, - } -} - -func schema_k8sio_api_core_v1_ReplicationControllerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ReplicationControllerStatus represents the current status of a replication controller.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "replicas": { - SchemaProps: spec.SchemaProps{ - Description: "Replicas is the most recently observed number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "fullyLabeledReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of pods that have labels matching the labels of the pod template of the replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "readyReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of ready replicas for this replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "availableReplicas": { - SchemaProps: spec.SchemaProps{ - Description: "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - Description: "ObservedGeneration reflects the generation of the most recently observed replication controller.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Represents the latest available observations of a replication controller's current state.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ReplicationControllerCondition"), - }, - }, - }, - }, - }, - }, - Required: []string{"replicas"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ReplicationControllerCondition"}, - } -} - -func schema_k8sio_api_core_v1_ResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceClaim references one entry in PodSpec.ResourceClaims.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ResourceFieldSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceFieldSelector represents container resources (cpu, memory) and their output format", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "containerName": { - SchemaProps: spec.SchemaProps{ - Description: "Container name: required for volumes, optional for env vars", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "Required: resource to select", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "divisor": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the output format of the exposed resources, defaults to \"1\"", - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - Required: []string{"resource"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_ResourceQuota(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuota sets aggregate quota restrictions enforced per namespace", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuotaStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuotaSpec", "k8s.io/api/core/v1.ResourceQuotaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_ResourceQuotaList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaList is a list of ResourceQuota items.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceQuota"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceQuota", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_ResourceQuotaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "hard": { - SchemaProps: spec.SchemaProps{ - Description: "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "scopes": { - SchemaProps: spec.SchemaProps{ - Description: "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "scopeSelector": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ScopeSelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ScopeSelector", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_ResourceQuotaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceQuotaStatus defines the enforced hard limits and observed use.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "hard": { - SchemaProps: spec.SchemaProps{ - Description: "Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "used": { - SchemaProps: spec.SchemaProps{ - Description: "Used is the current observed total usage of the resource in the namespace.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_ResourceRequirements(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceRequirements describes the compute resource requirements.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "requests": { - SchemaProps: spec.SchemaProps{ - 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "claims": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "name", - }, - "x-kubernetes-list-type": "map", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ResourceClaim"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ResourceClaim", "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_SELinuxOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SELinuxOptions are the labels to be applied to the container", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "user": { - SchemaProps: spec.SchemaProps{ - Description: "User is a SELinux user label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "role": { - SchemaProps: spec.SchemaProps{ - Description: "Role is a SELinux role label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type is a SELinux type label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - "level": { - SchemaProps: spec.SchemaProps{ - Description: "Level is SELinux level label that applies to the container.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ScaleIOPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "gateway": { - SchemaProps: spec.SchemaProps{ - Description: "gateway is the host address of the ScaleIO API Gateway.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "system": { - SchemaProps: spec.SchemaProps{ - Description: "system is the name of the storage system as configured in ScaleIO.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.SecretReference"), - }, - }, - "sslEnabled": { - SchemaProps: spec.SchemaProps{ - Description: "sslEnabled is the flag to enable/disable SSL communication with Gateway, default false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "protectionDomain": { - SchemaProps: spec.SchemaProps{ - Description: "protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePool": { - SchemaProps: spec.SchemaProps{ - Description: "storagePool is the ScaleIO Storage Pool associated with the protection domain.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageMode": { - SchemaProps: spec.SchemaProps{ - Description: "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"gateway", "system", "secretRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.SecretReference"}, - } -} - -func schema_k8sio_api_core_v1_ScaleIOVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ScaleIOVolumeSource represents a persistent ScaleIO volume", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "gateway": { - SchemaProps: spec.SchemaProps{ - Description: "gateway is the host address of the ScaleIO API Gateway.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "system": { - SchemaProps: spec.SchemaProps{ - Description: "system is the name of the storage system as configured in ScaleIO.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - "sslEnabled": { - SchemaProps: spec.SchemaProps{ - Description: "sslEnabled Flag enable/disable SSL communication with Gateway, default false", - Type: []string{"boolean"}, - Format: "", - }, - }, - "protectionDomain": { - SchemaProps: spec.SchemaProps{ - Description: "protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePool": { - SchemaProps: spec.SchemaProps{ - Description: "storagePool is the ScaleIO Storage Pool associated with the protection domain.", - Type: []string{"string"}, - Format: "", - }, - }, - "storageMode": { - SchemaProps: spec.SchemaProps{ - Description: "storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"gateway", "system", "secretRef"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_ScopeSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of scope selector requirements by scope of the resources.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ScopedResourceSelectorRequirement"), - }, - }, - }, - }, - }, - }, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ScopedResourceSelectorRequirement"}, - } -} - -func schema_k8sio_api_core_v1_ScopedResourceSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "scopeName": { - SchemaProps: spec.SchemaProps{ - Description: "The name of the scope that the selector applies to.\n\nPossible enum values:\n - `\"BestEffort\"` Match all pod objects that have best effort quality of service\n - `\"CrossNamespacePodAffinity\"` Match all pod objects that have cross-namespace pod (anti)affinity mentioned.\n - `\"NotBestEffort\"` Match all pod objects that do not have best effort quality of service\n - `\"NotTerminating\"` Match all pod objects where spec.activeDeadlineSeconds is nil\n - `\"PriorityClass\"` Match all pod objects that have priority class mentioned\n - `\"Terminating\"` Match all pod objects where spec.activeDeadlineSeconds >=0", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"BestEffort", "CrossNamespacePodAffinity", "NotBestEffort", "NotTerminating", "PriorityClass", "Terminating"}, - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist.\n\nPossible enum values:\n - `\"DoesNotExist\"`\n - `\"Exists\"`\n - `\"In\"`\n - `\"NotIn\"`", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"DoesNotExist", "Exists", "In", "NotIn"}, - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"scopeName", "operator"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_SeccompProfile(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"Localhost\"` indicates a profile defined in a file on the node should be used. The file's location relative to /seccomp.\n - `\"RuntimeDefault\"` represents the default container runtime seccomp profile.\n - `\"Unconfined\"` indicates no seccomp profile is applied (A.K.A. unconfined).", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Localhost", "RuntimeDefault", "Unconfined"}, - }, - }, - "localhostProfile": { - SchemaProps: spec.SchemaProps{ - 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 be set if type is \"Localhost\". Must NOT be set for any other type.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-unions": []interface{}{ - map[string]interface{}{ - "discriminator": "type", - "fields-to-discriminateBy": map[string]interface{}{ - "localhostProfile": "LocalhostProfile", - }, - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_Secret(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "immutable": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "data": { - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "byte", - }, - }, - }, - }, - }, - "stringData": { - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_SecretEnvSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_SecretKeySelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretKeySelector selects a key of a Secret.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The key of the secret to select from. Must be a valid secret key.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "Specify whether the Secret or its key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"key"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_SecretList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretList is a list of Secret.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Secret"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Secret", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_SecretProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "optional field specify whether the Secret or its key must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - } -} - -func schema_k8sio_api_core_v1_SecretReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is unique within a namespace to reference a secret resource.", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "namespace defines the space within which the secret name must be unique.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_SecretVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.KeyToPath"), - }, - }, - }, - }, - }, - "defaultMode": { - SchemaProps: spec.SchemaProps{ - Description: "defaultMode is 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: []string{"integer"}, - Format: "int32", - }, - }, - "optional": { - SchemaProps: spec.SchemaProps{ - Description: "optional field specify whether the Secret or its keys must be defined", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.KeyToPath"}, - } -} - -func schema_k8sio_api_core_v1_SecurityContext(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "capabilities": { - SchemaProps: spec.SchemaProps{ - Description: "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.Capabilities"), - }, - }, - "privileged": { - SchemaProps: spec.SchemaProps{ - Description: "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "seLinuxOptions": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SELinuxOptions"), - }, - }, - "windowsOptions": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is linux.", - Ref: ref("k8s.io/api/core/v1.WindowsSecurityContextOptions"), - }, - }, - "runAsUser": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsGroup": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "runAsNonRoot": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "readOnlyRootFilesystem": { - SchemaProps: spec.SchemaProps{ - Description: "Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowPrivilegeEscalation": { - SchemaProps: spec.SchemaProps{ - 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 Note that this field cannot be set when spec.os.name is windows.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "procMount": { - SchemaProps: spec.SchemaProps{ - 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. Note that this field cannot be set when spec.os.name is windows.\n\nPossible enum values:\n - `\"Default\"` uses the container runtime defaults for readonly and masked paths for /proc. Most container runtimes mask certain paths in /proc to avoid accidental security exposure of special devices or information.\n - `\"Unmasked\"` bypasses the default masking behavior of the container runtime and ensures the newly created /proc the container stays in tact with no modifications.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Default", "Unmasked"}, - }, - }, - "seccompProfile": { - SchemaProps: spec.SchemaProps{ - Description: "The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.", - Ref: ref("k8s.io/api/core/v1.SeccompProfile"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Capabilities", "k8s.io/api/core/v1.SELinuxOptions", "k8s.io/api/core/v1.SeccompProfile", "k8s.io/api/core/v1.WindowsSecurityContextOptions"}, - } -} - -func schema_k8sio_api_core_v1_SerializedReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SerializedReference is a reference to serialized object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "reference": { - SchemaProps: spec.SchemaProps{ - Description: "The reference to an object in the system.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_Service(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Description: "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServiceSpec", "k8s.io/api/core/v1.ServiceStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_ServiceAccount(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "secrets": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a \"kubernetes.io/enforce-mountable-secrets\" annotation set to \"true\". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - "imagePullSecrets": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - "automountServiceAccountToken": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference", "k8s.io/api/core/v1.ObjectReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_k8sio_api_core_v1_ServiceAccountList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceAccountList is a list of ServiceAccount objects", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServiceAccount"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServiceAccount", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_ServiceAccountTokenProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "audience": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "expirationSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "path is the path relative to the mount point of the file to project the token into.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"path"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ServiceList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceList holds a list of services.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of services", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.Service"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Service", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_k8sio_api_core_v1_ServicePort(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServicePort contains information on service's port.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "protocol": { - SchemaProps: spec.SchemaProps{ - Description: "The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.\n\nPossible enum values:\n - `\"SCTP\"` is the SCTP protocol.\n - `\"TCP\"` is the TCP protocol.\n - `\"UDP\"` is the UDP protocol.", - Default: "TCP", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"SCTP", "TCP", "UDP"}, - }, - }, - "appProtocol": { - SchemaProps: spec.SchemaProps{ - Description: "The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-\n * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "The port that will be exposed by this service.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "targetPort": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "nodePort": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - } -} - -func schema_k8sio_api_core_v1_ServiceProxyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceProxyOptions is the query options to a Service's proxy call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_ServiceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceSpec describes the attributes that a user creates on a service.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ports": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "port", - "protocol", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "port", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.ServicePort"), - }, - }, - }, - }, - }, - "selector": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "clusterIP": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "clusterIPs": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - 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\nThis 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - 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\n\nPossible enum values:\n - `\"ClusterIP\"` means a service will only be accessible inside the cluster, via the cluster IP.\n - `\"ExternalName\"` means a service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved.\n - `\"LoadBalancer\"` means a service will be exposed via an external load balancer (if the cloud provider supports it), in addition to 'NodePort' type.\n - `\"NodePort\"` means a service will be exposed on one port of every node, in addition to 'ClusterIP' type.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"ClusterIP", "ExternalName", "LoadBalancer", "NodePort"}, - }, - }, - "externalIPs": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "sessionAffinity": { - SchemaProps: spec.SchemaProps{ - 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\n\nPossible enum values:\n - `\"ClientIP\"` is the Client IP based.\n - `\"None\"` - no session affinity.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"ClientIP", "None"}, - }, - }, - "loadBalancerIP": { - SchemaProps: spec.SchemaProps{ - Description: "Only applies to Service Type: LoadBalancer. 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. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available.", - Type: []string{"string"}, - Format: "", - }, - }, - "loadBalancerSourceRanges": { - SchemaProps: spec.SchemaProps{ - 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/create-external-load-balancer/", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "externalName": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "externalTrafficPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "externalTrafficPolicy describes how nodes distribute service traffic they receive on one of the Service's \"externally-facing\" addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). If set to \"Local\", the proxy will configure the service in a way that assumes that external load balancers will take care of balancing the service traffic between nodes, and so each node will deliver traffic only to the node-local endpoints of the service, without masquerading the client source IP. (Traffic mistakenly sent to a node with no endpoints will be dropped.) The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features). Note that traffic sent to an External IP or LoadBalancer IP from within the cluster will always get \"Cluster\" semantics, but clients sending to a NodePort from within the cluster may need to take traffic policy into account when picking a node.\n\nPossible enum values:\n - `\"Cluster\"`\n - `\"Cluster\"` routes traffic to all endpoints.\n - `\"Local\"`\n - `\"Local\"` preserves the source IP of the traffic by routing only to endpoints on the same node as the traffic was received on (dropping the traffic if there are no local endpoints).", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Cluster", "Cluster", "Local", "Local"}, - }, - }, - "healthCheckNodePort": { - SchemaProps: spec.SchemaProps{ - 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). This field cannot be updated once set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "publishNotReadyAddresses": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "sessionAffinityConfig": { - SchemaProps: spec.SchemaProps{ - Description: "sessionAffinityConfig contains the configurations of session affinity.", - Ref: ref("k8s.io/api/core/v1.SessionAffinityConfig"), - }, - }, - "ipFamilies": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "ipFamilyPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. 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.\n\nPossible enum values:\n - `\"PreferDualStack\"` indicates that this service prefers dual-stack when the cluster is configured for dual-stack. If the cluster is not configured for dual-stack the service will be assigned a single IPFamily. If the IPFamily is not set in service.spec.ipFamilies then the service will be assigned the default IPFamily configured on the cluster\n - `\"RequireDualStack\"` indicates that this service requires dual-stack. Using IPFamilyPolicyRequireDualStack on a single stack cluster will result in validation errors. The IPFamilies (and their order) assigned to this service is based on service.spec.ipFamilies. If service.spec.ipFamilies was not provided then it will be assigned according to how they are configured on the cluster. If service.spec.ipFamilies has only one entry then the alternative IPFamily will be added by apiserver\n - `\"SingleStack\"` indicates that this service is required to have a single IPFamily. The IPFamily assigned is based on the default IPFamily used by the cluster or as identified by service.spec.ipFamilies field", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"PreferDualStack", "RequireDualStack", "SingleStack"}, - }, - }, - "allocateLoadBalancerNodePorts": { - SchemaProps: spec.SchemaProps{ - 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. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "loadBalancerClass": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "internalTrafficPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \"Local\", the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).\n\nPossible enum values:\n - `\"Cluster\"` routes traffic to all endpoints.\n - `\"Local\"` routes traffic only to endpoints on the same node as the client pod (dropping the traffic if there are no local endpoints).", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Cluster", "Local"}, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ServicePort", "k8s.io/api/core/v1.SessionAffinityConfig"}, - } -} - -func schema_k8sio_api_core_v1_ServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServiceStatus represents the current status of a service.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "loadBalancer": { - SchemaProps: spec.SchemaProps{ - Description: "LoadBalancer contains the current status of the load-balancer, if one is present.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.LoadBalancerStatus"), - }, - }, - "conditions": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-map-keys": []interface{}{ - "type", - }, - "x-kubernetes-list-type": "map", - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "Current service state", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Condition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LoadBalancerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Condition"}, - } -} - -func schema_k8sio_api_core_v1_SessionAffinityConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SessionAffinityConfig represents the configurations of session affinity.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "clientIP": { - SchemaProps: spec.SchemaProps{ - Description: "clientIP contains the configurations of Client IP based session affinity.", - Ref: ref("k8s.io/api/core/v1.ClientIPConfig"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ClientIPConfig"}, - } -} - -func schema_k8sio_api_core_v1_SleepAction(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SleepAction describes a \"sleep\" action.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "seconds": { - SchemaProps: spec.SchemaProps{ - Description: "Seconds is the number of seconds to sleep.", - Default: 0, - Type: []string{"integer"}, - Format: "int64", - }, - }, - }, - Required: []string{"seconds"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_StorageOSPersistentVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a StorageOS persistent volume resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeNamespace": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_StorageOSVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a StorageOS persistent volume resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumeName": { - SchemaProps: spec.SchemaProps{ - Description: "volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - Type: []string{"string"}, - Format: "", - }, - }, - "volumeNamespace": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is the 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{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "secretRef": { - SchemaProps: spec.SchemaProps{ - Description: "secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.LocalObjectReference"}, - } -} - -func schema_k8sio_api_core_v1_Sysctl(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Sysctl defines a kernel parameter to be set", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of a property to set", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value of a property to set", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_TCPSocketAction(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TCPSocketAction describes an action based on opening a socket", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "port": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), - }, - }, - "host": { - SchemaProps: spec.SchemaProps{ - Description: "Optional: Host name to connect to, defaults to the pod IP.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"port"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, - } -} - -func schema_k8sio_api_core_v1_Taint(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The taint key to be applied to a node.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "The taint value corresponding to the taint key.", - Type: []string{"string"}, - Format: "", - }, - }, - "effect": { - SchemaProps: spec.SchemaProps{ - Description: "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.\n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.\n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"NoExecute", "NoSchedule", "PreferNoSchedule"}, - }, - }, - "timeAdded": { - SchemaProps: spec.SchemaProps{ - Description: "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - }, - Required: []string{"key", "effect"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_k8sio_api_core_v1_Toleration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"Equal\"`\n - `\"Exists\"`", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Equal", "Exists"}, - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "effect": { - SchemaProps: spec.SchemaProps{ - Description: "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.\n\nPossible enum values:\n - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController.\n - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler.\n - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"NoExecute", "NoSchedule", "PreferNoSchedule"}, - }, - }, - "tolerationSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_TopologySelectorLabelRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "The label key that the selector applies to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "An array of string values. One value must match the label to be selected. Each entry in Values is ORed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "values"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_TopologySelectorTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "matchLabelExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "A list of topology selector requirements by labels.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.TopologySelectorLabelRequirement"), - }, - }, - }, - }, - }, - }, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.TopologySelectorLabelRequirement"}, - } -} - -func schema_k8sio_api_core_v1_TopologySpreadConstraint(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "maxSkew": { - SchemaProps: spec.SchemaProps{ - 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. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) 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.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "topologyKey": { - SchemaProps: spec.SchemaProps{ - 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 as a \"bucket\", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is \"kubernetes.io/hostname\", each Node is a domain of that topology. And, if TopologyKey is \"topology.kubernetes.io/zone\", each zone is a domain of that topology. It's a required field.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "whenUnsatisfiable": { - SchemaProps: spec.SchemaProps{ - 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 assignment 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.\n\nPossible enum values:\n - `\"DoNotSchedule\"` instructs the scheduler not to schedule the pod when constraints are not satisfied.\n - `\"ScheduleAnyway\"` instructs the scheduler to schedule the pod even if constraints are not satisfied.", - Default: "", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"DoNotSchedule", "ScheduleAnyway"}, - }, - }, - "labelSelector": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "minDomains": { - SchemaProps: spec.SchemaProps{ - Description: "MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.\n\nFor example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew.\n\nThis is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default).", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "nodeAffinityPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.\n\nIf this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.\n\nPossible enum values:\n - `\"Honor\"` means use this scheduling directive when calculating pod topology spread skew.\n - `\"Ignore\"` means ignore this scheduling directive when calculating pod topology spread skew.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Honor", "Ignore"}, - }, - }, - "nodeTaintsPolicy": { - SchemaProps: spec.SchemaProps{ - Description: "NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.\n\nIf this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.\n\nPossible enum values:\n - `\"Honor\"` means use this scheduling directive when calculating pod topology spread skew.\n - `\"Ignore\"` means ignore this scheduling directive when calculating pod topology spread skew.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Honor", "Ignore"}, - }, - }, - "matchLabelKeys": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - SchemaProps: spec.SchemaProps{ - Description: "MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.\n\nThis is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"maxSkew", "topologyKey", "whenUnsatisfiable"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, - } -} - -func schema_k8sio_api_core_v1_TypedLocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_k8sio_api_core_v1_TypedObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiGroup": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is the type of resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the name of resource being referenced", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"kind", "name"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_Volume(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Volume represents a named volume in a pod that may be accessed by any container in the pod.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "hostPath": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "emptyDir": { - SchemaProps: spec.SchemaProps{ - Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "gitRepo": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), - }, - }, - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "persistentVolumeClaim": { - SchemaProps: spec.SchemaProps{ - Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.RBDVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "projected": { - SchemaProps: spec.SchemaProps{ - Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), - }, - }, - "ephemeral": { - SchemaProps: spec.SchemaProps{ - 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.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - } -} - -func schema_k8sio_api_core_v1_VolumeDevice(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "volumeDevice describes a mapping of a raw block device within a container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name must match the name of a persistentVolumeClaim in the pod", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "devicePath": { - SchemaProps: spec.SchemaProps{ - Description: "devicePath is the path inside of the container that the device will be mapped to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "devicePath"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_VolumeMount(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeMount describes a mounting of a Volume within a container.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "This must match the Name of a Volume.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "readOnly": { - SchemaProps: spec.SchemaProps{ - Description: "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "mountPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path within the container at which the volume should be mounted. Must not contain ':'.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "subPath": { - SchemaProps: spec.SchemaProps{ - Description: "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - Type: []string{"string"}, - Format: "", - }, - }, - "mountPropagation": { - SchemaProps: spec.SchemaProps{ - 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.\n\nPossible enum values:\n - `\"Bidirectional\"` means that the volume in a container will receive new mounts from the host or other containers, and its own mounts will be propagated from the container to the host or other containers. Note that this mode is recursively applied to all mounts in the volume (\"rshared\" in Linux terminology).\n - `\"HostToContainer\"` means that the volume in a container will receive new mounts from the host or other containers, but filesystems mounted inside the container won't be propagated to the host or other containers. Note that this mode is recursively applied to all mounts in the volume (\"rslave\" in Linux terminology).\n - `\"None\"` means that the volume in a container will not receive new mounts from the host or other containers, and filesystems mounted inside the container won't be propagated to the host or other containers. Note that this mode corresponds to \"private\" in Linux terminology.", - Type: []string{"string"}, - Format: "", - Enum: []interface{}{"Bidirectional", "HostToContainer", "None"}, - }, - }, - "subPathExpr": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "mountPath"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_VolumeNodeAffinity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "required": { - SchemaProps: spec.SchemaProps{ - Description: "required specifies hard node constraints that must be met.", - Ref: ref("k8s.io/api/core/v1.NodeSelector"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.NodeSelector"}, - } -} - -func schema_k8sio_api_core_v1_VolumeProjection(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Projection that may be projected along with other supported volume types", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "secret information about the secret data to project", - Ref: ref("k8s.io/api/core/v1.SecretProjection"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "downwardAPI information about the downwardAPI data to project", - Ref: ref("k8s.io/api/core/v1.DownwardAPIProjection"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "configMap information about the configMap data to project", - Ref: ref("k8s.io/api/core/v1.ConfigMapProjection"), - }, - }, - "serviceAccountToken": { - SchemaProps: spec.SchemaProps{ - Description: "serviceAccountToken is information about the serviceAccountToken data to project", - Ref: ref("k8s.io/api/core/v1.ServiceAccountTokenProjection"), - }, - }, - "clusterTrustBundle": { - SchemaProps: spec.SchemaProps{ - Description: "ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file.\n\nAlpha, gated by the ClusterTrustBundleProjection feature gate.\n\nClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector.\n\nKubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time.", - Ref: ref("k8s.io/api/core/v1.ClusterTrustBundleProjection"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.ClusterTrustBundleProjection", "k8s.io/api/core/v1.ConfigMapProjection", "k8s.io/api/core/v1.DownwardAPIProjection", "k8s.io/api/core/v1.SecretProjection", "k8s.io/api/core/v1.ServiceAccountTokenProjection"}, - } -} - -func schema_k8sio_api_core_v1_VolumeResourceRequirements(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "VolumeResourceRequirements describes the storage resource requirements for a volume.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "limits": { - SchemaProps: spec.SchemaProps{ - Description: "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - "requests": { - SchemaProps: spec.SchemaProps{ - 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. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/api/resource.Quantity"}, - } -} - -func schema_k8sio_api_core_v1_VolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents the source of a volume to mount. Only one of its members may be specified.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "hostPath": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.HostPathVolumeSource"), - }, - }, - "emptyDir": { - SchemaProps: spec.SchemaProps{ - Description: "emptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - Ref: ref("k8s.io/api/core/v1.EmptyDirVolumeSource"), - }, - }, - "gcePersistentDisk": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GCEPersistentDiskVolumeSource"), - }, - }, - "awsElasticBlockStore": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource"), - }, - }, - "gitRepo": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GitRepoVolumeSource"), - }, - }, - "secret": { - SchemaProps: spec.SchemaProps{ - Description: "secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - Ref: ref("k8s.io/api/core/v1.SecretVolumeSource"), - }, - }, - "nfs": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.NFSVolumeSource"), - }, - }, - "iscsi": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.ISCSIVolumeSource"), - }, - }, - "glusterfs": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.GlusterfsVolumeSource"), - }, - }, - "persistentVolumeClaim": { - SchemaProps: spec.SchemaProps{ - Description: "persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - Ref: ref("k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource"), - }, - }, - "rbd": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.RBDVolumeSource"), - }, - }, - "flexVolume": { - SchemaProps: spec.SchemaProps{ - Description: "flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.", - Ref: ref("k8s.io/api/core/v1.FlexVolumeSource"), - }, - }, - "cinder": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/api/core/v1.CinderVolumeSource"), - }, - }, - "cephfs": { - SchemaProps: spec.SchemaProps{ - Description: "cephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.CephFSVolumeSource"), - }, - }, - "flocker": { - SchemaProps: spec.SchemaProps{ - Description: "flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - Ref: ref("k8s.io/api/core/v1.FlockerVolumeSource"), - }, - }, - "downwardAPI": { - SchemaProps: spec.SchemaProps{ - Description: "downwardAPI represents downward API about the pod that should populate this volume", - Ref: ref("k8s.io/api/core/v1.DownwardAPIVolumeSource"), - }, - }, - "fc": { - SchemaProps: spec.SchemaProps{ - Description: "fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - Ref: ref("k8s.io/api/core/v1.FCVolumeSource"), - }, - }, - "azureFile": { - SchemaProps: spec.SchemaProps{ - Description: "azureFile represents an Azure File Service mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureFileVolumeSource"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "configMap represents a configMap that should populate this volume", - Ref: ref("k8s.io/api/core/v1.ConfigMapVolumeSource"), - }, - }, - "vsphereVolume": { - SchemaProps: spec.SchemaProps{ - Description: "vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"), - }, - }, - "quobyte": { - SchemaProps: spec.SchemaProps{ - Description: "quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - Ref: ref("k8s.io/api/core/v1.QuobyteVolumeSource"), - }, - }, - "azureDisk": { - SchemaProps: spec.SchemaProps{ - Description: "azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - Ref: ref("k8s.io/api/core/v1.AzureDiskVolumeSource"), - }, - }, - "photonPersistentDisk": { - SchemaProps: spec.SchemaProps{ - Description: "photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource"), - }, - }, - "projected": { - SchemaProps: spec.SchemaProps{ - Description: "projected items for all in one resources secrets, configmaps, and downward API", - Ref: ref("k8s.io/api/core/v1.ProjectedVolumeSource"), - }, - }, - "portworxVolume": { - SchemaProps: spec.SchemaProps{ - Description: "portworxVolume represents a portworx volume attached and mounted on kubelets host machine", - Ref: ref("k8s.io/api/core/v1.PortworxVolumeSource"), - }, - }, - "scaleIO": { - SchemaProps: spec.SchemaProps{ - Description: "scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.ScaleIOVolumeSource"), - }, - }, - "storageos": { - SchemaProps: spec.SchemaProps{ - Description: "storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - Ref: ref("k8s.io/api/core/v1.StorageOSVolumeSource"), - }, - }, - "csi": { - SchemaProps: spec.SchemaProps{ - Description: "csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).", - Ref: ref("k8s.io/api/core/v1.CSIVolumeSource"), - }, - }, - "ephemeral": { - SchemaProps: spec.SchemaProps{ - 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.", - Ref: ref("k8s.io/api/core/v1.EphemeralVolumeSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.AWSElasticBlockStoreVolumeSource", "k8s.io/api/core/v1.AzureDiskVolumeSource", "k8s.io/api/core/v1.AzureFileVolumeSource", "k8s.io/api/core/v1.CSIVolumeSource", "k8s.io/api/core/v1.CephFSVolumeSource", "k8s.io/api/core/v1.CinderVolumeSource", "k8s.io/api/core/v1.ConfigMapVolumeSource", "k8s.io/api/core/v1.DownwardAPIVolumeSource", "k8s.io/api/core/v1.EmptyDirVolumeSource", "k8s.io/api/core/v1.EphemeralVolumeSource", "k8s.io/api/core/v1.FCVolumeSource", "k8s.io/api/core/v1.FlexVolumeSource", "k8s.io/api/core/v1.FlockerVolumeSource", "k8s.io/api/core/v1.GCEPersistentDiskVolumeSource", "k8s.io/api/core/v1.GitRepoVolumeSource", "k8s.io/api/core/v1.GlusterfsVolumeSource", "k8s.io/api/core/v1.HostPathVolumeSource", "k8s.io/api/core/v1.ISCSIVolumeSource", "k8s.io/api/core/v1.NFSVolumeSource", "k8s.io/api/core/v1.PersistentVolumeClaimVolumeSource", "k8s.io/api/core/v1.PhotonPersistentDiskVolumeSource", "k8s.io/api/core/v1.PortworxVolumeSource", "k8s.io/api/core/v1.ProjectedVolumeSource", "k8s.io/api/core/v1.QuobyteVolumeSource", "k8s.io/api/core/v1.RBDVolumeSource", "k8s.io/api/core/v1.ScaleIOVolumeSource", "k8s.io/api/core/v1.SecretVolumeSource", "k8s.io/api/core/v1.StorageOSVolumeSource", "k8s.io/api/core/v1.VsphereVirtualDiskVolumeSource"}, - } -} - -func schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents a vSphere volume resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "volumePath": { - SchemaProps: spec.SchemaProps{ - Description: "volumePath is the path that identifies vSphere volume vmdk", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "fsType": { - SchemaProps: spec.SchemaProps{ - Description: "fsType is 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{"string"}, - Format: "", - }, - }, - "storagePolicyName": { - SchemaProps: spec.SchemaProps{ - Description: "storagePolicyName is the storage Policy Based Management (SPBM) profile name.", - Type: []string{"string"}, - Format: "", - }, - }, - "storagePolicyID": { - SchemaProps: spec.SchemaProps{ - Description: "storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"volumePath"}, - }, - }, - } -} - -func schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "weight": { - SchemaProps: spec.SchemaProps{ - Description: "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "podAffinityTerm": { - SchemaProps: spec.SchemaProps{ - Description: "Required. A pod affinity term, associated with the corresponding weight.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/api/core/v1.PodAffinityTerm"), - }, - }, - }, - Required: []string{"weight", "podAffinityTerm"}, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.PodAffinityTerm"}, - } -} - -func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "WindowsSecurityContextOptions contain Windows-specific options and credentials.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "gmsaCredentialSpecName": { - SchemaProps: spec.SchemaProps{ - Description: "GMSACredentialSpecName is the name of the GMSA credential spec to use.", - Type: []string{"string"}, - Format: "", - }, - }, - "gmsaCredentialSpec": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "runAsUserName": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "hostProcess": { - SchemaProps: spec.SchemaProps{ - Description: "HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apimachinery_pkg_api_resource_Quantity(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.EmbedOpenAPIDefinitionIntoV2Extension(common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\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\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 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.", - OneOf: common.GenerateOpenAPIV3OneOfSchema(resource.Quantity{}.OpenAPIV3OneOfTypes()), - Format: resource.Quantity{}.OpenAPISchemaFormat(), - }, - }, - }, common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\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\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 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: resource.Quantity{}.OpenAPISchemaType(), - Format: resource.Quantity{}.OpenAPISchemaFormat(), - }, - }, - }) -} - -func schema_apimachinery_pkg_api_resource_int64Amount(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "int64Amount represents a fixed precision numerator and arbitrary scale exponent. It is faster than operations on inf.Dec for values that can be represented as int64.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "value": { - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int64", - }, - }, - "scale": { - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"value", "scale"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIGroup contains the name, the supported versions, and the preferred version of a group.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the name of the group.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions are the versions supported in this group.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), - }, - }, - }, - }, - }, - "preferredVersion": { - SchemaProps: spec.SchemaProps{ - Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), - }, - }, - "serverAddressByClientCIDRs": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), - }, - }, - }, - }, - }, - }, - Required: []string{"name", "versions"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery", "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, - } -} - -func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "groups": { - SchemaProps: spec.SchemaProps{ - Description: "groups is a list of APIGroup.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), - }, - }, - }, - }, - }, - }, - Required: []string{"groups"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"}, - } -} - -func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "APIResource specifies the name of a resource and whether it is namespaced.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is the plural name of the resource.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "singularName": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "namespaced": { - SchemaProps: spec.SchemaProps{ - Description: "namespaced indicates if a resource is namespaced or not.", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "verbs": { - SchemaProps: spec.SchemaProps{ - Description: "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "shortNames": { - SchemaProps: spec.SchemaProps{ - Description: "shortNames is a list of suggested short names of the resource.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "categories": { - SchemaProps: spec.SchemaProps{ - Description: "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "storageVersionHash": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "singularName", "namespaced", "kind", "verbs"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "groupVersion": { - SchemaProps: spec.SchemaProps{ - Description: "groupVersion is the group and version this APIResourceList is for.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "resources contains the name of the resources and if they are namespaced.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), - }, - }, - }, - }, - }, - }, - Required: []string{"groupVersion", "resources"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"}, - } -} - -func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "versions": { - SchemaProps: spec.SchemaProps{ - Description: "versions are the api versions that are available.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "serverAddressByClientCIDRs": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), - }, - }, - }, - }, - }, - }, - Required: []string{"versions", "serverAddressByClientCIDRs"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"}, - } -} - -func schema_pkg_apis_meta_v1_ApplyOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ApplyOptions may be provided when applying an API object. FieldManager is required for apply requests. ApplyOptions is equivalent to PatchOptions. It is provided as a convenience with documentation that speaks specifically to how the options fields relate to apply.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "dryRun": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "force": { - SchemaProps: spec.SchemaProps{ - Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people.", - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "fieldManager": { - SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"force", "fieldManager"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Condition contains details for one aspect of the current state of this API Resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "status of the condition, one of True, False, Unknown.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "observedGeneration": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - "lastTransitionTime": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "message is a human readable message indicating details about the transition. This may be an empty string.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status", "lastTransitionTime", "reason", "message"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "CreateOptions may be provided when creating an API object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "dryRun": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "fieldManager": { - SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldValidation": { - SchemaProps: spec.SchemaProps{ - Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "DeleteOptions may be provided when deleting an API object.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "gracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - "preconditions": { - SchemaProps: spec.SchemaProps{ - Description: "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"), - }, - }, - "orphanDependents": { - SchemaProps: spec.SchemaProps{ - 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: []string{"boolean"}, - Format: "", - }, - }, - "propagationPolicy": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "dryRun": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions"}, - } -} - -func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", - Type: v1.Duration{}.OpenAPISchemaType(), - Format: v1.Duration{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:', where is position of a item in a list 'k:', where 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: []string{"object"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GetOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GetOptions is the standard query options to the standard REST get call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "kind"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupResource specifies a Group and a Resource, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "resource"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group\" and the \"version\", which uniquely identifies the API.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "groupVersion": { - SchemaProps: spec.SchemaProps{ - Description: "groupVersion specifies the API group and version in the form \"group/version\"", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"groupVersion", "version"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "kind"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionResource unambiguously identifies a resource. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "resource"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "InternalEvent makes watch.Event versioned", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "Type": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "Object": { - SchemaProps: spec.SchemaProps{ - 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 Bookmark: the object (instance of a type being watched) where\n only ResourceVersion field is set. On successful restart of watch from a\n bookmark resourceVersion, client is guaranteed to not get repeat event\n nor miss any events.\n * If Type is Error: *api.Status is recommended; other types may make sense\n depending on context.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.Object"), - }, - }, - }, - Required: []string{"Type", "Object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.Object"}, - } -} - -func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "matchLabels": { - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "matchExpressions": { - SchemaProps: spec.SchemaProps{ - Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), - }, - }, - }, - }, - }, - }, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, - } -} - -func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "key": { - SchemaProps: spec.SchemaProps{ - Description: "key is the label key that the selector applies to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "operator": { - SchemaProps: spec.SchemaProps{ - Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"key", "operator"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "List holds a list of objects, which may not be known by the server.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "List of objects", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_pkg_apis_meta_v1_ListMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "continue": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "remainingItemCount": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_ListOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ListOptions is the query options to a standard REST list call.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "labelSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldSelector": { - SchemaProps: spec.SchemaProps{ - Description: "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - Type: []string{"string"}, - Format: "", - }, - }, - "watch": { - SchemaProps: spec.SchemaProps{ - Description: "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "allowWatchBookmarks": { - SchemaProps: spec.SchemaProps{ - Description: "allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersionMatch": { - SchemaProps: spec.SchemaProps{ - Description: "resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.\n\nDefaults to unset", - Type: []string{"string"}, - Format: "", - }, - }, - "timeoutSeconds": { - SchemaProps: spec.SchemaProps{ - Description: "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "limit": { - SchemaProps: spec.SchemaProps{ - Description: "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "continue": { - SchemaProps: spec.SchemaProps{ - Description: "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - Type: []string{"string"}, - Format: "", - }, - }, - "sendInitialEvents": { - SchemaProps: spec.SchemaProps{ - Description: "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "manager": { - SchemaProps: spec.SchemaProps{ - Description: "Manager is an identifier of the workflow managing these fields.", - Type: []string{"string"}, - Format: "", - }, - }, - "operation": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "time": { - SchemaProps: spec.SchemaProps{ - Description: "Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "fieldsType": { - SchemaProps: spec.SchemaProps{ - Description: "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldsV1": { - SchemaProps: spec.SchemaProps{ - Description: "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1"), - }, - }, - "subresource": { - SchemaProps: spec.SchemaProps{ - Description: "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_meta_v1_MicroTime(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "MicroTime is version of Time with microsecond level precision.", - Type: v1.MicroTime{}.OpenAPISchemaType(), - Format: v1.MicroTime{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - 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: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", - Type: []string{"string"}, - Format: "", - }, - }, - "generateName": { - SchemaProps: spec.SchemaProps{ - 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 return a 409.\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{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - 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: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces", - Type: []string{"string"}, - Format: "", - }, - }, - "selfLink": { - SchemaProps: spec.SchemaProps{ - Description: "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - 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: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "generation": { - SchemaProps: spec.SchemaProps{ - Description: "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - Type: []string{"integer"}, - Format: "int64", - }, - }, - "creationTimestamp": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionTimestamp": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "deletionGracePeriodSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int64", - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - 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: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "annotations": { - SchemaProps: spec.SchemaProps{ - 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: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "ownerReferences": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), - }, - }, - }, - }, - }, - "finalizers": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-patch-strategy": "merge", - }, - }, - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "managedFields": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry", "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "API version of the referent.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "controller": { - SchemaProps: spec.SchemaProps{ - Description: "If true, this reference points to the managing controller.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "blockOwnerDeletion": { - SchemaProps: spec.SchemaProps{ - 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. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"apiVersion", "kind", "name", "uid"}, - }, - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-map-type": "atomic", - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadata is a generic representation of any object with ObjectMeta. It allows clients to get access to a particular ObjectMeta schema without knowing the details of the version.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PartialObjectMetadataList contains a list of objects containing only their metadata", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Description: "items contains each of the included items.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"}, - } -} - -func schema_pkg_apis_meta_v1_Patch(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", - Type: []string{"object"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "PatchOptions may be provided when patching an API object. PatchOptions is meant to be a superset of UpdateOptions.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "dryRun": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "force": { - SchemaProps: spec.SchemaProps{ - Description: "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "fieldManager": { - SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldValidation": { - SchemaProps: spec.SchemaProps{ - Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Preconditions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the target UID.", - Type: []string{"string"}, - Format: "", - }, - }, - "resourceVersion": { - SchemaProps: spec.SchemaProps{ - Description: "Specifies the target ResourceVersion", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RootPaths lists the paths available at root. For example: \"/healthz\", \"/apis\".", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "paths": { - SchemaProps: spec.SchemaProps{ - Description: "paths are the paths available at root.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"paths"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "clientCIDR": { - SchemaProps: spec.SchemaProps{ - Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "serverAddress": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"clientCIDR", "serverAddress"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Status is a return value for calls that don't return other objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the status of this operation.", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "details": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"), - }, - }, - "code": { - SchemaProps: spec.SchemaProps{ - Description: "Suggested HTTP return code for this status, 0 if not set.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails"}, - } -} - -func schema_pkg_apis_meta_v1_StatusCause(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - Type: []string{"string"}, - Format: "", - }, - }, - "field": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - Type: []string{"string"}, - Format: "", - }, - }, - "group": { - SchemaProps: spec.SchemaProps{ - Description: "The group attribute of the resource associated with the status StatusReason.", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - 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{"string"}, - Format: "", - }, - }, - "uid": { - SchemaProps: spec.SchemaProps{ - Description: "UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids", - Type: []string{"string"}, - Format: "", - }, - }, - "causes": { - SchemaProps: spec.SchemaProps{ - Description: "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), - }, - }, - }, - }, - }, - "retryAfterSeconds": { - SchemaProps: spec.SchemaProps{ - 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: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"}, - } -} - -func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Table is a tabular representation of a set of API resources. The server transforms the object into a set of preferred columns for quickly reviewing the objects.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "columnDefinitions": { - SchemaProps: spec.SchemaProps{ - Description: "columnDefinitions describes each column in the returned items array. The number of cells per row will always match the number of column definitions.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), - }, - }, - }, - }, - }, - "rows": { - SchemaProps: spec.SchemaProps{ - Description: "rows is the list of items in the table.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), - }, - }, - }, - }, - }, - }, - Required: []string{"columnDefinitions", "rows"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition", "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"}, - } -} - -func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableColumnDefinition contains information about a column returned in the Table.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name is a human readable name for the column.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "format": { - SchemaProps: spec.SchemaProps{ - Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' 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 more.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Description: "description is a human readable description of this column.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "priority": { - SchemaProps: spec.SchemaProps{ - 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 higher priority.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"name", "type", "format", "description", "priority"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TableOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableOptions are used when a Table is requested by the caller.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "includeObject": { - SchemaProps: spec.SchemaProps{ - Description: "includeObject decides whether to include each object along with its columnar information. Specifying \"None\" will return no object, specifying \"Object\" will return the full object contents, and specifying \"Metadata\" (the default) will return the object's metadata in the PartialObjectMetadata kind in version v1beta1 of the meta.k8s.io API group.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableRow is an individual row in a table.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "cells": { - SchemaProps: spec.SchemaProps{ - Description: "cells will be as wide as the column definitions array and may contain strings, numbers (float64 or int64), booleans, simple maps, lists, or null. See the type field of the column definition for a more detailed description.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Format: "", - }, - }, - }, - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "conditions describe additional status of a row that are relevant for a human user. These conditions apply to the row, not to the object, and will be specific to table output. The only defined condition type is 'Completed', for a row that indicates a resource that has run to completion and can be given less visual priority.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), - }, - }, - }, - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"cells"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition", "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TableRowCondition allows a row to be marked with additional information.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Description: "Status of the condition, one of True, False, Unknown.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "reason": { - SchemaProps: spec.SchemaProps{ - Description: "(brief) machine readable reason for the condition's last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - "message": { - SchemaProps: spec.SchemaProps{ - Description: "Human readable message indicating details about last transition.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Time(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: v1.Time{}.OpenAPISchemaType(), - Format: v1.Time{}.OpenAPISchemaFormat(), - }, - }, - } -} - -func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Timestamp is a struct that is equivalent to Time, but intended for protobuf marshalling/unmarshalling. It is generated into a serialization that matches Time. Do not use in Go structs.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "seconds": { - SchemaProps: spec.SchemaProps{ - Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", - Default: 0, - Type: []string{"integer"}, - Format: "int64", - }, - }, - "nanos": { - SchemaProps: spec.SchemaProps{ - Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"seconds", "nanos"}, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta describes an individual object in an API response or request with strings representing the type of the object and its API schema version. Structures that are versioned or persisted should inline TypeMeta.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "dryRun": { - SchemaProps: spec.SchemaProps{ - 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: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "fieldManager": { - SchemaProps: spec.SchemaProps{ - Description: "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.", - Type: []string{"string"}, - Format: "", - }, - }, - "fieldValidation": { - SchemaProps: spec.SchemaProps{ - Description: "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Event represents a single event to a watched resource.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "object": { - SchemaProps: spec.SchemaProps{ - 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: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"type", "object"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.Object `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// External package:\n\n\ttype MyAPIObject struct {\n\t\truntime.TypeMeta `json:\",inline\"`\n\t\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n\t}\n\n\ttype PluginA struct {\n\t\tAOption string `json:\"aOption\"`\n\t}\n\n// On the wire, the JSON will look something like this:\n\n\t{\n\t\t\"kind\":\"MyAPIObject\",\n\t\t\"apiVersion\":\"v1\",\n\t\t\"myPlugin\": {\n\t\t\t\"kind\":\"PluginA\",\n\t\t\t\"aOption\":\"foo\",\n\t\t},\n\t}\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: []string{"object"}, - }, - }, - } -} - -func schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TypeMeta is shared by all top level objects. The proper way to use it is to inline it in your type, like this:\n\n\ttype MyAwesomeAPIObject struct {\n\t runtime.TypeMeta `json:\",inline\"`\n\t ... // other fields\n\t}\n\nfunc (obj *MyAwesomeAPIObject) SetGroupVersionKind(gvk *metav1.GroupVersionKind) { metav1.UpdateTypeMeta(obj,gvk) }; GroupVersionKind() *GroupVersionKind\n\nTypeMeta is provided here for convenience. You may use it directly from this package or define your own with the same fields.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Unknown allows api objects with unknown types to be passed-through. This can be used to deal with the API objects from a plug-in. Unknown objects still have functioning TypeMeta features-- kind, version, etc. metadata and field mutatation.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "ContentEncoding": { - SchemaProps: spec.SchemaProps{ - Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "ContentType": { - SchemaProps: spec.SchemaProps{ - Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"ContentEncoding", "ContentType"}, - }, - }, - } -} - -func schema_apimachinery_pkg_util_intstr_IntOrString(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.EmbedOpenAPIDefinitionIntoV2Extension(common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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.", - OneOf: common.GenerateOpenAPIV3OneOfSchema(intstr.IntOrString{}.OpenAPIV3OneOfTypes()), - Format: intstr.IntOrString{}.OpenAPISchemaFormat(), - }, - }, - }, common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - 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: intstr.IntOrString{}.OpenAPISchemaType(), - Format: intstr.IntOrString{}.OpenAPISchemaFormat(), - }, - }, - }) -} - -func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Info contains versioning information. how we'll want to distribute that information.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "major": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "minor": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "gitVersion": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "gitCommit": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "gitTreeState": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "buildDate": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "goVersion": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "compiler": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "platform": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"major", "minor", "gitVersion", "gitCommit", "gitTreeState", "buildDate", "goVersion", "compiler", "platform"}, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_Action(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "operationId": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "flow": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "disabled": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - }, - Required: []string{"operationId", "flow", "disabled"}, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.Action"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.Action"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "operationId": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "flow": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "disabledTemplate": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "enforceQuota": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"operationId", "flow", "enforceQuota"}, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ActionTemplateGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ActionTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplate"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_BootstrapPresets(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "offlineInstaller": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "image": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec"), - }, - }, - "registry": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"), - }, - }, - "helm": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmInfo"), - }, - }, - }, - Required: []string{"image", "registry", "helm"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.HelmInfo", "kmodules.xyz/resource-metadata/apis/shared.ImageRegistrySpec", "kmodules.xyz/resource-metadata/apis/shared.RegistryInfo"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "title": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "vars": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.DashboardVar"), - }, - }, - }, - }, - }, - "panels": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "if": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.If"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.DashboardVar", "kmodules.xyz/resource-metadata/apis/shared.If"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_DashboardVar(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "value"}, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_DeploymentParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "productID": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "planID": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "chart": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_HelmInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "repositories": { - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRepository"), - }, - }, - }, - }, - }, - "releases": { - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.HelmRelease"), - }, - }, - }, - }, - }, - }, - Required: []string{"repositories", "releases"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.HelmRelease", "kmodules.xyz/resource-metadata/apis/shared.HelmRepository"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "enabled": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), - }, - }, - }, - Required: []string{"enabled", "version"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/runtime.RawExtension"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_HelmRepository(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "url": { - SchemaProps: spec.SchemaProps{ - Description: "URL of the Helm repository, a valid URL contains at least a protocol and host.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "secretName": { - SchemaProps: spec.SchemaProps{ - Description: "SecretRef specifies the Secret containing authentication credentials for the HelmRepository. For HTTP/S basic auth the secret must contain 'username' and 'password' fields. For TLS the secret must contain a 'certFile' and 'keyFile', and/or 'caFile' fields.", - Type: []string{"string"}, - Format: "", - }, - }, - "interval": { - SchemaProps: spec.SchemaProps{ - Description: "Interval at which to check the URL for updates.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "timeout": { - SchemaProps: spec.SchemaProps{ - Description: "The timeout of index downloading, defaults to 60s.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"), - }, - }, - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of the HelmRepository. When this field is set to \"oci\", the URL field value must be prefixed with \"oci://\".", - Type: []string{"string"}, - Format: "", - }, - }, - "provider": { - SchemaProps: spec.SchemaProps{ - Description: "Provider used for authentication, can be 'aws', 'azure', 'gcp' or 'generic'. This field is optional, and only taken into account if the .spec.type field is set to 'oci'. When not specified, defaults to 'generic'.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"url"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_If(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "condition": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "connected": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceLocator"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ResourceLocator"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ImageRegistrySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "proxies": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.RegistryProxies"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "credentials": { - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_RegistryProxies(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "dockerHub": { - SchemaProps: spec.SchemaProps{ - Description: "company/bin:1.23", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "dockerLibrary": { - SchemaProps: spec.SchemaProps{ - Description: "alpine, nginx etc.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "ghcr": { - SchemaProps: spec.SchemaProps{ - Description: "ghcr.io", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "quay": { - SchemaProps: spec.SchemaProps{ - Description: "quay.io", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kubernetes": { - SchemaProps: spec.SchemaProps{ - Description: "registry.k8s.io", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "appscode": { - SchemaProps: spec.SchemaProps{ - Description: "r.appscode.com", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "ref": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind"), - }, - }, - "query": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), - }, - }, - }, - Required: []string{"ref", "query"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind", "kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceQuery(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "byLabel": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "raw": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"type"}, - }, - }, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_SourceLocator(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resource": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.ResourceID"), - }, - }, - "ref": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.ObjectReference"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.ObjectReference", "kmodules.xyz/client-go/api/v1.ResourceID"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_UIParameterTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "options": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "enforceQuota": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "actions": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup"), - }, - }, - }, - }, - }, - "instanceLabelPaths": { - SchemaProps: spec.SchemaProps{ - Description: "app.kubernetes.io/instance label must be updated at these paths when refilling metadata", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"enforceQuota"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ActionTemplateGroup", "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, - } -} - -func schema_kmodulesxyz_resource_metadata_apis_shared_UIParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "options": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "actions": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ActionGroup"), - }, - }, - }, - }, - }, - "instanceLabelPaths": { - SchemaProps: spec.SchemaProps{ - Description: "app.kubernetes.io/instance label must be updated at these paths when refilling metadata", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.ActionGroup", "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ActionTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "operationId": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "flow": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "disabledTemplate": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "enforceQuota": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"operationId", "flow", "enforceQuota"}, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ActionTemplateGroup(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplate"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplate"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ChartInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name specifies the name of the chart", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace where the respective feature resources will be deployed.", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Description: "Version specifies the version of the chart.", - Type: []string{"string"}, - Format: "", - }, - }, - "sourceRef": { - SchemaProps: spec.SchemaProps{ - Description: "SourceRef specifies the source of the chart", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.TypedObjectReference"), - }, - }, - }, - Required: []string{"name", "sourceRef"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.TypedObjectReference"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ComponentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name specify the name of the component feature.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "enabled": { - SchemaProps: spec.SchemaProps{ - Description: "Enabled specifies whether the component feature has been enabled or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "ready": { - SchemaProps: spec.SchemaProps{ - Description: "Ready specifies whether the component feature is ready or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "managed": { - SchemaProps: spec.SchemaProps{ - Description: "Managed specifies whether the component is managed by platform or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"name"}, - }, - }, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "title": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "vars": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.DashboardVar"), - }, - }, - }, - }, - }, - "panels": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.PanelLinkRequest"), - }, - }, - }, - }, - }, - "if": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.If"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/shared.DashboardVar", "kmodules.xyz/resource-metadata/apis/shared.If", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.PanelLinkRequest"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_DependentFeatureSet(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name specifies the name of the dependent FeatureSet", - Type: []string{"string"}, - Format: "", - }, - }, - "features": { - SchemaProps: spec.SchemaProps{ - Description: "Features specifies the Feature names of the dependent FeatureSet", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_Dependents(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "featureSets": { - SchemaProps: spec.SchemaProps{ - Description: "FeatureSets specifies a list of FeatureSet names that depend on this FeatureSet", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.DependentFeatureSet"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.DependentFeatureSet"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_Feature(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSpec", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureStatus"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_FeatureList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Feature"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Feature"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_FeatureSet(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSetSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSetStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSetSpec", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSetStatus"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_FeatureSetList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSet"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.FeatureSet"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_FeatureSetSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "title": { - SchemaProps: spec.SchemaProps{ - Description: "Title specify the title of this feature set.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Description: "Description specifies a short description of the services this feature set provides.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Description: "Icons is an optional list of icons for an application. Icon information includes the source, size, and mime type. These icons will be used in UI.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "recommended": { - SchemaProps: spec.SchemaProps{ - Description: "Required specify whether this feature set is mandatory or not for using the UI.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "requiredFeatures": { - SchemaProps: spec.SchemaProps{ - Description: "RequiredFeatures specifies list of features that are necessary to consider this feature set as ready.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "chart": { - SchemaProps: spec.SchemaProps{ - Description: "Chart specifies the chart that contains the respective resources for component features and the UI wizard.", - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - }, - Required: []string{"title", "description", "chart"}, - }, - }, - Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_FeatureSetStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "enabled": { - SchemaProps: spec.SchemaProps{ - Description: "Enabled specifies whether this feature set is enabled or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "ready": { - SchemaProps: spec.SchemaProps{ - Description: "Ready specifies whether this feature set is ready not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "features": { - SchemaProps: spec.SchemaProps{ - Description: "Features specifies the status of the component features that belong to this feature set.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ComponentStatus"), - }, - }, - }, - }, - }, - "dependents": { - SchemaProps: spec.SchemaProps{ - Description: "Dependents specifies the feature sets which depend on this FeatureSet", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Dependents"), - }, - }, - "note": { - SchemaProps: spec.SchemaProps{ - Description: "Note specifies the respective reason if the feature set is considered as disabled.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ComponentStatus", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Dependents"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_FeatureSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "title": { - SchemaProps: spec.SchemaProps{ - Description: "Title specifies the title of this feature.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Description: "Description specifies a short description of the service this feature provides.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Description: "Icons is an optional list of icons for an application. Icon information includes the source, size, and mime type. These icons will be used in UI.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "featureSet": { - SchemaProps: spec.SchemaProps{ - Description: "FeatureSet specifies the name of the FeatureSet where this feature belong to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "featureBlock": { - SchemaProps: spec.SchemaProps{ - Description: "FeatureBlock specifies the ui block name of this feature.", - Type: []string{"string"}, - Format: "", - }, - }, - "recommended": { - SchemaProps: spec.SchemaProps{ - Description: "Required specifies whether this feature is mandatory or not for enabling the respecting FeatureSet.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "requirements": { - SchemaProps: spec.SchemaProps{ - Description: "Requirements specifies the requirements to enable this feature.", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Requirements"), - }, - }, - "readinessChecks": { - SchemaProps: spec.SchemaProps{ - Description: "ReadinessChecks specifies the conditions for this feature to be considered enabled.", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ReadinessChecks"), - }, - }, - "chart": { - SchemaProps: spec.SchemaProps{ - Description: "Chart specifies the chart information that will be used by the FluxCD to install the respective feature", - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo"), - }, - }, - "values": { - SchemaProps: spec.SchemaProps{ - Description: "Values holds the values for this Helm release.", - Ref: ref("k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON"), - }, - }, - }, - Required: []string{"title", "description", "featureSet"}, - }, - }, - Dependencies: []string{ - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1.JSON", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ChartInfo", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ReadinessChecks", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Requirements", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_FeatureStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "enabled": { - SchemaProps: spec.SchemaProps{ - Description: "Enabled specifies whether this feature is enabled or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "managed": { - SchemaProps: spec.SchemaProps{ - Description: "Managed specifies whether this feature is managed by AppsCode Inc. or not.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "ready": { - SchemaProps: spec.SchemaProps{ - Description: "Ready specifies whether this feature is ready to user or not. This field will be present only for the features that are managed by AppsCode Inc.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "note": { - SchemaProps: spec.SchemaProps{ - Description: "Note specifies the respective reason if the feature does not meet the requirements or is not ready.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_PanelLinkRequest(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "title": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "width": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"title"}, - }, - }, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ReadinessChecks(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resources": { - SchemaProps: spec.SchemaProps{ - Description: "Resources specifies the resources that should be registered to consider this feature as enabled.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), - }, - }, - }, - }, - }, - "workloads": { - SchemaProps: spec.SchemaProps{ - Description: "Workloads specifies the workloads that should exist to consider this feature as enabled.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.WorkloadInfo"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.WorkloadInfo"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_Requirements(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "features": { - SchemaProps: spec.SchemaProps{ - Description: "Features specifies a list of Feature names that must be enabled for using this feature.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ResourceDashboard(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceDashboardSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceDashboardSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ResourceDashboardList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceDashboard"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceDashboard"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ResourceDashboardSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resource": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.ResourceID"), - }, - }, - "provider": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "dashboards": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Dashboard"), - }, - }, - }, - }, - }, - }, - Required: []string{"resource", "dashboards"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.ResourceID", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.Dashboard"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ResourceEditor(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditorSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditorSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ResourceEditorList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditor"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ResourceEditor"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_ResourceEditorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "resource": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/client-go/api/v1.ResourceID"), - }, - }, - "ui": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.UIParameters"), - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Description: "Icons is an optional list of icons for an application. Icon information includes the source, size, and mime type.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - "variants": { - SchemaProps: spec.SchemaProps{ - Description: "Kind == VendorChartPreset | ClusterChartPreset", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.VariantRef"), - }, - }, - }, - }, - }, - "installer": { - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters"), - }, - }, - }, - Required: []string{"resource"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/client-go/api/v1.ResourceID", "kmodules.xyz/resource-metadata/apis/shared.DeploymentParameters", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.UIParameters", "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.VariantRef", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_UIParameters(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "options": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "editor": { - SchemaProps: spec.SchemaProps{ - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"), - }, - }, - "enforceQuota": { - SchemaProps: spec.SchemaProps{ - Default: false, - Type: []string{"boolean"}, - Format: "", - }, - }, - "instanceLabelPaths": { - SchemaProps: spec.SchemaProps{ - Description: "app.kubernetes.io/instance label must be updated at these paths when refilling metadata", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "actions": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroup"), - }, - }, - }, - }, - }, - }, - Required: []string{"enforceQuota"}, - }, - }, - Dependencies: []string{ - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1.ActionTemplateGroup", "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceRef"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_VariantRef(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "title": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), - }, - }, - "icons": { - SchemaProps: spec.SchemaProps{ - Description: "Icons is an optional list of icons for an application. Icon information includes the source, size, and mime type.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("x-helm.dev/apimachinery/apis/shared.ImageSpec"), - }, - }, - }, - }, - }, - }, - Required: []string{"name"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector", "x-helm.dev/apimachinery/apis/shared.ImageSpec"}, - } -} - -func schema_resource_metadata_apis_ui_v1alpha1_WorkloadInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "selector": { - SchemaProps: spec.SchemaProps{ - Description: "Selector specifies label selector that should be used to select this workload", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - Required: []string{"group", "version", "kind", "selector"}, - }, - }, - } -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/register.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/register.go deleted file mode 100644 index 8c42fe15..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/register.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "kmodules.xyz/resource-metadata/apis/ui" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var SchemeGroupVersion = schema.GroupVersion{Group: ui.GroupName, Version: "v1alpha1"} - -var ( - // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. - // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes) -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &ResourceEditor{}, - &ResourceEditorList{}, - &ResourceDashboard{}, - &ResourceDashboardList{}, - &Feature{}, - &FeatureList{}, - &FeatureSet{}, - &FeatureSetList{}, - ) - - scheme.AddKnownTypes(SchemeGroupVersion, - &metav1.Status{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourcedashboard_helpers.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourcedashboard_helpers.go deleted file mode 100644 index 6fa2417b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourcedashboard_helpers.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "kmodules.xyz/client-go/apiextensions" - "kmodules.xyz/resource-metadata/crds" -) - -func (v ResourceDashboard) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourceResourceDashboards)) -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourcedashboard_types.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourcedashboard_types.go deleted file mode 100644 index 32ba3bf3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourcedashboard_types.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - kmapi "kmodules.xyz/client-go/api/v1" - "kmodules.xyz/resource-metadata/apis/shared" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - ResourceKindResourceDashboard = "ResourceDashboard" - ResourceResourceDashboard = "resourcedashboard" - ResourceResourceDashboards = "resourcedashboards" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=resourcedashboards,singular=resourcedashboard,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -type ResourceDashboard struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ResourceDashboardSpec `json:"spec,omitempty"` -} - -// +kubebuilder:validation:Enum=Grafana -type DashboardProvider string - -const ( - DashboardProviderGrafana DashboardProvider = "Grafana" -) - -type ResourceDashboardSpec struct { - Resource kmapi.ResourceID `json:"resource"` - Provider DashboardProvider `json:"provider,omitempty"` - Dashboards []Dashboard `json:"dashboards"` -} - -type Dashboard struct { - // +optional - Title string `json:"title,omitempty"` - // +optional - Vars []shared.DashboardVar `json:"vars,omitempty"` - // +optional - Panels []PanelLinkRequest `json:"panels,omitempty"` - // +optional - If *shared.If `json:"if,omitempty"` -} - -type PanelLinkRequest struct { - Title string `json:"title"` - // +optional - Width int `json:"width,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true - -type ResourceDashboardList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ResourceDashboard `json:"items,omitempty"` -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourceeditor_helpers.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourceeditor_helpers.go deleted file mode 100644 index d55222e0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourceeditor_helpers.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "kmodules.xyz/client-go/apiextensions" - "kmodules.xyz/resource-metadata/crds" -) - -func (v ResourceEditor) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(SchemeGroupVersion.WithResource(ResourceResourceEditors)) -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourceeditor_types.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourceeditor_types.go deleted file mode 100644 index e1f711f7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/resourceeditor_types.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - kmapi "kmodules.xyz/client-go/api/v1" - "kmodules.xyz/resource-metadata/apis/shared" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - releasesapi "x-helm.dev/apimachinery/apis/releases/v1alpha1" - helmshared "x-helm.dev/apimachinery/apis/shared" -) - -const ( - ResourceKindResourceEditor = "ResourceEditor" - ResourceResourceEditor = "resourceeditor" - ResourceResourceEditors = "resourceeditors" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=resourceeditors,singular=resourceeditor,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.phase" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" -type ResourceEditor struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ResourceEditorSpec `json:"spec,omitempty"` -} - -type ResourceEditorSpec struct { - Resource kmapi.ResourceID `json:"resource"` - UI *UIParameters `json:"ui,omitempty"` - // Icons is an optional list of icons for an application. Icon information includes the source, size, - // and mime type. - Icons []helmshared.ImageSpec `json:"icons,omitempty"` - // Kind == VendorChartPreset | ClusterChartPreset - Variants []VariantRef `json:"variants,omitempty"` - Installer *shared.DeploymentParameters `json:"installer,omitempty"` -} - -type UIParameters struct { - Options *releasesapi.ChartSourceRef `json:"options,omitempty"` - Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` - EnforceQuota bool `json:"enforceQuota"` - // app.kubernetes.io/instance label must be updated at these paths when refilling metadata - // +optional - InstanceLabelPaths []string `json:"instanceLabelPaths,omitempty"` - // +optional - Actions []*ActionTemplateGroup `json:"actions,omitempty"` -} - -type ActionTemplateGroup struct { - shared.ActionInfo `json:",inline,omitempty"` - Items []ActionTemplate `json:"items"` -} - -type ActionTemplate struct { - shared.ActionInfo `json:",inline,omitempty"` - // +optional - Icons []helmshared.ImageSpec `json:"icons,omitempty"` - OperationID string `json:"operationId"` - Flow string `json:"flow"` - DisabledTemplate string `json:"disabledTemplate,omitempty"` - Editor *releasesapi.ChartSourceRef `json:"editor,omitempty"` - EnforceQuota bool `json:"enforceQuota"` -} - -type VariantRef struct { - Name string `json:"name"` - Title string `json:"title,omitempty"` - Description string `json:"description,omitempty"` - Selector *metav1.LabelSelector `json:"selector,omitempty"` - - // Icons is an optional list of icons for an application. Icon information includes the source, size, - // and mime type. - Icons []helmshared.ImageSpec `json:"icons,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true - -type ResourceEditorList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ResourceEditor `json:"items,omitempty"` -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/schema.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/schema.go deleted file mode 100644 index fc06b1dc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/schema.go +++ /dev/null @@ -1,217 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import "gopkg.in/yaml.v2" - -const ( - ObjectMetaSchema = `properties: - name: - description: 'Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces" - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' - type: object - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' - type: object -type: object` - - ObjectMetaFullSchema = `properties: - name: - description: 'Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - namespace: - description: "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces" - type: string - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' - type: object - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' - type: object - 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 Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata" - format: date-time - type: string - 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. - format: int64 - type: integer - 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 Populated 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" - format: date-time - type: string - 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. - items: - type: string - type: array - 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 If 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 Applied 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. - format: int64 - type: integer - 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. - items: - description: ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. - 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. - type: object - 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' - format: date-time - type: string - type: object - type: array - 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. - items: - 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. - 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 - required: - - apiVersion - - kind - - name - - uid - type: object - type: array - 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 Populated 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 DEPRECATED 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 Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids" - type: string -type: object` -) - -func FormatMetadata(data []byte) ([]byte, error) { - var root yaml.MapSlice - err := yaml.Unmarshal(data, &root) - if err != nil { - return nil, err - } - - spec := find(root, "spec") - if spec == nil { - return data, nil - } - validation := find(spec.(yaml.MapSlice), "validation") - if validation == nil { - return data, nil - } - openAPIV3Schema := find(validation.(yaml.MapSlice), "openAPIV3Schema") - if openAPIV3Schema == nil { - return data, nil - } - prop1 := find(openAPIV3Schema.(yaml.MapSlice), "properties") - if prop1 == nil { - return data, nil - } - metadata := find(prop1.(yaml.MapSlice), "metadata") - if metadata == nil { - return data, nil - } - prop2 := find(metadata.(yaml.MapSlice), "properties") - if prop2 == nil { - return data, nil - } - p := prop2.(yaml.MapSlice) - moveToIndex(0, "name", p) - if moveToIndex(1, "namespace", p) { - moveToIndex(2, "labels", p) - moveToIndex(3, "annotations", p) - } else { - moveToIndex(1, "labels", p) - moveToIndex(2, "annotations", p) - } - - return yaml.Marshal(root) -} - -func find(node yaml.MapSlice, key string) interface{} { - for i := range node { - if node[i].Key.(string) == key { - return node[i].Value - } - } - return nil -} - -func moveToIndex(idx int, needle string, haystack yaml.MapSlice) bool { - if len(haystack) != idx && haystack[0].Key.(string) == needle { - return true - } - for i, elem := range haystack { - if elem.Key.(string) == needle { - haystack[idx], haystack[i] = haystack[i], haystack[idx] - return true - } - } - return false -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/types.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/types.go deleted file mode 100644 index 842ab95a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/types.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -type YAMLFormatter interface { - ToYAML() ([]byte, error) -} diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 84acea50..00000000 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,789 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - apisshared "kmodules.xyz/resource-metadata/apis/shared" - - v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - releasesv1alpha1 "x-helm.dev/apimachinery/apis/releases/v1alpha1" - shared "x-helm.dev/apimachinery/apis/shared" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionTemplate) DeepCopyInto(out *ActionTemplate) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) - copy(*out, *in) - } - if in.Editor != nil { - in, out := &in.Editor, &out.Editor - *out = new(releasesv1alpha1.ChartSourceRef) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionTemplate. -func (in *ActionTemplate) DeepCopy() *ActionTemplate { - if in == nil { - return nil - } - out := new(ActionTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ActionTemplateGroup) DeepCopyInto(out *ActionTemplateGroup) { - *out = *in - out.ActionInfo = in.ActionInfo - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ActionTemplate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionTemplateGroup. -func (in *ActionTemplateGroup) DeepCopy() *ActionTemplateGroup { - if in == nil { - return nil - } - out := new(ActionTemplateGroup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartInfo) DeepCopyInto(out *ChartInfo) { - *out = *in - out.SourceRef = in.SourceRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfo. -func (in *ChartInfo) DeepCopy() *ChartInfo { - if in == nil { - return nil - } - out := new(ChartInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentStatus) DeepCopyInto(out *ComponentStatus) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Ready != nil { - in, out := &in.Ready, &out.Ready - *out = new(bool) - **out = **in - } - if in.Managed != nil { - in, out := &in.Managed, &out.Managed - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatus. -func (in *ComponentStatus) DeepCopy() *ComponentStatus { - if in == nil { - return nil - } - out := new(ComponentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Dashboard) DeepCopyInto(out *Dashboard) { - *out = *in - if in.Vars != nil { - in, out := &in.Vars, &out.Vars - *out = make([]apisshared.DashboardVar, len(*in)) - copy(*out, *in) - } - if in.Panels != nil { - in, out := &in.Panels, &out.Panels - *out = make([]PanelLinkRequest, len(*in)) - copy(*out, *in) - } - if in.If != nil { - in, out := &in.If, &out.If - *out = new(apisshared.If) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dashboard. -func (in *Dashboard) DeepCopy() *Dashboard { - if in == nil { - return nil - } - out := new(Dashboard) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DependentFeatureSet) DeepCopyInto(out *DependentFeatureSet) { - *out = *in - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependentFeatureSet. -func (in *DependentFeatureSet) DeepCopy() *DependentFeatureSet { - if in == nil { - return nil - } - out := new(DependentFeatureSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Dependents) DeepCopyInto(out *Dependents) { - *out = *in - if in.FeatureSets != nil { - in, out := &in.FeatureSets, &out.FeatureSets - *out = make([]DependentFeatureSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependents. -func (in *Dependents) DeepCopy() *Dependents { - if in == nil { - return nil - } - out := new(Dependents) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Feature) DeepCopyInto(out *Feature) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. -func (in *Feature) DeepCopy() *Feature { - if in == nil { - return nil - } - out := new(Feature) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Feature) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureList) DeepCopyInto(out *FeatureList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Feature, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. -func (in *FeatureList) DeepCopy() *FeatureList { - if in == nil { - return nil - } - out := new(FeatureList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeatureList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureSet) DeepCopyInto(out *FeatureSet) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSet. -func (in *FeatureSet) DeepCopy() *FeatureSet { - if in == nil { - return nil - } - out := new(FeatureSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeatureSet) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureSetList) DeepCopyInto(out *FeatureSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]FeatureSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSetList. -func (in *FeatureSetList) DeepCopy() *FeatureSetList { - if in == nil { - return nil - } - out := new(FeatureSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *FeatureSetList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureSetSpec) DeepCopyInto(out *FeatureSetSpec) { - *out = *in - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) - copy(*out, *in) - } - if in.RequiredFeatures != nil { - in, out := &in.RequiredFeatures, &out.RequiredFeatures - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.Chart = in.Chart - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSetSpec. -func (in *FeatureSetSpec) DeepCopy() *FeatureSetSpec { - if in == nil { - return nil - } - out := new(FeatureSetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureSetStatus) DeepCopyInto(out *FeatureSetStatus) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Ready != nil { - in, out := &in.Ready, &out.Ready - *out = new(bool) - **out = **in - } - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]ComponentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Dependents.DeepCopyInto(&out.Dependents) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSetStatus. -func (in *FeatureSetStatus) DeepCopy() *FeatureSetStatus { - if in == nil { - return nil - } - out := new(FeatureSetStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureSpec) DeepCopyInto(out *FeatureSpec) { - *out = *in - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) - copy(*out, *in) - } - in.Requirements.DeepCopyInto(&out.Requirements) - in.ReadinessChecks.DeepCopyInto(&out.ReadinessChecks) - out.Chart = in.Chart - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = new(v1.JSON) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSpec. -func (in *FeatureSpec) DeepCopy() *FeatureSpec { - if in == nil { - return nil - } - out := new(FeatureSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureStatus) DeepCopyInto(out *FeatureStatus) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new(bool) - **out = **in - } - if in.Managed != nil { - in, out := &in.Managed, &out.Managed - *out = new(bool) - **out = **in - } - if in.Ready != nil { - in, out := &in.Ready, &out.Ready - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureStatus. -func (in *FeatureStatus) DeepCopy() *FeatureStatus { - if in == nil { - return nil - } - out := new(FeatureStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PanelLinkRequest) DeepCopyInto(out *PanelLinkRequest) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PanelLinkRequest. -func (in *PanelLinkRequest) DeepCopy() *PanelLinkRequest { - if in == nil { - return nil - } - out := new(PanelLinkRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReadinessChecks) DeepCopyInto(out *ReadinessChecks) { - *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]metav1.GroupVersionKind, len(*in)) - copy(*out, *in) - } - if in.Workloads != nil { - in, out := &in.Workloads, &out.Workloads - *out = make([]WorkloadInfo, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadinessChecks. -func (in *ReadinessChecks) DeepCopy() *ReadinessChecks { - if in == nil { - return nil - } - out := new(ReadinessChecks) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Requirements) DeepCopyInto(out *Requirements) { - *out = *in - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Requirements. -func (in *Requirements) DeepCopy() *Requirements { - if in == nil { - return nil - } - out := new(Requirements) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceDashboard) DeepCopyInto(out *ResourceDashboard) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDashboard. -func (in *ResourceDashboard) DeepCopy() *ResourceDashboard { - if in == nil { - return nil - } - out := new(ResourceDashboard) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceDashboard) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceDashboardList) DeepCopyInto(out *ResourceDashboardList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceDashboard, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDashboardList. -func (in *ResourceDashboardList) DeepCopy() *ResourceDashboardList { - if in == nil { - return nil - } - out := new(ResourceDashboardList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceDashboardList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceDashboardSpec) DeepCopyInto(out *ResourceDashboardSpec) { - *out = *in - out.Resource = in.Resource - if in.Dashboards != nil { - in, out := &in.Dashboards, &out.Dashboards - *out = make([]Dashboard, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDashboardSpec. -func (in *ResourceDashboardSpec) DeepCopy() *ResourceDashboardSpec { - if in == nil { - return nil - } - out := new(ResourceDashboardSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceEditor) DeepCopyInto(out *ResourceEditor) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceEditor. -func (in *ResourceEditor) DeepCopy() *ResourceEditor { - if in == nil { - return nil - } - out := new(ResourceEditor) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceEditor) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceEditorList) DeepCopyInto(out *ResourceEditorList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ResourceEditor, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceEditorList. -func (in *ResourceEditorList) DeepCopy() *ResourceEditorList { - if in == nil { - return nil - } - out := new(ResourceEditorList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceEditorList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceEditorSpec) DeepCopyInto(out *ResourceEditorSpec) { - *out = *in - out.Resource = in.Resource - if in.UI != nil { - in, out := &in.UI, &out.UI - *out = new(UIParameters) - (*in).DeepCopyInto(*out) - } - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) - copy(*out, *in) - } - if in.Variants != nil { - in, out := &in.Variants, &out.Variants - *out = make([]VariantRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Installer != nil { - in, out := &in.Installer, &out.Installer - *out = new(apisshared.DeploymentParameters) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceEditorSpec. -func (in *ResourceEditorSpec) DeepCopy() *ResourceEditorSpec { - if in == nil { - return nil - } - out := new(ResourceEditorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UIParameters) DeepCopyInto(out *UIParameters) { - *out = *in - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = new(releasesv1alpha1.ChartSourceRef) - **out = **in - } - if in.Editor != nil { - in, out := &in.Editor, &out.Editor - *out = new(releasesv1alpha1.ChartSourceRef) - **out = **in - } - if in.InstanceLabelPaths != nil { - in, out := &in.InstanceLabelPaths, &out.InstanceLabelPaths - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]*ActionTemplateGroup, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(ActionTemplateGroup) - (*in).DeepCopyInto(*out) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UIParameters. -func (in *UIParameters) DeepCopy() *UIParameters { - if in == nil { - return nil - } - out := new(UIParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VariantRef) DeepCopyInto(out *VariantRef) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VariantRef. -func (in *VariantRef) DeepCopy() *VariantRef { - if in == nil { - return nil - } - out := new(VariantRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WorkloadInfo) DeepCopyInto(out *WorkloadInfo) { - *out = *in - out.GroupVersionKind = in.GroupVersionKind - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadInfo. -func (in *WorkloadInfo) DeepCopy() *WorkloadInfo { - if in == nil { - return nil - } - out := new(WorkloadInfo) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresources.yaml b/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresources.yaml deleted file mode 100644 index 503dd678..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresources.yaml +++ /dev/null @@ -1,243 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: genericresources.core.k8s.appscode.com -spec: - group: core.k8s.appscode.com - names: - kind: GenericResource - listKind: GenericResourceList - plural: genericresources - singular: genericresource - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - apiType: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - appResource: - description: ResourceRequirements describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - cluster: - properties: - displayName: - type: string - name: - type: string - provider: - enum: - - Aws - - Azure - - DigitalOcean - - GoogleCloud - - Linode - - Packet - - Scaleway - - Vultr - - BareMetal - - KIND - - Generic - - Private - type: string - uid: - type: string - required: - - uid - type: object - mode: - type: string - name: - type: string - replicas: - format: int64 - type: integer - roleReplicas: - additionalProperties: - format: int64 - type: integer - type: object - roleResourceLimits: - additionalProperties: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: ResourceList is a set of (resource name, quantity) - pairs. - type: object - type: object - roleResourceRequests: - additionalProperties: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: ResourceList is a set of (resource name, quantity) - pairs. - type: object - type: object - status: - properties: - message: - description: Message - type: string - status: - description: Status - type: string - type: object - totalResource: - description: ResourceRequirements describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - uid: - description: UID is a type that holds unique ID values, including - UUIDs. Because we don't ONLY use UUIDs, this is an alias to string. Being - a type captures intent and helps make sure that UIDs and names do - not get conflated. - type: string - version: - type: string - required: - - apiType - - name - - status - type: object - status: - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresourceservices.yaml b/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresourceservices.yaml deleted file mode 100644 index 1721cd7c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_genericresourceservices.yaml +++ /dev/null @@ -1,330 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: genericresourceservices.core.k8s.appscode.com -spec: - group: core.k8s.appscode.com - names: - kind: GenericResourceService - listKind: GenericResourceServiceList - plural: genericresourceservices - singular: genericresourceservice - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - apiType: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - cluster: - properties: - displayName: - type: string - name: - type: string - provider: - enum: - - Aws - - Azure - - DigitalOcean - - GoogleCloud - - Linode - - Packet - - Scaleway - - Vultr - - BareMetal - - KIND - - Generic - - Private - type: string - uid: - type: string - required: - - uid - type: object - facilities: - properties: - backup: - properties: - refs: - items: - description: ObjectReference contains enough information - to let you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource - to serve. It must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different - scopes available to a custom resource - type: string - version: - type: string - required: - - group - type: object - usage: - type: string - required: - - usage - type: object - exec: - items: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - kubectlCommand: - type: string - ref: - description: ObjectReference contains enough information - to let you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - resource: - type: string - required: - - alias - - command - - container - - ref - - resource - type: object - type: array - exposed: - properties: - refs: - items: - description: ObjectReference contains enough information - to let you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource - to serve. It must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different - scopes available to a custom resource - type: string - version: - type: string - required: - - group - type: object - usage: - type: string - required: - - usage - type: object - monitoring: - properties: - refs: - items: - description: ObjectReference contains enough information - to let you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource - to serve. It must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different - scopes available to a custom resource - type: string - version: - type: string - required: - - group - type: object - usage: - type: string - required: - - usage - type: object - tls: - properties: - refs: - items: - description: ObjectReference contains enough information - to let you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource - to serve. It must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different - scopes available to a custom resource - type: string - version: - type: string - required: - - group - type: object - usage: - type: string - required: - - usage - type: object - type: object - name: - type: string - status: - properties: - message: - description: Message - type: string - status: - description: Status - type: string - type: object - required: - - apiType - - status - type: object - status: - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_podviews.yaml b/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_podviews.yaml deleted file mode 100644 index 6e07a920..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_podviews.yaml +++ /dev/null @@ -1,2253 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: podviews.core.k8s.appscode.com -spec: - group: core.k8s.appscode.com - names: - kind: PodView - listKind: PodViewList - plural: podviews - singular: podview - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: PodViewSpec defines the desired state of PodView - properties: - containers: - items: - description: A single application container that you want to run - within a pod. - 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' - items: - type: string - type: array - 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' - items: - type: string - type: array - env: - description: List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment variable present - in a Container. - 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 previously 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. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) - syntax: i.e. "$$(VAR_NAME)" will produce the string - literal "$(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. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - 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 - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: 'Selects a field of the pod: supports - metadata.name, metadata.namespace, `metadata.labels['''']`, - `metadata.annotations['''']`, spec.nodeName, - spec.serviceAccountName, status.hostIP, status.podIP, - status.podIPs.' - 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 - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - 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.' - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - 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 - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - 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. - items: - description: EnvFromSource represents the source of a set - of ConfigMaps - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the ConfigMap must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - 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 - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, - uid?' - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - 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. - 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' - properties: - exec: - description: Exec specifies the action to take. - 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. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - 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. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - 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 Pod''s termination grace period - countdown begins before the PreStop hook is executed. - Regardless of the outcome of the handler, the container - will eventually terminate within the Pod''s termination - grace period (unless delayed by finalizers). 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' - properties: - exec: - description: Exec specifies the action to take. - 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. - items: - type: string - type: array - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - 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. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the - host. Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents the duration that the - container should sleep before being terminated. - properties: - seconds: - description: Seconds is the number of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: Deprecated. TCPSocket is NOT supported - as a LifecycleHandler and kept for the backward compatibility. - There are no validation of this field and lifecycle - hooks will fail in runtime when tcp handler is specified. - properties: - host: - description: 'Optional: Host name to connect to, - defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - type: object - 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' - properties: - exec: - description: Exec specifies the action to take. - 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. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - 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. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - 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' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - 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. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - required: - - port - type: object - 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 a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - 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' - format: int32 - type: integer - type: object - 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. - items: - description: ContainerPort represents a network port in a - single container. - properties: - containerPort: - description: Number of port to expose on the pod's IP - address. This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - 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 < x < - 65536. If HostNetwork is specified, this must match - ContainerPort. Most containers do not need this. - format: int32 - type: integer - 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: - default: TCP - description: Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - 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' - properties: - exec: - description: Exec specifies the action to take. - 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. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - 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. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - 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' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - 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. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - required: - - port - type: object - 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 a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - 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' - format: int32 - type: integer - type: object - resources: - description: 'Compute Resources required by this container. - Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. More info: - https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - usage: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - 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/' - 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 Note that this field cannot be set - when spec.os.name is windows.' - type: boolean - capabilities: - description: The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by - the container runtime. Note that this field cannot be - set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - drop: - description: Removed capabilities - items: - description: Capability represent POSIX capabilities - type - type: string - type: array - type: object - privileged: - description: Run container in privileged mode. Processes - in privileged containers are essentially equivalent to - root on the host. Defaults to false. Note that this field - cannot be set when spec.os.name is windows. - 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. Note that this field cannot - be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: Whether this container has a read-only root - filesystem. Default is false. Note that this field cannot - be set when spec.os.name is windows. - 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. Note that this field cannot be set when - spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: Indicates that the container must run as a - non-root user. If true, the Kubelet will validate the - image at runtime to ensure that it does not run as UID - 0 (root) and fail to start the container if it does. If - unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both - SecurityContext and PodSecurityContext, the value specified - in SecurityContext takes precedence. - type: boolean - runAsUser: - description: The UID to run the entrypoint of the container - process. Defaults to user specified in image metadata - if unspecified. May also be set in PodSecurityContext. If - set in both SecurityContext and PodSecurityContext, the - value specified in SecurityContext takes precedence. Note - that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a - random SELinux context for each container. May also be - set in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. Note that this field cannot be set when - spec.os.name is windows. - properties: - level: - description: Level is SELinux level label that applies - to the container. - type: string - role: - description: Role is a SELinux role label that applies - to the container. - type: string - type: - description: Type is a SELinux type label that applies - to the container. - type: string - user: - description: User is a SELinux user label that applies - to the container. - type: string - type: object - seccompProfile: - description: The seccomp options to use by this container. - If seccomp options are provided at both the pod & container - level, the container options override the pod options. - Note that this field cannot be set when spec.os.name is - windows. - 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 be set if type is "Localhost". - Must NOT be set for any other type. - type: string - type: - description: "type indicates which kind of seccomp profile - will be applied. Valid options are: \n Localhost - - a profile defined in a file on the node should be - used. RuntimeDefault - the container runtime default - profile should be used. Unconfined - no profile should - be applied." - type: string - required: - - type - type: object - windowsOptions: - description: The Windows specific settings applied to all - containers. If unspecified, the options from the PodSecurityContext - will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is - linux. - 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 - hostProcess: - description: HostProcess determines if a container should - be run as a 'Host Process' container. All of a Pod's - containers must have the same effective HostProcess - value (it is not allowed to have a mix of HostProcess - containers and non-HostProcess containers). In addition, - if HostProcess is true then HostNetwork must also - be set to true. - type: boolean - runAsUserName: - description: The UserName in Windows to run the entrypoint - of the container process. Defaults to the user specified - in image metadata if unspecified. May also be set - in PodSecurityContext. If set in both SecurityContext - and PodSecurityContext, the value specified in SecurityContext - takes precedence. - type: string - type: object - type: object - 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' - properties: - exec: - description: Exec specifies the action to take. - 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. - items: - type: string - type: array - type: object - failureThreshold: - description: Minimum consecutive failures for the probe - to be considered failed after having succeeded. Defaults - to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies an action involving a GRPC port. - properties: - port: - description: Port number of the gRPC service. Number - must be in the range 1 to 65535. - format: int32 - type: integer - service: - description: "Service is the name of the service to - place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - \n If this is not specified, the default behavior - is defined by gRPC." - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies the http request to perform. - 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. - items: - description: HTTPHeader describes a custom header - to be used in HTTP probes - properties: - name: - description: The header field name. This will - be canonicalized upon output, so case-variant - names will be understood as the same header. - type: string - value: - description: The header field value - type: string - required: - - name - - value - type: object - type: array - path: - description: Path to access on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - scheme: - description: Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - 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' - format: int32 - type: integer - periodSeconds: - description: How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - 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. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies an action involving a TCP - port. - properties: - host: - description: 'Optional: Host name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - 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. - x-kubernetes-int-or-string: true - required: - - port - type: object - 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 a beta field and requires enabling - ProbeTerminationGracePeriod feature gate. Minimum value - is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - 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' - format: int32 - type: integer - type: object - 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. - items: - description: volumeDevice describes a mapping of a raw block - device within a container. - 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 - required: - - devicePath - - name - type: object - type: array - volumeMounts: - description: Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - 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 - required: - - mountPath - - name - type: object - type: array - 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 - required: - - name - type: object - type: array - resources: - description: ResourceView describes the compute resource requirements. - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - usage: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - required: - - containers - - resources - type: object - status: - 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. - properties: - conditions: - description: 'Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions' - items: - description: PodCondition contains details for the current condition - of this pod. - properties: - lastProbeTime: - description: Last time we probed the condition. - format: date-time - type: string - lastTransitionTime: - description: Last time the condition transitioned from one status - to another. - format: date-time - type: string - 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 - required: - - status - - type - type: object - type: array - containerStatuses: - description: 'The list has one entry per container in the manifest. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status' - items: - description: ContainerStatus contains details for the current status - of this container. - properties: - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: AllocatedResources represents the compute resources - allocated for this container by the node. Kubelet sets this - value to Container.Resources.Requests upon successful pod - admission and after successfully admitting desired pod resize. - type: object - containerID: - description: ContainerID is the ID of the container in the format - '://'. Where type is a container runtime - identifier, returned from Version call of CRI API (for example - "containerd"). - type: string - image: - description: 'Image is the name of container image that the - container is running. The container image may not match the - image used in the PodSpec, as it may have been resolved by - the runtime. More info: https://kubernetes.io/docs/concepts/containers/images.' - type: string - imageID: - description: ImageID is the image ID of the container's image. - The image ID may not match the image ID of the image used - in the PodSpec, as it may have been resolved by the runtime. - type: string - lastState: - description: LastTerminationState holds the last termination - state of the container to help debug container crashes and - restarts. This field is not populated if the container is - still running and RestartCount is 0. - properties: - running: - description: Details about a running container - properties: - startedAt: - description: Time at which the container was last (re-)started - format: date-time - type: string - type: object - terminated: - description: Details about a terminated container - properties: - containerID: - description: Container's ID in the format '://' - type: string - exitCode: - description: Exit status from the last termination of - the container - format: int32 - type: integer - finishedAt: - description: Time at which the container last terminated - format: date-time - type: string - 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 - format: int32 - type: integer - startedAt: - description: Time at which previous execution of the - container started - format: date-time - type: string - required: - - exitCode - type: object - waiting: - description: Details about a waiting container - 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 - type: object - type: object - name: - description: Name is a DNS_LABEL representing the unique name - of the container. Each container in a pod must have a unique - name across all container types. Cannot be updated. - type: string - ready: - description: "Ready specifies whether the container is currently - passing its readiness check. The value will change as readiness - probes keep executing. If no readiness probes are specified, - this field defaults to true once the container is fully started - (see Started field). \n The value is typically used to determine - whether a container is ready to accept traffic." - type: boolean - resources: - description: Resources represents the compute resource requests - and limits that have been successfully enacted on the running - container after it has been started or has been successfully - resized. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only - be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - restartCount: - description: RestartCount holds the number of times the container - has been restarted. Kubelet makes an effort to always increment - the value, but there are cases when the state may be lost - due to node restarts and then the value may be reset to 0. - The value is never negative. - format: int32 - type: integer - started: - description: Started indicates whether the container has finished - its postStart lifecycle hook and 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. In both cases, startup - probes will run again. Is always true when no startupProbe - is defined and container is running and has passed the postStart - lifecycle hook. The null value must be treated the same as - false. - type: boolean - state: - description: State holds details about the container's current - condition. - properties: - running: - description: Details about a running container - properties: - startedAt: - description: Time at which the container was last (re-)started - format: date-time - type: string - type: object - terminated: - description: Details about a terminated container - properties: - containerID: - description: Container's ID in the format '://' - type: string - exitCode: - description: Exit status from the last termination of - the container - format: int32 - type: integer - finishedAt: - description: Time at which the container last terminated - format: date-time - type: string - 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 - format: int32 - type: integer - startedAt: - description: Time at which previous execution of the - container started - format: date-time - type: string - required: - - exitCode - type: object - waiting: - description: Details about a waiting container - 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 - type: object - type: object - required: - - image - - imageID - - name - - ready - - restartCount - type: object - type: array - ephemeralContainerStatuses: - description: Status for any ephemeral containers that have run in - this pod. - items: - description: ContainerStatus contains details for the current status - of this container. - properties: - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: AllocatedResources represents the compute resources - allocated for this container by the node. Kubelet sets this - value to Container.Resources.Requests upon successful pod - admission and after successfully admitting desired pod resize. - type: object - containerID: - description: ContainerID is the ID of the container in the format - '://'. Where type is a container runtime - identifier, returned from Version call of CRI API (for example - "containerd"). - type: string - image: - description: 'Image is the name of container image that the - container is running. The container image may not match the - image used in the PodSpec, as it may have been resolved by - the runtime. More info: https://kubernetes.io/docs/concepts/containers/images.' - type: string - imageID: - description: ImageID is the image ID of the container's image. - The image ID may not match the image ID of the image used - in the PodSpec, as it may have been resolved by the runtime. - type: string - lastState: - description: LastTerminationState holds the last termination - state of the container to help debug container crashes and - restarts. This field is not populated if the container is - still running and RestartCount is 0. - properties: - running: - description: Details about a running container - properties: - startedAt: - description: Time at which the container was last (re-)started - format: date-time - type: string - type: object - terminated: - description: Details about a terminated container - properties: - containerID: - description: Container's ID in the format '://' - type: string - exitCode: - description: Exit status from the last termination of - the container - format: int32 - type: integer - finishedAt: - description: Time at which the container last terminated - format: date-time - type: string - 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 - format: int32 - type: integer - startedAt: - description: Time at which previous execution of the - container started - format: date-time - type: string - required: - - exitCode - type: object - waiting: - description: Details about a waiting container - 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 - type: object - type: object - name: - description: Name is a DNS_LABEL representing the unique name - of the container. Each container in a pod must have a unique - name across all container types. Cannot be updated. - type: string - ready: - description: "Ready specifies whether the container is currently - passing its readiness check. The value will change as readiness - probes keep executing. If no readiness probes are specified, - this field defaults to true once the container is fully started - (see Started field). \n The value is typically used to determine - whether a container is ready to accept traffic." - type: boolean - resources: - description: Resources represents the compute resource requests - and limits that have been successfully enacted on the running - container after it has been started or has been successfully - resized. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only - be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - restartCount: - description: RestartCount holds the number of times the container - has been restarted. Kubelet makes an effort to always increment - the value, but there are cases when the state may be lost - due to node restarts and then the value may be reset to 0. - The value is never negative. - format: int32 - type: integer - started: - description: Started indicates whether the container has finished - its postStart lifecycle hook and 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. In both cases, startup - probes will run again. Is always true when no startupProbe - is defined and container is running and has passed the postStart - lifecycle hook. The null value must be treated the same as - false. - type: boolean - state: - description: State holds details about the container's current - condition. - properties: - running: - description: Details about a running container - properties: - startedAt: - description: Time at which the container was last (re-)started - format: date-time - type: string - type: object - terminated: - description: Details about a terminated container - properties: - containerID: - description: Container's ID in the format '://' - type: string - exitCode: - description: Exit status from the last termination of - the container - format: int32 - type: integer - finishedAt: - description: Time at which the container last terminated - format: date-time - type: string - 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 - format: int32 - type: integer - startedAt: - description: Time at which previous execution of the - container started - format: date-time - type: string - required: - - exitCode - type: object - waiting: - description: Details about a waiting container - 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 - type: object - type: object - required: - - image - - imageID - - name - - ready - - restartCount - type: object - type: array - hostIP: - description: hostIP holds the IP address of the host to which the - pod is assigned. Empty if the pod has not started yet. A pod can - be assigned to a node that has a problem in kubelet which in turns - mean that HostIP will not be updated even if there is a node is - assigned to pod - type: string - hostIPs: - description: hostIPs holds the IP addresses allocated to the host. - If this field is specified, the first entry must match the hostIP - field. This list is empty if the pod has not started yet. A pod - can be assigned to a node that has a problem in kubelet which in - turns means that HostIPs will not be updated even if there is a - node is assigned to this pod. - items: - description: HostIP represents a single IP address allocated to - the host. - properties: - ip: - description: IP is the IP address assigned to the host - type: string - type: object - type: array - x-kubernetes-list-type: atomic - 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' - items: - description: ContainerStatus contains details for the current status - of this container. - properties: - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: AllocatedResources represents the compute resources - allocated for this container by the node. Kubelet sets this - value to Container.Resources.Requests upon successful pod - admission and after successfully admitting desired pod resize. - type: object - containerID: - description: ContainerID is the ID of the container in the format - '://'. Where type is a container runtime - identifier, returned from Version call of CRI API (for example - "containerd"). - type: string - image: - description: 'Image is the name of container image that the - container is running. The container image may not match the - image used in the PodSpec, as it may have been resolved by - the runtime. More info: https://kubernetes.io/docs/concepts/containers/images.' - type: string - imageID: - description: ImageID is the image ID of the container's image. - The image ID may not match the image ID of the image used - in the PodSpec, as it may have been resolved by the runtime. - type: string - lastState: - description: LastTerminationState holds the last termination - state of the container to help debug container crashes and - restarts. This field is not populated if the container is - still running and RestartCount is 0. - properties: - running: - description: Details about a running container - properties: - startedAt: - description: Time at which the container was last (re-)started - format: date-time - type: string - type: object - terminated: - description: Details about a terminated container - properties: - containerID: - description: Container's ID in the format '://' - type: string - exitCode: - description: Exit status from the last termination of - the container - format: int32 - type: integer - finishedAt: - description: Time at which the container last terminated - format: date-time - type: string - 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 - format: int32 - type: integer - startedAt: - description: Time at which previous execution of the - container started - format: date-time - type: string - required: - - exitCode - type: object - waiting: - description: Details about a waiting container - 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 - type: object - type: object - name: - description: Name is a DNS_LABEL representing the unique name - of the container. Each container in a pod must have a unique - name across all container types. Cannot be updated. - type: string - ready: - description: "Ready specifies whether the container is currently - passing its readiness check. The value will change as readiness - probes keep executing. If no readiness probes are specified, - this field defaults to true once the container is fully started - (see Started field). \n The value is typically used to determine - whether a container is ready to accept traffic." - type: boolean - resources: - description: Resources represents the compute resource requests - and limits that have been successfully enacted on the running - container after it has been started or has been successfully - resized. - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only - be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests - cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - restartCount: - description: RestartCount holds the number of times the container - has been restarted. Kubelet makes an effort to always increment - the value, but there are cases when the state may be lost - due to node restarts and then the value may be reset to 0. - The value is never negative. - format: int32 - type: integer - started: - description: Started indicates whether the container has finished - its postStart lifecycle hook and 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. In both cases, startup - probes will run again. Is always true when no startupProbe - is defined and container is running and has passed the postStart - lifecycle hook. The null value must be treated the same as - false. - type: boolean - state: - description: State holds details about the container's current - condition. - properties: - running: - description: Details about a running container - properties: - startedAt: - description: Time at which the container was last (re-)started - format: date-time - type: string - type: object - terminated: - description: Details about a terminated container - properties: - containerID: - description: Container's ID in the format '://' - type: string - exitCode: - description: Exit status from the last termination of - the container - format: int32 - type: integer - finishedAt: - description: Time at which the container last terminated - format: date-time - type: string - 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 - format: int32 - type: integer - startedAt: - description: Time at which previous execution of the - container started - format: date-time - type: string - required: - - exitCode - type: object - waiting: - description: Details about a waiting container - 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 - type: object - type: object - required: - - image - - imageID - - name - - ready - - restartCount - type: object - type: array - 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 Pending: 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 More - info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase" - type: string - podIP: - description: podIP 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. - items: - description: PodIP represents a single IP address allocated to the - pod. - properties: - ip: - description: IP is the IP address assigned to the pod - type: string - type: object - type: array - 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://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes' - type: string - reason: - description: A brief CamelCase message indicating details about why - the pod is in this state. e.g. 'Evicted' - type: string - resize: - description: Status of resources resize desired for pod's containers. - It is empty if no resources resize is pending. Any changes to container - resources will automatically set this to "Proposed" - type: string - resourceClaimStatuses: - description: Status of resource claims. - items: - description: PodResourceClaimStatus is stored in the PodStatus for - each PodResourceClaim which references a ResourceClaimTemplate. - It stores the generated name for the corresponding ResourceClaim. - properties: - name: - description: Name uniquely identifies this resource claim inside - the pod. This must match the name of an entry in pod.spec.resourceClaims, - which implies that the string must be a DNS_LABEL. - type: string - resourceClaimName: - description: ResourceClaimName is the name of the ResourceClaim - that was generated for the Pod in the namespace of the Pod. - It this is unset, then generating a ResourceClaim was not - necessary. The pod.spec.resourceClaims entry can be ignored - in this case. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - 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. - format: date-time - type: string - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_projects.yaml b/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_projects.yaml deleted file mode 100644 index 8e3cd536..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_projects.yaml +++ /dev/null @@ -1,175 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: projects.core.k8s.appscode.com -spec: - group: core.k8s.appscode.com - names: - kind: Project - listKind: ProjectList - plural: projects - singular: project - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Project is the Schema for the projects API - 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: - type: object - spec: - description: ProjectSpec defines the desired state of Project - properties: - monitoring: - properties: - alertmanagerRef: - description: ObjectReference contains enough information to let - you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - alertmanagerURL: - type: string - grafanaURL: - type: string - prometheusRef: - description: ObjectReference contains enough information to let - you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - prometheusURL: - type: string - type: object - namespaceSelector: - 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. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - items: - type: string - type: array - presets: - items: - properties: - ref: - description: ObjectReference contains enough information to - let you inspect or modify the referred object. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - namespace: - description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' - type: string - required: - - name - type: object - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to - serve. It must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different - scopes available to a custom resource - type: string - version: - type: string - required: - - group - type: object - type: object - type: array - type: - default: User - enum: - - Default - - System - - User - type: string - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_resourcesummaries.yaml b/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_resourcesummaries.yaml deleted file mode 100644 index e95c2d9e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/core.k8s.appscode.com_resourcesummaries.yaml +++ /dev/null @@ -1,187 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourcesummaries.core.k8s.appscode.com -spec: - group: core.k8s.appscode.com - names: - kind: ResourceSummary - listKind: ResourceSummaryList - plural: resourcesummaries - singular: resourcesummary - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - apiType: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - appResource: - description: ResourceRequirements describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - cluster: - properties: - displayName: - type: string - name: - type: string - provider: - enum: - - Aws - - Azure - - DigitalOcean - - GoogleCloud - - Linode - - Packet - - Scaleway - - Vultr - - BareMetal - - KIND - - Generic - - Private - type: string - uid: - type: string - required: - - uid - type: object - count: - type: integer - totalResource: - description: ResourceRequirements describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - required: - - apiType - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/doc.go b/vendor/kmodules.xyz/resource-metadata/crds/doc.go deleted file mode 100644 index c75b247d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package crds diff --git a/vendor/kmodules.xyz/resource-metadata/crds/lib.go b/vendor/kmodules.xyz/resource-metadata/crds/lib.go deleted file mode 100644 index 826bf6bf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/lib.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package crds - -import ( - "embed" - "fmt" - - "kmodules.xyz/client-go/apiextensions" - - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/yaml" -) - -//go:embed *.yaml -var fs embed.FS - -func load(filename string, o interface{}) error { - data, err := fs.ReadFile(filename) - if err != nil { - return err - } - return yaml.Unmarshal(data, o) -} - -func CustomResourceDefinition(gvr schema.GroupVersionResource) (*apiextensions.CustomResourceDefinition, error) { - var out apiextensions.CustomResourceDefinition - - v1file := fmt.Sprintf("%s_%s.yaml", gvr.Group, gvr.Resource) - if err := load(v1file, &out.V1); err != nil { - return nil, err - } - - if out.V1 == nil { - return nil, fmt.Errorf("missing crd yamls for gvr: %s", gvr) - } - - return &out, nil -} - -func MustCustomResourceDefinition(gvr schema.GroupVersionResource) *apiextensions.CustomResourceDefinition { - out, err := CustomResourceDefinition(gvr) - if err != nil { - panic(err) - } - return out -} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/management.k8s.appscode.com_projectquotas.yaml b/vendor/kmodules.xyz/resource-metadata/crds/management.k8s.appscode.com_projectquotas.yaml deleted file mode 100644 index d516eaf6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/management.k8s.appscode.com_projectquotas.yaml +++ /dev/null @@ -1,112 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: projectquotas.management.k8s.appscode.com -spec: - group: management.k8s.appscode.com - names: - kind: ProjectQuota - listKind: ProjectQuotaList - plural: projectquotas - singular: projectquota - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - quotas: - items: - properties: - group: - type: string - hard: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Hard is the set of enforced hard limits for each - named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' - type: object - kind: - type: string - type: object - type: array - required: - - quotas - type: object - status: - description: ProjectQuotaStatus defines the observed state of ProjectQuota - properties: - quotas: - items: - properties: - group: - type: string - hard: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Hard is the set of enforced hard limits for each - named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/' - type: object - kind: - type: string - reason: - type: string - result: - enum: - - Success - - Error - type: string - used: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: Used is the current observed total usage of the - resource in the namespace. - type: object - required: - - result - type: object - type: array - required: - - quotas - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_clusterstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_clusterstatuses.yaml deleted file mode 100644 index a416b5db..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_clusterstatuses.yaml +++ /dev/null @@ -1,64 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: clusterstatuses.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ClusterStatus - listKind: ClusterStatusList - plural: clusterstatuses - singular: clusterstatus - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - response: - properties: - clusterAPI: - description: ClusterAPI contains capi cluster information if the cluster - is created by cluster-api - properties: - clusterName: - type: string - namespace: - type: string - provider: - type: string - type: object - clusterManagers: - items: - type: string - type: array - message: - description: Message specifies additional information regarding the - possible actions for the user - type: string - phase: - description: Phase represents current status of the cluster - type: string - reason: - description: Reason explains the reason behind the cluster current - phase - type: string - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_menuoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_menuoutlines.yaml deleted file mode 100644 index 333e5fef..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_menuoutlines.yaml +++ /dev/null @@ -1,173 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: menuoutlines.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: MenuOutline - listKind: MenuOutlineList - plural: menuoutlines - singular: menuoutline - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - home: - properties: - autoDiscoverAPIGroup: - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - layoutName: - type: string - name: - type: string - path: - type: string - type: object - sections: - items: - properties: - autoDiscoverAPIGroup: - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image - used as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - items: - items: - properties: - icons: - items: - description: ImageSpec contains information about an - image used as an icon. - properties: - size: - description: (optional) The size of the image in - pixels (e.g., 25x25). - type: string - src: - description: The source for image represented as - either an absolute URL to the image or a Data - URL containing the image. Data URLs are defined - in RFC 2397. - type: string - type: - description: (optional) The mine type of the image - (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - layoutName: - type: string - name: - type: string - path: - type: string - required: - type: boolean - type: - description: GroupKind specifies a Group and a Kind, but - does not force a version. This is useful for identifying - concepts during lookup stages without having partially - valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - required: - - name - type: object - type: array - layoutName: - type: string - name: - type: string - path: - type: string - required: - - items - type: object - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_menus.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_menus.yaml deleted file mode 100644 index da22d4cb..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_menus.yaml +++ /dev/null @@ -1,124 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: menus.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: Menu - listKind: MenuList - plural: menus - singular: menu - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - home: - properties: - apiGroup: - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - layoutName: - type: string - name: - type: string - path: - type: string - type: object - mode: - enum: - - Accordion - - Gallery - type: string - sections: - items: - properties: - apiGroup: - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image - used as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - items: - items: - additionalProperties: true - type: object - type: array - layoutName: - type: string - name: - type: string - path: - type: string - required: - - items - type: object - type: array - required: - - mode - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml deleted file mode 100644 index 74d388f1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml +++ /dev/null @@ -1,303 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourceblockdefinitions.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ResourceBlockDefinition - listKind: ResourceBlockDefinitionList - plural: resourceblockdefinitions - singular: resourceblockdefinition - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - blocks: - items: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about an image - used as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, but does - not force a version. This is useful for identifying concepts - during lookup stages without having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies a column - for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: success,danger,warning,info, - link, white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable description - of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name for the - column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text template that - will be evaluated to determine cell value. Users - can use JSONPath expression to extract nested fields - and apply template functions from Masterminds/sprig - library. The template function for JSON path is - called `jp`. Example: {{ jp "{.a.b}" . }} or {{ - jp "{.a.b}" true }}, if json output is desired from - JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - name: - type: string - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - required: - - blocks - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcecalculators.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcecalculators.yaml deleted file mode 100644 index e296d83f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcecalculators.yaml +++ /dev/null @@ -1,219 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourcecalculators.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ResourceCalculator - listKind: ResourceCalculatorList - plural: resourcecalculators - singular: resourcecalculator - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - request: - properties: - edit: - type: boolean - resource: - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - x-kubernetes-preserve-unknown-fields: true - response: - properties: - apiType: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - appResource: - description: ResourceRequirements describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - mode: - type: string - quota: - properties: - decision: - enum: - - Allow - - Deny - type: string - violations: - items: - type: string - type: array - required: - - decision - type: object - replicas: - format: int64 - type: integer - roleReplicas: - additionalProperties: - format: int64 - type: integer - type: object - roleResourceLimits: - additionalProperties: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: ResourceList is a set of (resource name, quantity) - pairs. - type: object - type: object - roleResourceRequests: - additionalProperties: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: ResourceList is a set of (resource name, quantity) - pairs. - type: object - type: object - totalResource: - description: ResourceRequirements describes the compute resource requirements. - properties: - claims: - description: "Claims lists the names of resources, defined in - spec.resourceClaims, that are used by this container. \n This - is an alpha field and requires enabling the DynamicResourceAllocation - feature gate. \n This field is immutable. It can only be set - for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry in pod.spec.resourceClaims - of the Pod where this field is used. It makes that resource - available inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute resources - allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - version: - type: string - required: - - apiType - - quota - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml deleted file mode 100644 index 19d0917b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml +++ /dev/null @@ -1,347 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourcedescriptors.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ResourceDescriptor - listKind: ResourceDescriptorList - plural: resourcedescriptors - shortNames: - - rd - singular: resourcedescriptor - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - connections: - items: - properties: - labels: - items: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - type: array - level: - type: string - nameTemplate: - type: string - namespace: - properties: - labelSelector: - type: string - path: - type: string - selector: - type: string - type: object - references: - description: "References are a jsonpath that returns a CSV formatted - references to target resources \n If each row has a single - column, it is target name. Target resource is non-namespaced - or uses the same namespace as the source resource. Example: - n1 n2 \n If each row has two columns, it is target [name,namespace]. - Example: n1,ns1 n2,ns2 \n If each row has three columns, it - is target [name,namespace,kind]. Example: n1,ns1,k1 n2,ns2,k2 - \n If each row has four columns, it is target [name,namespace,kind,apiGroup]. - Example: n1,ns1,k1,apiGroup1 n2,ns2,k2,apiGroup2" - items: - type: string - type: array - selector: - 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. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - selectorPath: - type: string - target: - description: TypeMeta describes an individual object in an API - response or request with strings representing the type of - the object and its API schema version. Structures that are - versioned or persisted should inline TypeMeta. - 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 - type: object - targetLabelPath: - description: 'default: metadata.labels' - type: string - type: - enum: - - MatchSelector - - MatchName - - MatchRef - - OwnedBy - type: string - required: - - labels - - target - - type - type: object - type: array - exec: - items: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - if: - properties: - condition: - type: string - connected: - properties: - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful for - identifying concepts during lookup stages without - having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - required: - - query - - ref - type: object - type: object - serviceNameTemplate: - type: string - required: - - alias - type: object - type: array - links: - description: Links are a list of descriptive URLs intended to be used - to surface additional documentation, dashboards, etc. - items: - description: Link contains information about an URL to surface documentation, - dashboards, etc. - properties: - description: - description: Description is human readable content explaining - the purpose of the link. - type: string - url: - description: Url typically points at a website address. - type: string - type: object - type: array - maintainers: - description: Maintainers is an optional list of maintainers of the - application. The maintainers in this list maintain the source code, - images, and package for the application. - items: - description: ContactData contains information about an individual - or organization. - properties: - email: - description: Email is the email address. - type: string - name: - description: Name is the descriptive name. - type: string - url: - description: Url could typically be a website address. - type: string - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - 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. - properties: - openAPIV3Schema: - description: openAPIV3Schema is the OpenAPI v3 schema to use for - validation and pruning. - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - required: - - resource - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceeditors.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceeditors.yaml deleted file mode 100644 index a04354ac..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceeditors.yaml +++ /dev/null @@ -1,378 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourceeditors.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ResourceEditor - listKind: ResourceEditorList - plural: resourceeditors - singular: resourceeditor - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels (e.g., - 25x25). - type: string - src: - description: The source for image represented as either an absolute - URL to the image or a Data URL containing the image. Data - URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - installer: - properties: - chart: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - planID: - type: string - productID: - type: string - type: object - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - ui: - properties: - actions: - items: - properties: - description: - type: string - items: - items: - properties: - description: - type: string - disabledTemplate: - type: string - editor: - description: ChartSourceRef references to a single - version of a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an - typed namespaced object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - enforceQuota: - type: boolean - flow: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - name: - type: string - operationId: - type: string - required: - - enforceQuota - - flow - - operationId - type: object - type: array - name: - type: string - required: - - items - type: object - type: array - editor: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - enforceQuota: - type: boolean - instanceLabelPaths: - description: app.kubernetes.io/instance label must be updated - at these paths when refilling metadata - items: - type: string - type: array - options: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - required: - - enforceQuota - type: object - variants: - description: Kind == VendorChartPreset | ClusterChartPreset - items: - properties: - description: - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image - used as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - name: - type: string - selector: - 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. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - title: - type: string - required: - - name - type: object - type: array - required: - - resource - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml deleted file mode 100644 index 57f05b90..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml +++ /dev/null @@ -1,1467 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourcelayouts.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ResourceLayout - listKind: ResourceLayoutList - plural: resourcelayouts - singular: resourcelayout - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - defaultLayout: - type: boolean - header: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, but does - not force a version. This is useful for identifying concepts - during lookup stages without having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies a column - for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: success,danger,warning,info, - link, white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable description - of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text template that - will be evaluated to determine cell value. Users can - use JSONPath expression to extract nested fields and - apply template functions from Masterminds/sprig library. - The template function for JSON path is called `jp`. - Example: {{ jp "{.a.b}" . }} or {{ jp "{.a.b}" true - }}, if json output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - pages: - items: - properties: - name: - type: string - sections: - items: - properties: - blocks: - items: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful - for identifying concepts during lookup stages - without having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies - a column for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: - success,danger,warning,info, link, - white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable - description of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable - name for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text - template that will be evaluated to determine - cell value. Users can use JSONPath expression - to extract nested fields and apply template - functions from Masterminds/sprig library. - The template function for JSON path - is called `jp`. Example: {{ jp "{.a.b}" - . }} or {{ jp "{.a.b}" true }}, if json - output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - type: array - icons: - items: - description: ImageSpec contains information about an - image used as an icon. - properties: - size: - description: (optional) The size of the image in - pixels (e.g., 25x25). - type: string - src: - description: The source for image represented as - either an absolute URL to the image or a Data - URL containing the image. Data URLs are defined - in RFC 2397. - type: string - type: - description: (optional) The mine type of the image - (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - info: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful for - identifying concepts during lookup stages without - having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies - a column for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: - success,danger,warning,info, link, - white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable - description of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name - for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text - template that will be evaluated to determine - cell value. Users can use JSONPath expression - to extract nested fields and apply template - functions from Masterminds/sprig library. - The template function for JSON path is - called `jp`. Example: {{ jp "{.a.b}" . - }} or {{ jp "{.a.b}" true }}, if json - output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - insight: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful for - identifying concepts during lookup stages without - having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies - a column for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: - success,danger,warning,info, link, - white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable - description of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name - for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text - template that will be evaluated to determine - cell value. Users can use JSONPath expression - to extract nested fields and apply template - functions from Masterminds/sprig library. - The template function for JSON path is - called `jp`. Example: {{ jp "{.a.b}" . - }} or {{ jp "{.a.b}" true }}, if json - output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - name: - type: string - type: object - type: array - required: - - name - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - tabBar: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, but does - not force a version. This is useful for identifying concepts - during lookup stages without having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies a column - for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: success,danger,warning,info, - link, white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable description - of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text template that - will be evaluated to determine cell value. Users can - use JSONPath expression to extract nested fields and - apply template functions from Masterminds/sprig library. - The template function for JSON path is called `jp`. - Example: {{ jp "{.a.b}" . }} or {{ jp "{.a.b}" true - }}, if json output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - ui: - properties: - actions: - items: - properties: - description: - type: string - items: - items: - properties: - description: - type: string - disabledTemplate: - type: string - editor: - description: ChartSourceRef references to a single - version of a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an - typed namespaced object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - enforceQuota: - type: boolean - flow: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - name: - type: string - operationId: - type: string - required: - - enforceQuota - - flow - - operationId - type: object - type: array - name: - type: string - required: - - items - type: object - type: array - editor: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - enforceQuota: - type: boolean - instanceLabelPaths: - description: app.kubernetes.io/instance label must be updated - at these paths when refilling metadata - items: - type: string - type: array - options: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - required: - - enforceQuota - type: object - required: - - defaultLayout - - resource - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml deleted file mode 100644 index 7757a247..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml +++ /dev/null @@ -1,1404 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourceoutlines.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ResourceOutline - listKind: ResourceOutlineList - plural: resourceoutlines - singular: resourceoutline - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - actions: - items: - properties: - description: - type: string - items: - items: - properties: - description: - type: string - disabledTemplate: - type: string - editor: - description: ChartSourceRef references to a single version - of a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed - namespaced object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - enforceQuota: - type: boolean - flow: - type: string - icons: - items: - description: ImageSpec contains information about an - image used as an icon. - properties: - size: - description: (optional) The size of the image in - pixels (e.g., 25x25). - type: string - src: - description: The source for image represented as - either an absolute URL to the image or a Data - URL containing the image. Data URLs are defined - in RFC 2397. - type: string - type: - description: (optional) The mine type of the image - (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - name: - type: string - operationId: - type: string - required: - - enforceQuota - - flow - - operationId - type: object - type: array - name: - type: string - required: - - items - type: object - type: array - defaultLayout: - type: boolean - header: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, but does - not force a version. This is useful for identifying concepts - during lookup stages without having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies a column - for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: success,danger,warning,info, - link, white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable description - of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text template that - will be evaluated to determine cell value. Users can - use JSONPath expression to extract nested fields and - apply template functions from Masterminds/sprig library. - The template function for JSON path is called `jp`. - Example: {{ jp "{.a.b}" . }} or {{ jp "{.a.b}" true - }}, if json output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - name: - type: string - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - pages: - items: - properties: - name: - type: string - sections: - items: - properties: - blocks: - items: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful - for identifying concepts during lookup stages - without having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies - a column for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: - success,danger,warning,info, link, - white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable - description of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable - name for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text - template that will be evaluated to determine - cell value. Users can use JSONPath expression - to extract nested fields and apply template - functions from Masterminds/sprig library. - The template function for JSON path - is called `jp`. Example: {{ jp "{.a.b}" - . }} or {{ jp "{.a.b}" true }}, if json - output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - name: - type: string - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - type: array - icons: - items: - description: ImageSpec contains information about an - image used as an icon. - properties: - size: - description: (optional) The size of the image in - pixels (e.g., 25x25). - type: string - src: - description: The source for image represented as - either an absolute URL to the image or a Data - URL containing the image. Data URLs are defined - in RFC 2397. - type: string - type: - description: (optional) The mine type of the image - (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - info: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful for - identifying concepts during lookup stages without - having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies - a column for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: - success,danger,warning,info, link, - white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable - description of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name - for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text - template that will be evaluated to determine - cell value. Users can use JSONPath expression - to extract nested fields and apply template - functions from Masterminds/sprig library. - The template function for JSON path is - called `jp`. Example: {{ jp "{.a.b}" . - }} or {{ jp "{.a.b}" true }}, if json - output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - name: - type: string - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - insight: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful for - identifying concepts during lookup stages without - having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies - a column for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: - success,danger,warning,info, link, - white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable - description of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name - for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text - template that will be evaluated to determine - cell value. Users can use JSONPath expression - to extract nested fields and apply template - functions from Masterminds/sprig library. - The template function for JSON path is - called `jp`. Example: {{ jp "{.a.b}" . - }} or {{ jp "{.a.b}" true }}, if json - output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - name: - type: string - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - name: - type: string - type: object - type: array - required: - - name - type: object - type: array - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - tabBar: - properties: - actions: - properties: - create: - type: string - required: - - create - type: object - displayMode: - enum: - - List - - Field - type: string - fieldPath: - type: string - icons: - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - kind: - enum: - - Block - - Self - - SubTable - - Connection - - Custom - type: string - name: - type: string - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, but does - not force a version. This is useful for identifying concepts - during lookup stages without having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - requiredFeatureSets: - additionalProperties: - items: - type: string - type: array - type: object - view: - properties: - columns: - items: - description: ResourceColumnDefinition specifies a column - for server side printing. - properties: - color: - properties: - template: - description: 'Available color codes: success,danger,warning,info, - link, white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable description - of this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text template that - will be evaluated to determine cell value. Users can - use JSONPath expression to extract nested fields and - apply template functions from Masterminds/sprig library. - The template function for JSON path is called `jp`. - Example: {{ jp "{.a.b}" . }} or {{ jp "{.a.b}" true - }}, if json output is desired from JSONPath parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - name: - type: string - type: object - width: - type: integer - required: - - kind - - query - - ref - type: object - required: - - defaultLayout - - resource - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcetabledefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcetabledefinitions.yaml deleted file mode 100644 index 73c4d568..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcetabledefinitions.yaml +++ /dev/null @@ -1,181 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourcetabledefinitions.meta.k8s.appscode.com -spec: - group: meta.k8s.appscode.com - names: - kind: ResourceTableDefinition - listKind: ResourceTableDefinitionList - plural: resourcetabledefinitions - singular: resourcetabledefinition - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - columns: - items: - description: ResourceColumnDefinition specifies a column for server - side printing. - properties: - color: - properties: - template: - description: 'Available color codes: success,danger,warning,info, - link, white, light, dark, black see https://bulma.io/documentation/elements/tag/#colors' - type: string - type: object - dashboard: - properties: - name: - type: string - type: object - description: - description: description is a human readable description of - this column. - type: string - exec: - properties: - alias: - type: string - command: - items: - type: string - type: array - container: - type: string - help: - type: string - serviceNameTemplate: - type: string - type: object - 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 more. - type: string - icon: - properties: - template: - type: string - type: object - link: - properties: - template: - type: string - type: object - name: - description: name is a human readable name for the column. - type: string - pathTemplate: - description: 'PathTemplate is a Go text template that will be - evaluated to determine cell value. Users can use JSONPath - expression to extract nested fields and apply template functions - from Masterminds/sprig library. The template function for - JSON path is called `jp`. Example: {{ jp "{.a.b}" . }} or - {{ jp "{.a.b}" true }}, if json output is desired from JSONPath - parser' - 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 higher priority. - format: int32 - type: integer - shape: - enum: - - Rectangle - - Pill - type: string - sort: - properties: - enable: - type: boolean - 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 more. - type: string - template: - type: string - 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 more. - type: string - required: - - type - type: object - textAlign: - type: string - tooltip: - properties: - template: - type: string - type: object - 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 more. - type: string - required: - - name - - priority - - type - type: object - type: array - defaultView: - type: boolean - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - required: - - defaultView - type: object - type: object - served: true - storage: true diff --git a/vendor/kmodules.xyz/resource-metadata/crds/node.k8s.appscode.com_nodetopologies.yaml b/vendor/kmodules.xyz/resource-metadata/crds/node.k8s.appscode.com_nodetopologies.yaml deleted file mode 100644 index d6ef9809..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/node.k8s.appscode.com_nodetopologies.yaml +++ /dev/null @@ -1,77 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: nodetopologies.node.k8s.appscode.com -spec: - group: node.k8s.appscode.com - names: - kind: NodeTopology - listKind: NodeTopologyList - plural: nodetopologies - singular: nodetopology - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - nodeGroups: - items: - properties: - allocatable: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Allocatable represents the total resources of - a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity' - type: object - topologyValue: - type: string - required: - - allocatable - - topologyValue - type: object - type: array - nodeSelectionPolicy: - enum: - - LabelSelector - - Taint - type: string - topologyKey: - type: string - required: - - nodeSelectionPolicy - - topologyKey - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml deleted file mode 100644 index 591b74f4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml +++ /dev/null @@ -1,216 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: features.ui.k8s.appscode.com -spec: - group: ui.k8s.appscode.com - names: - kind: Feature - listKind: FeatureList - plural: features - singular: feature - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.enabled - name: Enabled - type: boolean - - jsonPath: .status.managed - name: Managed - type: boolean - - jsonPath: .status.ready - name: Ready - type: boolean - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - chart: - description: Chart specifies the chart information that will be used - by the FluxCD to install the respective feature - properties: - name: - description: Name specifies the name of the chart - type: string - namespace: - description: Namespace where the respective feature resources - will be deployed. - type: string - sourceRef: - description: SourceRef specifies the source of the chart - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - description: Version specifies the version of the chart. - type: string - required: - - name - - sourceRef - type: object - description: - description: Description specifies a short description of the service - this feature provides. - type: string - featureBlock: - description: FeatureBlock specifies the ui block name of this feature. - type: string - featureSet: - description: FeatureSet specifies the name of the FeatureSet where - this feature belong to. - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. These - icons will be used in UI. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels (e.g., - 25x25). - type: string - src: - description: The source for image represented as either an absolute - URL to the image or a Data URL containing the image. Data - URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - readinessChecks: - description: ReadinessChecks specifies the conditions for this feature - to be considered enabled. - properties: - resources: - description: Resources specifies the resources that should be - registered to consider this feature as enabled. - items: - description: GroupVersionKind unambiguously identifies a kind. It - doesn't anonymously include GroupVersion to avoid automatic - coercion. It doesn't use a GroupVersion to avoid custom marshalling - properties: - group: - type: string - kind: - type: string - version: - type: string - required: - - group - - kind - - version - type: object - type: array - workloads: - description: Workloads specifies the workloads that should exist - to consider this feature as enabled. - items: - properties: - group: - type: string - kind: - type: string - selector: - additionalProperties: - type: string - description: Selector specifies label selector that should - be used to select this workload - type: object - version: - type: string - required: - - group - - kind - - selector - - version - type: object - type: array - type: object - recommended: - description: Required specifies whether this feature is mandatory - or not for enabling the respecting FeatureSet. - type: boolean - requirements: - description: Requirements specifies the requirements to enable this - feature. - properties: - features: - description: Features specifies a list of Feature names that must - be enabled for using this feature. - items: - type: string - type: array - type: object - title: - description: Title specifies the title of this feature. - type: string - values: - description: Values holds the values for this Helm release. - x-kubernetes-preserve-unknown-fields: true - required: - - description - - featureSet - - title - type: object - status: - properties: - enabled: - description: Enabled specifies whether this feature is enabled or - not. - type: boolean - managed: - description: Managed specifies whether this feature is managed by - AppsCode Inc. or not. - type: boolean - note: - description: Note specifies the respective reason if the feature does - not meet the requirements or is not ready. - type: string - ready: - description: Ready specifies whether this feature is ready to user - or not. This field will be present only for the features that are - managed by AppsCode Inc. - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_featuresets.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_featuresets.yaml deleted file mode 100644 index 86a5ea0d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_featuresets.yaml +++ /dev/null @@ -1,187 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: featuresets.ui.k8s.appscode.com -spec: - group: ui.k8s.appscode.com - names: - kind: FeatureSet - listKind: FeatureSetList - plural: featuresets - singular: featureset - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .spec.required - name: Required - type: boolean - - jsonPath: .status.enabled - name: Enabled - type: boolean - - jsonPath: .status.ready - name: Ready - type: boolean - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - chart: - description: Chart specifies the chart that contains the respective - resources for component features and the UI wizard. - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - description: - description: Description specifies a short description of the services - this feature set provides. - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. These - icons will be used in UI. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels (e.g., - 25x25). - type: string - src: - description: The source for image represented as either an absolute - URL to the image or a Data URL containing the image. Data - URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - recommended: - description: Required specify whether this feature set is mandatory - or not for using the UI. - type: boolean - requiredFeatures: - description: RequiredFeatures specifies list of features that are - necessary to consider this feature set as ready. - items: - type: string - type: array - title: - description: Title specify the title of this feature set. - type: string - required: - - chart - - description - - title - type: object - status: - properties: - dependents: - description: Dependents specifies the feature sets which depend on - this FeatureSet - properties: - featureSets: - description: FeatureSets specifies a list of FeatureSet names - that depend on this FeatureSet - items: - properties: - features: - description: Features specifies the Feature names of the - dependent FeatureSet - items: - type: string - type: array - name: - description: Name specifies the name of the dependent FeatureSet - type: string - type: object - type: array - type: object - enabled: - description: Enabled specifies whether this feature set is enabled - or not. - type: boolean - features: - description: Features specifies the status of the component features - that belong to this feature set. - items: - properties: - enabled: - description: Enabled specifies whether the component feature - has been enabled or not. - type: boolean - managed: - description: Managed specifies whether the component is managed - by platform or not. - type: boolean - name: - description: Name specify the name of the component feature. - type: string - ready: - description: Ready specifies whether the component feature is - ready or not. - type: boolean - required: - - name - type: object - type: array - note: - description: Note specifies the respective reason if the feature set - is considered as disabled. - type: string - ready: - description: Ready specifies whether this feature set is ready not. - type: boolean - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml deleted file mode 100644 index 745fde73..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml +++ /dev/null @@ -1,177 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourcedashboards.ui.k8s.appscode.com -spec: - group: ui.k8s.appscode.com - names: - kind: ResourceDashboard - listKind: ResourceDashboardList - plural: resourcedashboards - singular: resourcedashboard - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - dashboards: - items: - properties: - if: - properties: - condition: - type: string - connected: - properties: - query: - properties: - byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) - enum: - - authn - - authz - - auth_secret - - backup_via - - catalog - - cert_issuer - - config - - connect_via - - exposed_by - - event - - located_on - - monitored_by - - ocm_bind - - offshoot - - ops - - placed_into - - policy - - recommended_for - - restore_into - - scaled_by - - source - - storage - - view - type: string - raw: - type: string - type: - enum: - - REST - - GraphQL - type: string - required: - - type - type: object - ref: - description: GroupKind specifies a Group and a Kind, - but does not force a version. This is useful for - identifying concepts during lookup stages without - having partially valid types - properties: - group: - type: string - kind: - type: string - required: - - group - - kind - type: object - required: - - query - - ref - type: object - type: object - panels: - items: - properties: - title: - type: string - width: - type: integer - required: - - title - type: object - type: array - title: - type: string - vars: - items: - properties: - name: - type: string - type: - default: Source - enum: - - Source - - Target - type: string - value: - type: string - required: - - name - - value - type: object - type: array - type: object - type: array - provider: - enum: - - Grafana - type: string - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - required: - - dashboards - - resource - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourceeditors.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourceeditors.yaml deleted file mode 100644 index 6851fec3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourceeditors.yaml +++ /dev/null @@ -1,378 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: resourceeditors.ui.k8s.appscode.com -spec: - group: ui.k8s.appscode.com - names: - kind: ResourceEditor - listKind: ResourceEditorList - plural: resourceeditors - singular: resourceeditor - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.phase - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels (e.g., - 25x25). - type: string - src: - description: The source for image represented as either an absolute - URL to the image or a Data URL containing the image. Data - URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - installer: - properties: - chart: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - planID: - type: string - productID: - type: string - type: object - resource: - description: ResourceID identifies a resource - properties: - group: - type: string - kind: - description: Kind is the serialized kind of the resource. It - is normally CamelCase and singular. - type: string - name: - description: 'Name is the plural name of the resource to serve. It - must match the name of the CustomResourceDefinition-registration - too: plural.group and it must be all lowercase.' - type: string - scope: - description: ResourceScope is an enum defining the different scopes - available to a custom resource - type: string - version: - type: string - required: - - group - type: object - ui: - properties: - actions: - items: - properties: - description: - type: string - items: - items: - properties: - description: - type: string - disabledTemplate: - type: string - editor: - description: ChartSourceRef references to a single - version of a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an - typed namespaced object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - enforceQuota: - type: boolean - flow: - type: string - icons: - items: - description: ImageSpec contains information about - an image used as an icon. - properties: - size: - description: (optional) The size of the image - in pixels (e.g., 25x25). - type: string - src: - description: The source for image represented - as either an absolute URL to the image or - a Data URL containing the image. Data URLs - are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the - image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - name: - type: string - operationId: - type: string - required: - - enforceQuota - - flow - - operationId - type: object - type: array - name: - type: string - required: - - items - type: object - type: array - editor: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - enforceQuota: - type: boolean - instanceLabelPaths: - description: app.kubernetes.io/instance label must be updated - at these paths when refilling metadata - items: - type: string - type: array - options: - description: ChartSourceRef references to a single version of - a Chart - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - required: - - enforceQuota - type: object - variants: - description: Kind == VendorChartPreset | ClusterChartPreset - items: - properties: - description: - type: string - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image - used as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - name: - type: string - selector: - 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. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. This - array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - title: - type: string - required: - - name - type: object - type: array - required: - - resource - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1/challenges.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1/challenges.yaml deleted file mode 100644 index a063bb8a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1/challenges.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Challenge - k8s.io/resource: challenges - k8s.io/version: v1 - name: acme.cert-manager.io-v1-challenges -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.png - type: image/png - installer: - chart: - name: cert-manager - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: jetstack - version: "" - resource: - group: acme.cert-manager.io - kind: Challenge - name: challenges - scope: Namespaced - version: v1 - ui: - editor: - name: acmecertmanagerio-challenge-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1/orders.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1/orders.yaml deleted file mode 100644 index 53c7cf9e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1/orders.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Order - k8s.io/resource: orders - k8s.io/version: v1 - name: acme.cert-manager.io-v1-orders -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.png - type: image/png - installer: - chart: - name: cert-manager - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: jetstack - version: "" - resource: - group: acme.cert-manager.io - kind: Order - name: orders - scope: Namespaced - version: v1 - ui: - editor: - name: acmecertmanagerio-order-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha2/challenges.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha2/challenges.yaml deleted file mode 100644 index 5bab2b17..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha2/challenges.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Challenge - k8s.io/resource: challenges - k8s.io/version: v1alpha2 - name: acme.cert-manager.io-v1alpha2-challenges -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.png - type: image/png - resource: - group: acme.cert-manager.io - kind: Challenge - name: challenges - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha2/orders.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha2/orders.yaml deleted file mode 100644 index f791da00..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha2/orders.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Order - k8s.io/resource: orders - k8s.io/version: v1alpha2 - name: acme.cert-manager.io-v1alpha2-orders -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.png - type: image/png - resource: - group: acme.cert-manager.io - kind: Order - name: orders - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha3/challenges.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha3/challenges.yaml deleted file mode 100644 index b8d29c6c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha3/challenges.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Challenge - k8s.io/resource: challenges - k8s.io/version: v1alpha3 - name: acme.cert-manager.io-v1alpha3-challenges -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.png - type: image/png - resource: - group: acme.cert-manager.io - kind: Challenge - name: challenges - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha3/orders.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha3/orders.yaml deleted file mode 100644 index 1bca5d82..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1alpha3/orders.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Order - k8s.io/resource: orders - k8s.io/version: v1alpha3 - name: acme.cert-manager.io-v1alpha3-orders -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.png - type: image/png - resource: - group: acme.cert-manager.io - kind: Order - name: orders - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1beta1/challenges.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1beta1/challenges.yaml deleted file mode 100644 index 5c824256..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1beta1/challenges.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Challenge - k8s.io/resource: challenges - k8s.io/version: v1beta1 - name: acme.cert-manager.io-v1beta1-challenges -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/challenges.png - type: image/png - resource: - group: acme.cert-manager.io - kind: Challenge - name: challenges - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1beta1/orders.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1beta1/orders.yaml deleted file mode 100644 index ce9ddb67..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/acme.cert-manager.io/v1beta1/orders.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: acme.cert-manager.io - k8s.io/kind: Order - k8s.io/resource: orders - k8s.io/version: v1beta1 - name: acme.cert-manager.io-v1beta1-orders -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/acme.cert-manager.io/orders.png - type: image/png - resource: - group: acme.cert-manager.io - kind: Order - name: orders - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/addondeploymentconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/addondeploymentconfigs.yaml deleted file mode 100644 index aa2a367d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/addondeploymentconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addon.open-cluster-management.io - k8s.io/kind: AddOnDeploymentConfig - k8s.io/resource: addondeploymentconfigs - k8s.io/version: v1alpha1 - name: addon.open-cluster-management.io-v1alpha1-addondeploymentconfigs -spec: - resource: - group: addon.open-cluster-management.io - kind: AddOnDeploymentConfig - name: addondeploymentconfigs - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: addonopenclustermanagementio-addondeploymentconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/addontemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/addontemplates.yaml deleted file mode 100644 index f667d36b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/addontemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addon.open-cluster-management.io - k8s.io/kind: AddOnTemplate - k8s.io/resource: addontemplates - k8s.io/version: v1alpha1 - name: addon.open-cluster-management.io-v1alpha1-addontemplates -spec: - resource: - group: addon.open-cluster-management.io - kind: AddOnTemplate - name: addontemplates - scope: Cluster - version: v1alpha1 - ui: - editor: - name: addonopenclustermanagementio-addontemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/clustermanagementaddons.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/clustermanagementaddons.yaml deleted file mode 100644 index 6650a603..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/clustermanagementaddons.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addon.open-cluster-management.io - k8s.io/kind: ClusterManagementAddOn - k8s.io/resource: clustermanagementaddons - k8s.io/version: v1alpha1 - name: addon.open-cluster-management.io-v1alpha1-clustermanagementaddons -spec: - resource: - group: addon.open-cluster-management.io - kind: ClusterManagementAddOn - name: clustermanagementaddons - scope: Cluster - version: v1alpha1 - ui: - editor: - name: addonopenclustermanagementio-clustermanagementaddon-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/managedclusteraddons.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/managedclusteraddons.yaml deleted file mode 100644 index 5ce33a79..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addon.open-cluster-management.io/v1alpha1/managedclusteraddons.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addon.open-cluster-management.io - k8s.io/kind: ManagedClusterAddOn - k8s.io/resource: managedclusteraddons - k8s.io/version: v1alpha1 - name: addon.open-cluster-management.io-v1alpha1-managedclusteraddons -spec: - resource: - group: addon.open-cluster-management.io - kind: ManagedClusterAddOn - name: managedclusteraddons - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: addonopenclustermanagementio-managedclusteraddon-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha3/clusterresourcesetbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha3/clusterresourcesetbindings.yaml deleted file mode 100644 index e411344f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha3/clusterresourcesetbindings.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.cluster.x-k8s.io - k8s.io/kind: ClusterResourceSetBinding - k8s.io/resource: clusterresourcesetbindings - k8s.io/version: v1alpha3 - name: addons.cluster.x-k8s.io-v1alpha3-clusterresourcesetbindings -spec: - resource: - group: addons.cluster.x-k8s.io - kind: ClusterResourceSetBinding - name: clusterresourcesetbindings - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha3/clusterresourcesets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha3/clusterresourcesets.yaml deleted file mode 100644 index c23c60c5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha3/clusterresourcesets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.cluster.x-k8s.io - k8s.io/kind: ClusterResourceSet - k8s.io/resource: clusterresourcesets - k8s.io/version: v1alpha3 - name: addons.cluster.x-k8s.io-v1alpha3-clusterresourcesets -spec: - resource: - group: addons.cluster.x-k8s.io - kind: ClusterResourceSet - name: clusterresourcesets - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha4/clusterresourcesetbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha4/clusterresourcesetbindings.yaml deleted file mode 100644 index d42a83cd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha4/clusterresourcesetbindings.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.cluster.x-k8s.io - k8s.io/kind: ClusterResourceSetBinding - k8s.io/resource: clusterresourcesetbindings - k8s.io/version: v1alpha4 - name: addons.cluster.x-k8s.io-v1alpha4-clusterresourcesetbindings -spec: - resource: - group: addons.cluster.x-k8s.io - kind: ClusterResourceSetBinding - name: clusterresourcesetbindings - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha4/clusterresourcesets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha4/clusterresourcesets.yaml deleted file mode 100644 index 160e007c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1alpha4/clusterresourcesets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.cluster.x-k8s.io - k8s.io/kind: ClusterResourceSet - k8s.io/resource: clusterresourcesets - k8s.io/version: v1alpha4 - name: addons.cluster.x-k8s.io-v1alpha4-clusterresourcesets -spec: - resource: - group: addons.cluster.x-k8s.io - kind: ClusterResourceSet - name: clusterresourcesets - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1beta1/clusterresourcesetbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1beta1/clusterresourcesetbindings.yaml deleted file mode 100644 index 2729b73e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1beta1/clusterresourcesetbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.cluster.x-k8s.io - k8s.io/kind: ClusterResourceSetBinding - k8s.io/resource: clusterresourcesetbindings - k8s.io/version: v1beta1 - name: addons.cluster.x-k8s.io-v1beta1-clusterresourcesetbindings -spec: - resource: - group: addons.cluster.x-k8s.io - kind: ClusterResourceSetBinding - name: clusterresourcesetbindings - scope: Namespaced - version: v1beta1 - ui: - editor: - name: addonsclusterxk8sio-clusterresourcesetbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1beta1/clusterresourcesets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1beta1/clusterresourcesets.yaml deleted file mode 100644 index 9c85fea1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.cluster.x-k8s.io/v1beta1/clusterresourcesets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.cluster.x-k8s.io - k8s.io/kind: ClusterResourceSet - k8s.io/resource: clusterresourcesets - k8s.io/version: v1beta1 - name: addons.cluster.x-k8s.io-v1beta1-clusterresourcesets -spec: - resource: - group: addons.cluster.x-k8s.io - kind: ClusterResourceSet - name: clusterresourcesets - scope: Namespaced - version: v1beta1 - ui: - editor: - name: addonsclusterxk8sio-clusterresourceset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.kubestash.com/v1alpha1/addons.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.kubestash.com/v1alpha1/addons.yaml deleted file mode 100644 index 6f15f1f2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.kubestash.com/v1alpha1/addons.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.kubestash.com - k8s.io/kind: Addon - k8s.io/resource: addons - k8s.io/version: v1alpha1 - name: addons.kubestash.com-v1alpha1-addons -spec: - resource: - group: addons.kubestash.com - kind: Addon - name: addons - scope: Cluster - version: v1alpha1 - ui: - editor: - name: addonskubestashcom-addon-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.kubestash.com/v1alpha1/functions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.kubestash.com/v1alpha1/functions.yaml deleted file mode 100644 index 9ee1fdce..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/addons.kubestash.com/v1alpha1/functions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: addons.kubestash.com - k8s.io/kind: Function - k8s.io/resource: functions - k8s.io/version: v1alpha1 - name: addons.kubestash.com-v1alpha1-functions -spec: - resource: - group: addons.kubestash.com - kind: Function - name: functions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: addonskubestashcom-function-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations.yaml deleted file mode 100644 index 688d19d1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: admissionregistration.k8s.io - k8s.io/kind: MutatingWebhookConfiguration - k8s.io/resource: mutatingwebhookconfigurations - k8s.io/version: v1 - name: admissionregistration.k8s.io-v1-mutatingwebhookconfigurations -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/admissionregistration.k8s.io/mutatingwebhookconfigurations.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/admissionregistration.k8s.io/mutatingwebhookconfigurations.png - type: image/png - resource: - group: admissionregistration.k8s.io - kind: MutatingWebhookConfiguration - name: mutatingwebhookconfigurations - scope: Cluster - version: v1 - ui: - editor: - name: admissionregistrationk8sio-mutatingwebhookconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/admissionregistration.k8s.io/v1/validatingwebhookconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/admissionregistration.k8s.io/v1/validatingwebhookconfigurations.yaml deleted file mode 100644 index 78c3f1b7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/admissionregistration.k8s.io/v1/validatingwebhookconfigurations.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: admissionregistration.k8s.io - k8s.io/kind: ValidatingWebhookConfiguration - k8s.io/resource: validatingwebhookconfigurations - k8s.io/version: v1 - name: admissionregistration.k8s.io-v1-validatingwebhookconfigurations -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/admissionregistration.k8s.io/validatingwebhookconfigurations.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/admissionregistration.k8s.io/validatingwebhookconfigurations.png - type: image/png - resource: - group: admissionregistration.k8s.io - kind: ValidatingWebhookConfiguration - name: validatingwebhookconfigurations - scope: Cluster - version: v1 - ui: - editor: - name: admissionregistrationk8sio-validatingwebhookconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositeresourcedefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositeresourcedefinitions.yaml deleted file mode 100644 index 6d081da8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositeresourcedefinitions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apiextensions.crossplane.io - k8s.io/kind: CompositeResourceDefinition - k8s.io/resource: compositeresourcedefinitions - k8s.io/version: v1 - name: apiextensions.crossplane.io-v1-compositeresourcedefinitions -spec: - resource: - group: apiextensions.crossplane.io - kind: CompositeResourceDefinition - name: compositeresourcedefinitions - scope: Cluster - version: v1 - ui: - editor: - name: apiextensionscrossplaneio-compositeresourcedefinition-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositionrevisions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositionrevisions.yaml deleted file mode 100644 index a3168ca8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositionrevisions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apiextensions.crossplane.io - k8s.io/kind: CompositionRevision - k8s.io/resource: compositionrevisions - k8s.io/version: v1 - name: apiextensions.crossplane.io-v1-compositionrevisions -spec: - resource: - group: apiextensions.crossplane.io - kind: CompositionRevision - name: compositionrevisions - scope: Cluster - version: v1 - ui: - editor: - name: apiextensionscrossplaneio-compositionrevision-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositions.yaml deleted file mode 100644 index 3e379a0c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1/compositions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apiextensions.crossplane.io - k8s.io/kind: Composition - k8s.io/resource: compositions - k8s.io/version: v1 - name: apiextensions.crossplane.io-v1-compositions -spec: - resource: - group: apiextensions.crossplane.io - kind: Composition - name: compositions - scope: Cluster - version: v1 - ui: - editor: - name: apiextensionscrossplaneio-composition-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1alpha1/environmentconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1alpha1/environmentconfigs.yaml deleted file mode 100644 index 943fb70d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1alpha1/environmentconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apiextensions.crossplane.io - k8s.io/kind: EnvironmentConfig - k8s.io/resource: environmentconfigs - k8s.io/version: v1alpha1 - name: apiextensions.crossplane.io-v1alpha1-environmentconfigs -spec: - resource: - group: apiextensions.crossplane.io - kind: EnvironmentConfig - name: environmentconfigs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: apiextensionscrossplaneio-environmentconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1beta1/compositionrevisions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1beta1/compositionrevisions.yaml deleted file mode 100644 index 2b977393..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.crossplane.io/v1beta1/compositionrevisions.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apiextensions.crossplane.io - k8s.io/kind: CompositionRevision - k8s.io/resource: compositionrevisions - k8s.io/version: v1beta1 - name: apiextensions.crossplane.io-v1beta1-compositionrevisions -spec: - resource: - group: apiextensions.crossplane.io - kind: CompositionRevision - name: compositionrevisions - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.k8s.io/v1/customresourcedefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.k8s.io/v1/customresourcedefinitions.yaml deleted file mode 100644 index 676af2b9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiextensions.k8s.io/v1/customresourcedefinitions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apiextensions.k8s.io - k8s.io/kind: CustomResourceDefinition - k8s.io/resource: customresourcedefinitions - k8s.io/version: v1 - name: apiextensions.k8s.io-v1-customresourcedefinitions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/apiextensions.k8s.io/customresourcedefinitions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/apiextensions.k8s.io/customresourcedefinitions.png - type: image/png - resource: - group: apiextensions.k8s.io - kind: CustomResourceDefinition - name: customresourcedefinitions - scope: Cluster - version: v1 - ui: - editor: - name: apiextensionsk8sio-customresourcedefinition-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiregistration.k8s.io/v1/apiservices.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiregistration.k8s.io/v1/apiservices.yaml deleted file mode 100644 index 40274058..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apiregistration.k8s.io/v1/apiservices.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apiregistration.k8s.io - k8s.io/kind: APIService - k8s.io/resource: apiservices - k8s.io/version: v1 - name: apiregistration.k8s.io-v1-apiservices -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/apiregistration.k8s.io/apiservices.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/apiregistration.k8s.io/apiservices.png - type: image/png - resource: - group: apiregistration.k8s.io - kind: APIService - name: apiservices - scope: Cluster - version: v1 - ui: - editor: - name: apiregistrationk8sio-apiservice-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/app.k8s.io/v1beta1/applications.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/app.k8s.io/v1beta1/applications.yaml deleted file mode 100644 index c1fd189e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/app.k8s.io/v1beta1/applications.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: app.k8s.io - k8s.io/kind: Application - k8s.io/resource: applications - k8s.io/version: v1beta1 - name: app.k8s.io-v1beta1-applications -spec: - resource: - group: app.k8s.io - kind: Application - name: applications - scope: Namespaced - version: v1beta1 - ui: - editor: - name: appk8sio-application-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - instanceLabelPaths: - - spec.selector.matchLabels diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/appcatalog.appscode.com/v1alpha1/appbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/appcatalog.appscode.com/v1alpha1/appbindings.yaml deleted file mode 100644 index a8e3061b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/appcatalog.appscode.com/v1alpha1/appbindings.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: appcatalog.appscode.com - k8s.io/kind: AppBinding - k8s.io/resource: appbindings - k8s.io/version: v1alpha1 - name: appcatalog.appscode.com-v1alpha1-appbindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/appcatalog.appscode.com/appbindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/appcatalog.appscode.com/appbindings.png - type: image/png - resource: - group: appcatalog.appscode.com - kind: AppBinding - name: appbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: appcatalogappscodecom-appbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/daemonsets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/daemonsets.yaml deleted file mode 100644 index a5df906a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/daemonsets.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apps - k8s.io/kind: DaemonSet - k8s.io/resource: daemonsets - k8s.io/version: v1 - name: apps-v1-daemonsets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/apps/daemonsets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/apps/daemonsets.png - type: image/png - resource: - group: apps - kind: DaemonSet - name: daemonsets - scope: Namespaced - version: v1 - ui: - editor: - name: apps-daemonset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/deployments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/deployments.yaml deleted file mode 100644 index 3471967c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/deployments.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apps - k8s.io/kind: Deployment - k8s.io/resource: deployments - k8s.io/version: v1 - name: apps-v1-deployments -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/apps/deployments.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/apps/deployments.png - type: image/png - resource: - group: apps - kind: Deployment - name: deployments - scope: Namespaced - version: v1 - ui: - editor: - name: apps-deployment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/replicasets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/replicasets.yaml deleted file mode 100644 index ceb1b870..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/replicasets.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apps - k8s.io/kind: ReplicaSet - k8s.io/resource: replicasets - k8s.io/version: v1 - name: apps-v1-replicasets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/apps/replicasets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/apps/replicasets.png - type: image/png - resource: - group: apps - kind: ReplicaSet - name: replicasets - scope: Namespaced - version: v1 - ui: - editor: - name: apps-replicaset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/statefulsets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/statefulsets.yaml deleted file mode 100644 index 951e2240..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/apps/v1/statefulsets.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: apps - k8s.io/kind: StatefulSet - k8s.io/resource: statefulsets - k8s.io/version: v1 - name: apps-v1-statefulsets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/apps/statefulsets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/apps/statefulsets.png - type: image/png - resource: - group: apps - kind: StatefulSet - name: statefulsets - scope: Namespaced - version: v1 - ui: - editor: - name: apps-statefulset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/mongodbarchivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/mongodbarchivers.yaml deleted file mode 100644 index 4877da38..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/mongodbarchivers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: archiver.kubedb.com - k8s.io/kind: MongoDBArchiver - k8s.io/resource: mongodbarchivers - k8s.io/version: v1alpha1 - name: archiver.kubedb.com-v1alpha1-mongodbarchivers -spec: - resource: - group: archiver.kubedb.com - kind: MongoDBArchiver - name: mongodbarchivers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: archiverkubedbcom-mongodbarchiver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/mysqlarchivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/mysqlarchivers.yaml deleted file mode 100644 index e7ae982b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/mysqlarchivers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: archiver.kubedb.com - k8s.io/kind: MySQLArchiver - k8s.io/resource: mysqlarchivers - k8s.io/version: v1alpha1 - name: archiver.kubedb.com-v1alpha1-mysqlarchivers -spec: - resource: - group: archiver.kubedb.com - kind: MySQLArchiver - name: mysqlarchivers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: archiverkubedbcom-mysqlarchiver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/postgresarchivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/postgresarchivers.yaml deleted file mode 100644 index e2babb79..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/archiver.kubedb.com/v1alpha1/postgresarchivers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: archiver.kubedb.com - k8s.io/kind: PostgresArchiver - k8s.io/resource: postgresarchivers - k8s.io/version: v1alpha1 - name: archiver.kubedb.com-v1alpha1-postgresarchivers -spec: - resource: - group: archiver.kubedb.com - kind: PostgresArchiver - name: postgresarchivers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: archiverkubedbcom-postgresarchiver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/auditor.appscode.com/v1alpha1/siteinfos.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/auditor.appscode.com/v1alpha1/siteinfos.yaml deleted file mode 100644 index a1cdf6af..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/auditor.appscode.com/v1alpha1/siteinfos.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: auditor.appscode.com - k8s.io/kind: SiteInfo - k8s.io/resource: siteinfos - k8s.io/version: v1alpha1 - name: auditor.appscode.com-v1alpha1-siteinfos -spec: - resource: - group: auditor.appscode.com - kind: SiteInfo - name: siteinfos - scope: Cluster - version: v1alpha1 - ui: - editor: - name: auditorappscodecom-siteinfo-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/auditregistration.k8s.io/v1alpha1/auditsinks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/auditregistration.k8s.io/v1alpha1/auditsinks.yaml deleted file mode 100644 index 173d7516..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/auditregistration.k8s.io/v1alpha1/auditsinks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: auditregistration.k8s.io - k8s.io/kind: AuditSink - k8s.io/resource: auditsinks - k8s.io/version: v1alpha1 - name: auditregistration.k8s.io-v1alpha1-auditsinks -spec: - resource: - group: auditregistration.k8s.io - kind: AuditSink - name: auditsinks - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: auditregistrationk8sio-auditsink-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/authorization.azure.kubedb.com/v1alpha1/roleassignments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/authorization.azure.kubedb.com/v1alpha1/roleassignments.yaml deleted file mode 100644 index adcacecd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/authorization.azure.kubedb.com/v1alpha1/roleassignments.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: authorization.azure.kubedb.com - k8s.io/kind: RoleAssignment - k8s.io/resource: roleassignments - k8s.io/version: v1alpha1 - name: authorization.azure.kubedb.com-v1alpha1-roleassignments -spec: - resource: - group: authorization.azure.kubedb.com - kind: RoleAssignment - name: roleassignments - scope: Cluster - version: v1alpha1 - ui: - editor: - name: authorizationazurekubedbcom-roleassignment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.k8s.io/v1/verticalpodautoscalercheckpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.k8s.io/v1/verticalpodautoscalercheckpoints.yaml deleted file mode 100644 index c701c66c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.k8s.io/v1/verticalpodautoscalercheckpoints.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.k8s.io - k8s.io/kind: VerticalPodAutoscalerCheckpoint - k8s.io/resource: verticalpodautoscalercheckpoints - k8s.io/version: v1 - name: autoscaling.k8s.io-v1-verticalpodautoscalercheckpoints -spec: - resource: - group: autoscaling.k8s.io - kind: VerticalPodAutoscalerCheckpoint - name: verticalpodautoscalercheckpoints - scope: Namespaced - version: v1 - ui: - editor: - name: autoscalingk8sio-verticalpodautoscalercheckpoint-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.k8s.io/v1/verticalpodautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.k8s.io/v1/verticalpodautoscalers.yaml deleted file mode 100644 index 48a4f2f9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.k8s.io/v1/verticalpodautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.k8s.io - k8s.io/kind: VerticalPodAutoscaler - k8s.io/resource: verticalpodautoscalers - k8s.io/version: v1 - name: autoscaling.k8s.io-v1-verticalpodautoscalers -spec: - resource: - group: autoscaling.k8s.io - kind: VerticalPodAutoscaler - name: verticalpodautoscalers - scope: Namespaced - version: v1 - ui: - editor: - name: autoscalingk8sio-verticalpodautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/elasticsearchautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/elasticsearchautoscalers.yaml deleted file mode 100644 index e8cf5b9a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/elasticsearchautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: ElasticsearchAutoscaler - k8s.io/resource: elasticsearchautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-elasticsearchautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: ElasticsearchAutoscaler - name: elasticsearchautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-elasticsearchautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/etcdautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/etcdautoscalers.yaml deleted file mode 100644 index 978a47ff..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/etcdautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: EtcdAutoscaler - k8s.io/resource: etcdautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-etcdautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: EtcdAutoscaler - name: etcdautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-etcdautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mariadbautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mariadbautoscalers.yaml deleted file mode 100644 index 9e513e66..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mariadbautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: MariaDBAutoscaler - k8s.io/resource: mariadbautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-mariadbautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: MariaDBAutoscaler - name: mariadbautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-mariadbautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/memcachedautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/memcachedautoscalers.yaml deleted file mode 100644 index 064e7e1a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/memcachedautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: MemcachedAutoscaler - k8s.io/resource: memcachedautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-memcachedautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: MemcachedAutoscaler - name: memcachedautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-memcachedautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mongodbautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mongodbautoscalers.yaml deleted file mode 100644 index ea4640cf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mongodbautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: MongoDBAutoscaler - k8s.io/resource: mongodbautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-mongodbautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: MongoDBAutoscaler - name: mongodbautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-mongodbautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mysqlautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mysqlautoscalers.yaml deleted file mode 100644 index 1b4744bd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/mysqlautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: MySQLAutoscaler - k8s.io/resource: mysqlautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-mysqlautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: MySQLAutoscaler - name: mysqlautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-mysqlautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/perconaxtradbautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/perconaxtradbautoscalers.yaml deleted file mode 100644 index b21c94f9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/perconaxtradbautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: PerconaXtraDBAutoscaler - k8s.io/resource: perconaxtradbautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-perconaxtradbautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: PerconaXtraDBAutoscaler - name: perconaxtradbautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-perconaxtradbautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/pgbouncerautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/pgbouncerautoscalers.yaml deleted file mode 100644 index a81665f5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/pgbouncerautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: PgBouncerAutoscaler - k8s.io/resource: pgbouncerautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-pgbouncerautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: PgBouncerAutoscaler - name: pgbouncerautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-pgbouncerautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/postgresautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/postgresautoscalers.yaml deleted file mode 100644 index 38d47123..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/postgresautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: PostgresAutoscaler - k8s.io/resource: postgresautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-postgresautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: PostgresAutoscaler - name: postgresautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-postgresautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/proxysqlautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/proxysqlautoscalers.yaml deleted file mode 100644 index 8ab0176d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/proxysqlautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: ProxySQLAutoscaler - k8s.io/resource: proxysqlautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-proxysqlautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: ProxySQLAutoscaler - name: proxysqlautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-proxysqlautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/redisautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/redisautoscalers.yaml deleted file mode 100644 index 65b217af..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/redisautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: RedisAutoscaler - k8s.io/resource: redisautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-redisautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: RedisAutoscaler - name: redisautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-redisautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/redissentinelautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/redissentinelautoscalers.yaml deleted file mode 100644 index c0f72b3b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling.kubedb.com/v1alpha1/redissentinelautoscalers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling.kubedb.com - k8s.io/kind: RedisSentinelAutoscaler - k8s.io/resource: redissentinelautoscalers - k8s.io/version: v1alpha1 - name: autoscaling.kubedb.com-v1alpha1-redissentinelautoscalers -spec: - resource: - group: autoscaling.kubedb.com - kind: RedisSentinelAutoscaler - name: redissentinelautoscalers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: autoscalingkubedbcom-redissentinelautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling/v2beta2/horizontalpodautoscalers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling/v2beta2/horizontalpodautoscalers.yaml deleted file mode 100644 index d4af227a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/autoscaling/v2beta2/horizontalpodautoscalers.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: autoscaling - k8s.io/kind: HorizontalPodAutoscaler - k8s.io/resource: horizontalpodautoscalers - k8s.io/version: v2beta2 - name: autoscaling-v2beta2-horizontalpodautoscalers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/autoscaling/horizontalpodautoscalers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/autoscaling/horizontalpodautoscalers.png - type: image/png - resource: - group: autoscaling - kind: HorizontalPodAutoscaler - name: horizontalpodautoscalers - scope: Namespaced - version: v2beta2 - ui: - editor: - name: autoscaling-horizontalpodautoscaler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1alpha1/storeconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1alpha1/storeconfigs.yaml deleted file mode 100644 index d4de64d0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1alpha1/storeconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: aws.kubedb.com - k8s.io/kind: StoreConfig - k8s.io/resource: storeconfigs - k8s.io/version: v1alpha1 - name: aws.kubedb.com-v1alpha1-storeconfigs -spec: - resource: - group: aws.kubedb.com - kind: StoreConfig - name: storeconfigs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: awskubedbcom-storeconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1beta1/providerconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1beta1/providerconfigs.yaml deleted file mode 100644 index d5428469..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1beta1/providerconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: aws.kubedb.com - k8s.io/kind: ProviderConfig - k8s.io/resource: providerconfigs - k8s.io/version: v1beta1 - name: aws.kubedb.com-v1beta1-providerconfigs -spec: - resource: - group: aws.kubedb.com - kind: ProviderConfig - name: providerconfigs - scope: Cluster - version: v1beta1 - ui: - editor: - name: awskubedbcom-providerconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1beta1/providerconfigusages.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1beta1/providerconfigusages.yaml deleted file mode 100644 index af268ecd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/aws.kubedb.com/v1beta1/providerconfigusages.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: aws.kubedb.com - k8s.io/kind: ProviderConfigUsage - k8s.io/resource: providerconfigusages - k8s.io/version: v1beta1 - name: aws.kubedb.com-v1beta1-providerconfigusages -spec: - resource: - group: aws.kubedb.com - kind: ProviderConfigUsage - name: providerconfigusages - scope: Cluster - version: v1beta1 - ui: - editor: - name: awskubedbcom-providerconfigusage-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/providerregistrations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/providerregistrations.yaml deleted file mode 100644 index af033412..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/providerregistrations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: azure.kubedb.com - k8s.io/kind: ProviderRegistration - k8s.io/resource: providerregistrations - k8s.io/version: v1alpha1 - name: azure.kubedb.com-v1alpha1-providerregistrations -spec: - resource: - group: azure.kubedb.com - kind: ProviderRegistration - name: providerregistrations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: azurekubedbcom-providerregistration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/resourcegroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/resourcegroups.yaml deleted file mode 100644 index 7b8d0369..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/resourcegroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: azure.kubedb.com - k8s.io/kind: ResourceGroup - k8s.io/resource: resourcegroups - k8s.io/version: v1alpha1 - name: azure.kubedb.com-v1alpha1-resourcegroups -spec: - resource: - group: azure.kubedb.com - kind: ResourceGroup - name: resourcegroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: azurekubedbcom-resourcegroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/storeconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/storeconfigs.yaml deleted file mode 100644 index 6cc8f55e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/storeconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: azure.kubedb.com - k8s.io/kind: StoreConfig - k8s.io/resource: storeconfigs - k8s.io/version: v1alpha1 - name: azure.kubedb.com-v1alpha1-storeconfigs -spec: - resource: - group: azure.kubedb.com - kind: StoreConfig - name: storeconfigs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: azurekubedbcom-storeconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/subscriptions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/subscriptions.yaml deleted file mode 100644 index d18a637a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1alpha1/subscriptions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: azure.kubedb.com - k8s.io/kind: Subscription - k8s.io/resource: subscriptions - k8s.io/version: v1alpha1 - name: azure.kubedb.com-v1alpha1-subscriptions -spec: - resource: - group: azure.kubedb.com - kind: Subscription - name: subscriptions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: azurekubedbcom-subscription-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1beta1/providerconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1beta1/providerconfigs.yaml deleted file mode 100644 index 8cefe922..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1beta1/providerconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: azure.kubedb.com - k8s.io/kind: ProviderConfig - k8s.io/resource: providerconfigs - k8s.io/version: v1beta1 - name: azure.kubedb.com-v1beta1-providerconfigs -spec: - resource: - group: azure.kubedb.com - kind: ProviderConfig - name: providerconfigs - scope: Cluster - version: v1beta1 - ui: - editor: - name: azurekubedbcom-providerconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1beta1/providerconfigusages.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1beta1/providerconfigusages.yaml deleted file mode 100644 index 3dd07775..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/azure.kubedb.com/v1beta1/providerconfigusages.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: azure.kubedb.com - k8s.io/kind: ProviderConfigUsage - k8s.io/resource: providerconfigusages - k8s.io/version: v1beta1 - name: azure.kubedb.com-v1beta1-providerconfigusages -spec: - resource: - group: azure.kubedb.com - kind: ProviderConfigUsage - name: providerconfigusages - scope: Cluster - version: v1beta1 - ui: - editor: - name: azurekubedbcom-providerconfigusage-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1/cronjobs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1/cronjobs.yaml deleted file mode 100644 index e27bb34c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1/cronjobs.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: batch - k8s.io/kind: CronJob - k8s.io/resource: cronjobs - k8s.io/version: v1 - name: batch-v1-cronjobs -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/batch/cronjobs.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/batch/cronjobs.png - type: image/png - resource: - group: batch - kind: CronJob - name: cronjobs - scope: Namespaced - version: v1 - ui: - editor: - name: batch-cronjob-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1/jobs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1/jobs.yaml deleted file mode 100644 index f40002fe..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1/jobs.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: batch - k8s.io/kind: Job - k8s.io/resource: jobs - k8s.io/version: v1 - name: batch-v1-jobs -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/batch/jobs.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/batch/jobs.png - type: image/png - resource: - group: batch - kind: Job - name: jobs - scope: Namespaced - version: v1 - ui: - editor: - name: batch-job-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1beta1/cronjobs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1beta1/cronjobs.yaml deleted file mode 100644 index dbadf992..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/batch/v1beta1/cronjobs.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: batch - k8s.io/kind: CronJob - k8s.io/resource: cronjobs - k8s.io/version: v1beta1 - name: batch-v1beta1-cronjobs -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/batch/cronjobs.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/batch/cronjobs.png - type: image/png - resource: - group: batch - kind: CronJob - name: cronjobs - scope: Namespaced - version: v1beta1 - ui: - editor: - name: batch-cronjob-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta1/eksconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta1/eksconfigs.yaml deleted file mode 100644 index bc5146c8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta1/eksconfigs.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: bootstrap.cluster.x-k8s.io - k8s.io/kind: EKSConfig - k8s.io/resource: eksconfigs - k8s.io/version: v1beta1 - name: bootstrap.cluster.x-k8s.io-v1beta1-eksconfigs -spec: - resource: - group: bootstrap.cluster.x-k8s.io - kind: EKSConfig - name: eksconfigs - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta1/eksconfigtemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta1/eksconfigtemplates.yaml deleted file mode 100644 index db0cb8c4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta1/eksconfigtemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: bootstrap.cluster.x-k8s.io - k8s.io/kind: EKSConfigTemplate - k8s.io/resource: eksconfigtemplates - k8s.io/version: v1beta1 - name: bootstrap.cluster.x-k8s.io-v1beta1-eksconfigtemplates -spec: - resource: - group: bootstrap.cluster.x-k8s.io - kind: EKSConfigTemplate - name: eksconfigtemplates - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta2/eksconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta2/eksconfigs.yaml deleted file mode 100644 index 00f0ab35..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta2/eksconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: bootstrap.cluster.x-k8s.io - k8s.io/kind: EKSConfig - k8s.io/resource: eksconfigs - k8s.io/version: v1beta2 - name: bootstrap.cluster.x-k8s.io-v1beta2-eksconfigs -spec: - resource: - group: bootstrap.cluster.x-k8s.io - kind: EKSConfig - name: eksconfigs - scope: Namespaced - version: v1beta2 - ui: - editor: - name: bootstrapclusterxk8sio-eksconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta2/eksconfigtemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta2/eksconfigtemplates.yaml deleted file mode 100644 index bbdd8a51..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/bootstrap.cluster.x-k8s.io/v1beta2/eksconfigtemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: bootstrap.cluster.x-k8s.io - k8s.io/kind: EKSConfigTemplate - k8s.io/resource: eksconfigtemplates - k8s.io/version: v1beta2 - name: bootstrap.cluster.x-k8s.io-v1beta2-eksconfigtemplates -spec: - resource: - group: bootstrap.cluster.x-k8s.io - kind: EKSConfigTemplate - name: eksconfigtemplates - scope: Namespaced - version: v1beta2 - ui: - editor: - name: bootstrapclusterxk8sio-eksconfigtemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/rediscaches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/rediscaches.yaml deleted file mode 100644 index b8c49a1b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/rediscaches.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cache.azure.kubedb.com - k8s.io/kind: RedisCache - k8s.io/resource: rediscaches - k8s.io/version: v1alpha1 - name: cache.azure.kubedb.com-v1alpha1-rediscaches -spec: - resource: - group: cache.azure.kubedb.com - kind: RedisCache - name: rediscaches - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cacheazurekubedbcom-rediscache-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisenterpriseclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisenterpriseclusters.yaml deleted file mode 100644 index 5ecad1ab..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisenterpriseclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cache.azure.kubedb.com - k8s.io/kind: RedisEnterpriseCluster - k8s.io/resource: redisenterpriseclusters - k8s.io/version: v1alpha1 - name: cache.azure.kubedb.com-v1alpha1-redisenterpriseclusters -spec: - resource: - group: cache.azure.kubedb.com - kind: RedisEnterpriseCluster - name: redisenterpriseclusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cacheazurekubedbcom-redisenterprisecluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisenterprisedatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisenterprisedatabases.yaml deleted file mode 100644 index 1d7a1721..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisenterprisedatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cache.azure.kubedb.com - k8s.io/kind: RedisEnterpriseDatabase - k8s.io/resource: redisenterprisedatabases - k8s.io/version: v1alpha1 - name: cache.azure.kubedb.com-v1alpha1-redisenterprisedatabases -spec: - resource: - group: cache.azure.kubedb.com - kind: RedisEnterpriseDatabase - name: redisenterprisedatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cacheazurekubedbcom-redisenterprisedatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisfirewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisfirewallrules.yaml deleted file mode 100644 index 82f0fe97..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redisfirewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cache.azure.kubedb.com - k8s.io/kind: RedisFirewallRule - k8s.io/resource: redisfirewallrules - k8s.io/version: v1alpha1 - name: cache.azure.kubedb.com-v1alpha1-redisfirewallrules -spec: - resource: - group: cache.azure.kubedb.com - kind: RedisFirewallRule - name: redisfirewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cacheazurekubedbcom-redisfirewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redislinkedservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redislinkedservers.yaml deleted file mode 100644 index 0b6153b3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cache.azure.kubedb.com/v1alpha1/redislinkedservers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cache.azure.kubedb.com - k8s.io/kind: RedisLinkedServer - k8s.io/resource: redislinkedservers - k8s.io/version: v1alpha1 - name: cache.azure.kubedb.com-v1alpha1-redislinkedservers -spec: - resource: - group: cache.azure.kubedb.com - kind: RedisLinkedServer - name: redislinkedservers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cacheazurekubedbcom-redislinkedserver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/elasticsearchversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/elasticsearchversions.yaml deleted file mode 100644 index 9920e347..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/elasticsearchversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: ElasticsearchVersion - k8s.io/resource: elasticsearchversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-elasticsearchversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/elasticsearchversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/elasticsearchversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: ElasticsearchVersion - name: elasticsearchversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-elasticsearchversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/etcdversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/etcdversions.yaml deleted file mode 100644 index aaa1e145..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/etcdversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: EtcdVersion - k8s.io/resource: etcdversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-etcdversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/etcdversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/etcdversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: EtcdVersion - name: etcdversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-etcdversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/kafkaversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/kafkaversions.yaml deleted file mode 100644 index 6997d32d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/kafkaversions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: KafkaVersion - k8s.io/resource: kafkaversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-kafkaversions -spec: - resource: - group: catalog.kubedb.com - kind: KafkaVersion - name: kafkaversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-kafkaversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mariadbversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mariadbversions.yaml deleted file mode 100644 index d0c591bd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mariadbversions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: MariaDBVersion - k8s.io/resource: mariadbversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-mariadbversions -spec: - resource: - group: catalog.kubedb.com - kind: MariaDBVersion - name: mariadbversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-mariadbversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/memcachedversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/memcachedversions.yaml deleted file mode 100644 index c1e8a871..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/memcachedversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: MemcachedVersion - k8s.io/resource: memcachedversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-memcachedversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/memcachedversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/memcachedversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: MemcachedVersion - name: memcachedversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-memcachedversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mongodbversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mongodbversions.yaml deleted file mode 100644 index 98c6cd1e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mongodbversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: MongoDBVersion - k8s.io/resource: mongodbversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-mongodbversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/mongodbversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/mongodbversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: MongoDBVersion - name: mongodbversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-mongodbversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mysqlversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mysqlversions.yaml deleted file mode 100644 index 16d497f3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/mysqlversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: MySQLVersion - k8s.io/resource: mysqlversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-mysqlversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/mysqlversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/mysqlversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: MySQLVersion - name: mysqlversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-mysqlversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/perconaxtradbversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/perconaxtradbversions.yaml deleted file mode 100644 index 136da320..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/perconaxtradbversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: PerconaXtraDBVersion - k8s.io/resource: perconaxtradbversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-perconaxtradbversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/perconaxtradbversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/perconaxtradbversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: PerconaXtraDBVersion - name: perconaxtradbversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-perconaxtradbversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/pgbouncerversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/pgbouncerversions.yaml deleted file mode 100644 index 818b56c7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/pgbouncerversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: PgBouncerVersion - k8s.io/resource: pgbouncerversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-pgbouncerversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/pgbouncerversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/pgbouncerversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: PgBouncerVersion - name: pgbouncerversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-pgbouncerversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/postgresversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/postgresversions.yaml deleted file mode 100644 index ef8fd25a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/postgresversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: PostgresVersion - k8s.io/resource: postgresversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-postgresversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/postgresversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/postgresversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: PostgresVersion - name: postgresversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-postgresversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/proxysqlversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/proxysqlversions.yaml deleted file mode 100644 index 00c3853c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/proxysqlversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: ProxySQLVersion - k8s.io/resource: proxysqlversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-proxysqlversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/proxysqlversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/proxysqlversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: ProxySQLVersion - name: proxysqlversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-proxysqlversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/redisversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/redisversions.yaml deleted file mode 100644 index fc1bfd2c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubedb.com/v1alpha1/redisversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubedb.com - k8s.io/kind: RedisVersion - k8s.io/resource: redisversions - k8s.io/version: v1alpha1 - name: catalog.kubedb.com-v1alpha1-redisversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/redisversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubedb.com/redisversions.png - type: image/png - resource: - group: catalog.kubedb.com - kind: RedisVersion - name: redisversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubedbcom-redisversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubevault.com/v1alpha1/vaultserverversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubevault.com/v1alpha1/vaultserverversions.yaml deleted file mode 100644 index 18b1a31a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubevault.com/v1alpha1/vaultserverversions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubevault.com - k8s.io/kind: VaultServerVersion - k8s.io/resource: vaultserverversions - k8s.io/version: v1alpha1 - name: catalog.kubevault.com-v1alpha1-vaultserverversions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/catalog.kubevault.com/vaultserverversions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/catalog.kubevault.com/vaultserverversions.png - type: image/png - resource: - group: catalog.kubevault.com - kind: VaultServerVersion - name: vaultserverversions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: catalogkubevaultcom-vaultserverversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/elasticsearchbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/elasticsearchbindings.yaml deleted file mode 100644 index d5ff5170..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/elasticsearchbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: ElasticsearchBinding - k8s.io/resource: elasticsearchbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-elasticsearchbindings -spec: - resource: - group: catalog.kubeware.dev - kind: ElasticsearchBinding - name: elasticsearchbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-elasticsearchbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/kafkabindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/kafkabindings.yaml deleted file mode 100644 index a367d22b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/kafkabindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: KafkaBinding - k8s.io/resource: kafkabindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-kafkabindings -spec: - resource: - group: catalog.kubeware.dev - kind: KafkaBinding - name: kafkabindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-kafkabinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mariadbbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mariadbbindings.yaml deleted file mode 100644 index 51fa6eb6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mariadbbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: MariaDBBinding - k8s.io/resource: mariadbbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-mariadbbindings -spec: - resource: - group: catalog.kubeware.dev - kind: MariaDBBinding - name: mariadbbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-mariadbbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/memcachedbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/memcachedbindings.yaml deleted file mode 100644 index 91b7f465..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/memcachedbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: MemcachedBinding - k8s.io/resource: memcachedbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-memcachedbindings -spec: - resource: - group: catalog.kubeware.dev - kind: MemcachedBinding - name: memcachedbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-memcachedbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mongodbbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mongodbbindings.yaml deleted file mode 100644 index 24ae550a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mongodbbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: MongoDBBinding - k8s.io/resource: mongodbbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-mongodbbindings -spec: - resource: - group: catalog.kubeware.dev - kind: MongoDBBinding - name: mongodbbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-mongodbbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mysqlbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mysqlbindings.yaml deleted file mode 100644 index 18ca5a3b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/mysqlbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: MySQLBinding - k8s.io/resource: mysqlbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-mysqlbindings -spec: - resource: - group: catalog.kubeware.dev - kind: MySQLBinding - name: mysqlbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-mysqlbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/perconaxtradbbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/perconaxtradbbindings.yaml deleted file mode 100644 index ab00c080..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/perconaxtradbbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: PerconaXtraDBBinding - k8s.io/resource: perconaxtradbbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-perconaxtradbbindings -spec: - resource: - group: catalog.kubeware.dev - kind: PerconaXtraDBBinding - name: perconaxtradbbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-perconaxtradbbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/pgbouncerbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/pgbouncerbindings.yaml deleted file mode 100644 index f503a39d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/pgbouncerbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: PgBouncerBinding - k8s.io/resource: pgbouncerbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-pgbouncerbindings -spec: - resource: - group: catalog.kubeware.dev - kind: PgBouncerBinding - name: pgbouncerbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-pgbouncerbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/postgresbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/postgresbindings.yaml deleted file mode 100644 index ab352443..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/postgresbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: PostgresBinding - k8s.io/resource: postgresbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-postgresbindings -spec: - resource: - group: catalog.kubeware.dev - kind: PostgresBinding - name: postgresbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-postgresbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/proxysqlbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/proxysqlbindings.yaml deleted file mode 100644 index dae2eebe..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/proxysqlbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: ProxySQLBinding - k8s.io/resource: proxysqlbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-proxysqlbindings -spec: - resource: - group: catalog.kubeware.dev - kind: ProxySQLBinding - name: proxysqlbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-proxysqlbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/redisbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/redisbindings.yaml deleted file mode 100644 index c48ea967..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/catalog.kubeware.dev/v1alpha1/redisbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: catalog.kubeware.dev - k8s.io/kind: RedisBinding - k8s.io/resource: redisbindings - k8s.io/version: v1alpha1 - name: catalog.kubeware.dev-v1alpha1-redisbindings -spec: - resource: - group: catalog.kubeware.dev - kind: RedisBinding - name: redisbindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: catalogkubewaredev-redisbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/certificaterequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/certificaterequests.yaml deleted file mode 100644 index 193cbc03..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/certificaterequests.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: CertificateRequest - k8s.io/resource: certificaterequests - k8s.io/version: v1 - name: cert-manager.io-v1-certificaterequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.png - type: image/png - installer: - chart: - name: cert-manager - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: jetstack - version: "" - resource: - group: cert-manager.io - kind: CertificateRequest - name: certificaterequests - scope: Namespaced - version: v1 - ui: - editor: - name: certmanagerio-certificaterequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/certificates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/certificates.yaml deleted file mode 100644 index d10fd190..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/certificates.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Certificate - k8s.io/resource: certificates - k8s.io/version: v1 - name: cert-manager.io-v1-certificates -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.png - type: image/png - installer: - chart: - name: cert-manager - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: jetstack - version: "" - resource: - group: cert-manager.io - kind: Certificate - name: certificates - scope: Namespaced - version: v1 - ui: - editor: - name: certmanagerio-certificate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/clusterissuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/clusterissuers.yaml deleted file mode 100644 index 0d5467e7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/clusterissuers.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: ClusterIssuer - k8s.io/resource: clusterissuers - k8s.io/version: v1 - name: cert-manager.io-v1-clusterissuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.png - type: image/png - installer: - chart: - name: cert-manager - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: jetstack - version: "" - resource: - group: cert-manager.io - kind: ClusterIssuer - name: clusterissuers - scope: Cluster - version: v1 - ui: - editor: - name: certmanagerio-clusterissuer-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/issuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/issuers.yaml deleted file mode 100644 index 6c80d8c3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1/issuers.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Issuer - k8s.io/resource: issuers - k8s.io/version: v1 - name: cert-manager.io-v1-issuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.png - type: image/png - installer: - chart: - name: cert-manager - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: jetstack - version: "" - resource: - group: cert-manager.io - kind: Issuer - name: issuers - scope: Namespaced - version: v1 - ui: - editor: - name: certmanagerio-issuer-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/certificaterequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/certificaterequests.yaml deleted file mode 100644 index 0a7de10c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/certificaterequests.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: CertificateRequest - k8s.io/resource: certificaterequests - k8s.io/version: v1alpha2 - name: cert-manager.io-v1alpha2-certificaterequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.png - type: image/png - resource: - group: cert-manager.io - kind: CertificateRequest - name: certificaterequests - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/certificates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/certificates.yaml deleted file mode 100644 index c58a2299..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/certificates.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Certificate - k8s.io/resource: certificates - k8s.io/version: v1alpha2 - name: cert-manager.io-v1alpha2-certificates -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.png - type: image/png - resource: - group: cert-manager.io - kind: Certificate - name: certificates - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/clusterissuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/clusterissuers.yaml deleted file mode 100644 index e266dce8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/clusterissuers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: ClusterIssuer - k8s.io/resource: clusterissuers - k8s.io/version: v1alpha2 - name: cert-manager.io-v1alpha2-clusterissuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.png - type: image/png - resource: - group: cert-manager.io - kind: ClusterIssuer - name: clusterissuers - scope: Cluster - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/issuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/issuers.yaml deleted file mode 100644 index 545de40e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha2/issuers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Issuer - k8s.io/resource: issuers - k8s.io/version: v1alpha2 - name: cert-manager.io-v1alpha2-issuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.png - type: image/png - resource: - group: cert-manager.io - kind: Issuer - name: issuers - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/certificaterequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/certificaterequests.yaml deleted file mode 100644 index 6ff5ab8e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/certificaterequests.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: CertificateRequest - k8s.io/resource: certificaterequests - k8s.io/version: v1alpha3 - name: cert-manager.io-v1alpha3-certificaterequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.png - type: image/png - resource: - group: cert-manager.io - kind: CertificateRequest - name: certificaterequests - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/certificates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/certificates.yaml deleted file mode 100644 index 81a30cd5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/certificates.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Certificate - k8s.io/resource: certificates - k8s.io/version: v1alpha3 - name: cert-manager.io-v1alpha3-certificates -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.png - type: image/png - resource: - group: cert-manager.io - kind: Certificate - name: certificates - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/clusterissuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/clusterissuers.yaml deleted file mode 100644 index cc4f59e1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/clusterissuers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: ClusterIssuer - k8s.io/resource: clusterissuers - k8s.io/version: v1alpha3 - name: cert-manager.io-v1alpha3-clusterissuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.png - type: image/png - resource: - group: cert-manager.io - kind: ClusterIssuer - name: clusterissuers - scope: Cluster - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/issuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/issuers.yaml deleted file mode 100644 index d9f9ec54..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1alpha3/issuers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Issuer - k8s.io/resource: issuers - k8s.io/version: v1alpha3 - name: cert-manager.io-v1alpha3-issuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.png - type: image/png - resource: - group: cert-manager.io - kind: Issuer - name: issuers - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/certificaterequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/certificaterequests.yaml deleted file mode 100644 index 95a0897a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/certificaterequests.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: CertificateRequest - k8s.io/resource: certificaterequests - k8s.io/version: v1beta1 - name: cert-manager.io-v1beta1-certificaterequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificaterequests.png - type: image/png - resource: - group: cert-manager.io - kind: CertificateRequest - name: certificaterequests - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/certificates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/certificates.yaml deleted file mode 100644 index 3d7a7ed9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/certificates.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Certificate - k8s.io/resource: certificates - k8s.io/version: v1beta1 - name: cert-manager.io-v1beta1-certificates -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/certificates.png - type: image/png - resource: - group: cert-manager.io - kind: Certificate - name: certificates - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/clusterissuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/clusterissuers.yaml deleted file mode 100644 index ff840eaf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/clusterissuers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: ClusterIssuer - k8s.io/resource: clusterissuers - k8s.io/version: v1beta1 - name: cert-manager.io-v1beta1-clusterissuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/clusterissuers.png - type: image/png - resource: - group: cert-manager.io - kind: ClusterIssuer - name: clusterissuers - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/issuers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/issuers.yaml deleted file mode 100644 index 023d4041..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cert-manager.io/v1beta1/issuers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cert-manager.io - k8s.io/kind: Issuer - k8s.io/resource: issuers - k8s.io/version: v1beta1 - name: cert-manager.io-v1beta1-issuers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cert-manager.io/issuers.png - type: image/png - resource: - group: cert-manager.io - kind: Issuer - name: issuers - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/certificates.k8s.io/v1/certificatesigningrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/certificates.k8s.io/v1/certificatesigningrequests.yaml deleted file mode 100644 index 52896e4a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/certificates.k8s.io/v1/certificatesigningrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: certificates.k8s.io - k8s.io/kind: CertificateSigningRequest - k8s.io/resource: certificatesigningrequests - k8s.io/version: v1 - name: certificates.k8s.io-v1-certificatesigningrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/certificates.k8s.io/certificatesigningrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/certificates.k8s.io/certificatesigningrequests.png - type: image/png - resource: - group: certificates.k8s.io - kind: CertificateSigningRequest - name: certificatesigningrequests - scope: Namespaced - version: v1 - ui: - editor: - name: certificatesk8sio-certificatesigningrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/certificates.k8s.io/v1beta1/certificatesigningrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/certificates.k8s.io/v1beta1/certificatesigningrequests.yaml deleted file mode 100644 index 454b9d19..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/certificates.k8s.io/v1beta1/certificatesigningrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: certificates.k8s.io - k8s.io/kind: CertificateSigningRequest - k8s.io/resource: certificatesigningrequests - k8s.io/version: v1beta1 - name: certificates.k8s.io-v1beta1-certificatesigningrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/certificates.k8s.io/certificatesigningrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/certificates.k8s.io/certificatesigningrequests.png - type: image/png - resource: - group: certificates.k8s.io - kind: CertificateSigningRequest - name: certificatesigningrequests - scope: Cluster - version: v1beta1 - ui: - editor: - name: certificatesk8sio-certificatesigningrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/charts.x-helm.dev/v1alpha1/chartpresets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/charts.x-helm.dev/v1alpha1/chartpresets.yaml deleted file mode 100644 index 3494953c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/charts.x-helm.dev/v1alpha1/chartpresets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: charts.x-helm.dev - k8s.io/kind: ChartPreset - k8s.io/resource: chartpresets - k8s.io/version: v1alpha1 - name: charts.x-helm.dev-v1alpha1-chartpresets -spec: - resource: - group: charts.x-helm.dev - kind: ChartPreset - name: chartpresets - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: chartsxhelmdev-chartpreset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/charts.x-helm.dev/v1alpha1/clusterchartpresets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/charts.x-helm.dev/v1alpha1/clusterchartpresets.yaml deleted file mode 100644 index c32cda76..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/charts.x-helm.dev/v1alpha1/clusterchartpresets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: charts.x-helm.dev - k8s.io/kind: ClusterChartPreset - k8s.io/resource: clusterchartpresets - k8s.io/version: v1alpha1 - name: charts.x-helm.dev-v1alpha1-clusterchartpresets -spec: - resource: - group: charts.x-helm.dev - kind: ClusterChartPreset - name: clusterchartpresets - scope: Cluster - version: v1alpha1 - ui: - editor: - name: chartsxhelmdev-clusterchartpreset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1/managedclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1/managedclusters.yaml deleted file mode 100644 index 4f14ba56..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1/managedclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: ManagedCluster - k8s.io/resource: managedclusters - k8s.io/version: v1 - name: cluster.open-cluster-management.io-v1-managedclusters -spec: - resource: - group: cluster.open-cluster-management.io - kind: ManagedCluster - name: managedclusters - scope: Cluster - version: v1 - ui: - editor: - name: clusteropenclustermanagementio-managedcluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1alpha1/addonplacementscores.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1alpha1/addonplacementscores.yaml deleted file mode 100644 index 22373f21..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1alpha1/addonplacementscores.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: AddOnPlacementScore - k8s.io/resource: addonplacementscores - k8s.io/version: v1alpha1 - name: cluster.open-cluster-management.io-v1alpha1-addonplacementscores -spec: - resource: - group: cluster.open-cluster-management.io - kind: AddOnPlacementScore - name: addonplacementscores - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: clusteropenclustermanagementio-addonplacementscore-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1alpha1/clusterclaims.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1alpha1/clusterclaims.yaml deleted file mode 100644 index 758e7b22..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1alpha1/clusterclaims.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: ClusterClaim - k8s.io/resource: clusterclaims - k8s.io/version: v1alpha1 - name: cluster.open-cluster-management.io-v1alpha1-clusterclaims -spec: - resource: - group: cluster.open-cluster-management.io - kind: ClusterClaim - name: clusterclaims - scope: Cluster - version: v1alpha1 - ui: - editor: - name: clusteropenclustermanagementio-clusterclaim-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/managedclustersetbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/managedclustersetbindings.yaml deleted file mode 100644 index 7e80707a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/managedclustersetbindings.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: ManagedClusterSetBinding - k8s.io/resource: managedclustersetbindings - k8s.io/version: v1beta1 - name: cluster.open-cluster-management.io-v1beta1-managedclustersetbindings -spec: - resource: - group: cluster.open-cluster-management.io - kind: ManagedClusterSetBinding - name: managedclustersetbindings - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/managedclustersets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/managedclustersets.yaml deleted file mode 100644 index fa615a3c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/managedclustersets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: ManagedClusterSet - k8s.io/resource: managedclustersets - k8s.io/version: v1beta1 - name: cluster.open-cluster-management.io-v1beta1-managedclustersets -spec: - resource: - group: cluster.open-cluster-management.io - kind: ManagedClusterSet - name: managedclustersets - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/placementdecisions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/placementdecisions.yaml deleted file mode 100644 index 90772766..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/placementdecisions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: PlacementDecision - k8s.io/resource: placementdecisions - k8s.io/version: v1beta1 - name: cluster.open-cluster-management.io-v1beta1-placementdecisions -spec: - resource: - group: cluster.open-cluster-management.io - kind: PlacementDecision - name: placementdecisions - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusteropenclustermanagementio-placementdecision-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/placements.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/placements.yaml deleted file mode 100644 index d5adaa2f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta1/placements.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: Placement - k8s.io/resource: placements - k8s.io/version: v1beta1 - name: cluster.open-cluster-management.io-v1beta1-placements -spec: - resource: - group: cluster.open-cluster-management.io - kind: Placement - name: placements - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusteropenclustermanagementio-placement-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta2/managedclustersetbindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta2/managedclustersetbindings.yaml deleted file mode 100644 index 5be4fcbc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta2/managedclustersetbindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: ManagedClusterSetBinding - k8s.io/resource: managedclustersetbindings - k8s.io/version: v1beta2 - name: cluster.open-cluster-management.io-v1beta2-managedclustersetbindings -spec: - resource: - group: cluster.open-cluster-management.io - kind: ManagedClusterSetBinding - name: managedclustersetbindings - scope: Namespaced - version: v1beta2 - ui: - editor: - name: clusteropenclustermanagementio-managedclustersetbinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta2/managedclustersets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta2/managedclustersets.yaml deleted file mode 100644 index a957bec5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.open-cluster-management.io/v1beta2/managedclustersets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.open-cluster-management.io - k8s.io/kind: ManagedClusterSet - k8s.io/resource: managedclustersets - k8s.io/version: v1beta2 - name: cluster.open-cluster-management.io-v1beta2-managedclustersets -spec: - resource: - group: cluster.open-cluster-management.io - kind: ManagedClusterSet - name: managedclustersets - scope: Cluster - version: v1beta2 - ui: - editor: - name: clusteropenclustermanagementio-managedclusterset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/clusters.yaml deleted file mode 100644 index 15f14c5e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/clusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1alpha3 - name: cluster.x-k8s.io-v1alpha3-clusters -spec: - resource: - group: cluster.x-k8s.io - kind: Cluster - name: clusters - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinedeployments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinedeployments.yaml deleted file mode 100644 index c84c20b2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinedeployments.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineDeployment - k8s.io/resource: machinedeployments - k8s.io/version: v1alpha3 - name: cluster.x-k8s.io-v1alpha3-machinedeployments -spec: - resource: - group: cluster.x-k8s.io - kind: MachineDeployment - name: machinedeployments - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinehealthchecks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinehealthchecks.yaml deleted file mode 100644 index c1612b4d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinehealthchecks.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineHealthCheck - k8s.io/resource: machinehealthchecks - k8s.io/version: v1alpha3 - name: cluster.x-k8s.io-v1alpha3-machinehealthchecks -spec: - resource: - group: cluster.x-k8s.io - kind: MachineHealthCheck - name: machinehealthchecks - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinepools.yaml deleted file mode 100644 index f0919f3b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachinePool - k8s.io/resource: machinepools - k8s.io/version: v1alpha3 - name: cluster.x-k8s.io-v1alpha3-machinepools -spec: - resource: - group: cluster.x-k8s.io - kind: MachinePool - name: machinepools - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machines.yaml deleted file mode 100644 index 4c47b3c2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machines.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: meta.k8s.appscode.com/v1alpha3 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: Machine - k8s.io/resource: machines - k8s.io/version: v1alpha3 - name: cluster.x-k8s.io-v1alpha3-machines -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machines.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machines.png - type: image/png - resource: - group: cluster.x-k8s.io - kind: Machine - name: machines - scope: Namespaced - version: v1alpha3 - ui: - editor: - name: clusterxk8sio-machine-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinesets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinesets.yaml deleted file mode 100644 index 001debf3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha3/machinesets.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: meta.k8s.appscode.com/v1alpha3 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineSet - k8s.io/resource: machinesets - k8s.io/version: v1alpha3 - name: cluster.x-k8s.io-v1alpha3-machinesets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machinesets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machinesets.png - type: image/png - resource: - group: cluster.x-k8s.io - kind: MachineSet - name: machinesets - scope: Namespaced - version: v1alpha3 - ui: - editor: - name: clusterxk8sio-machineset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/clusterclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/clusterclasses.yaml deleted file mode 100644 index f98f12cb..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/clusterclasses.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: ClusterClass - k8s.io/resource: clusterclasses - k8s.io/version: v1alpha4 - name: cluster.x-k8s.io-v1alpha4-clusterclasses -spec: - resource: - group: cluster.x-k8s.io - kind: ClusterClass - name: clusterclasses - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/clusters.yaml deleted file mode 100644 index e8573f80..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/clusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1alpha4 - name: cluster.x-k8s.io-v1alpha4-clusters -spec: - resource: - group: cluster.x-k8s.io - kind: Cluster - name: clusters - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinedeployments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinedeployments.yaml deleted file mode 100644 index 5613884b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinedeployments.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineDeployment - k8s.io/resource: machinedeployments - k8s.io/version: v1alpha4 - name: cluster.x-k8s.io-v1alpha4-machinedeployments -spec: - resource: - group: cluster.x-k8s.io - kind: MachineDeployment - name: machinedeployments - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinehealthchecks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinehealthchecks.yaml deleted file mode 100644 index 0a4deb88..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinehealthchecks.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineHealthCheck - k8s.io/resource: machinehealthchecks - k8s.io/version: v1alpha4 - name: cluster.x-k8s.io-v1alpha4-machinehealthchecks -spec: - resource: - group: cluster.x-k8s.io - kind: MachineHealthCheck - name: machinehealthchecks - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinepools.yaml deleted file mode 100644 index b5079e9a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachinePool - k8s.io/resource: machinepools - k8s.io/version: v1alpha4 - name: cluster.x-k8s.io-v1alpha4-machinepools -spec: - resource: - group: cluster.x-k8s.io - kind: MachinePool - name: machinepools - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machines.yaml deleted file mode 100644 index 0089e9ff..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machines.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: Machine - k8s.io/resource: machines - k8s.io/version: v1alpha4 - name: cluster.x-k8s.io-v1alpha4-machines -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machines.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machines.png - type: image/png - resource: - group: cluster.x-k8s.io - kind: Machine - name: machines - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinesets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinesets.yaml deleted file mode 100644 index 897f6fc9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1alpha4/machinesets.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineSet - k8s.io/resource: machinesets - k8s.io/version: v1alpha4 - name: cluster.x-k8s.io-v1alpha4-machinesets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machinesets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machinesets.png - type: image/png - resource: - group: cluster.x-k8s.io - kind: MachineSet - name: machinesets - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/clusterclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/clusterclasses.yaml deleted file mode 100644 index 79ad64b9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/clusterclasses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: ClusterClass - k8s.io/resource: clusterclasses - k8s.io/version: v1beta1 - name: cluster.x-k8s.io-v1beta1-clusterclasses -spec: - resource: - group: cluster.x-k8s.io - kind: ClusterClass - name: clusterclasses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusterxk8sio-clusterclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/clusters.yaml deleted file mode 100644 index 909e927c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/clusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1beta1 - name: cluster.x-k8s.io-v1beta1-clusters -spec: - resource: - group: cluster.x-k8s.io - kind: Cluster - name: clusters - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusterxk8sio-cluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinedeployments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinedeployments.yaml deleted file mode 100644 index fd2394da..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinedeployments.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineDeployment - k8s.io/resource: machinedeployments - k8s.io/version: v1beta1 - name: cluster.x-k8s.io-v1beta1-machinedeployments -spec: - resource: - group: cluster.x-k8s.io - kind: MachineDeployment - name: machinedeployments - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusterxk8sio-machinedeployment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinehealthchecks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinehealthchecks.yaml deleted file mode 100644 index 2ae2550d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinehealthchecks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineHealthCheck - k8s.io/resource: machinehealthchecks - k8s.io/version: v1beta1 - name: cluster.x-k8s.io-v1beta1-machinehealthchecks -spec: - resource: - group: cluster.x-k8s.io - kind: MachineHealthCheck - name: machinehealthchecks - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusterxk8sio-machinehealthcheck-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinepools.yaml deleted file mode 100644 index 5e26f2d4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinepools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachinePool - k8s.io/resource: machinepools - k8s.io/version: v1beta1 - name: cluster.x-k8s.io-v1beta1-machinepools -spec: - resource: - group: cluster.x-k8s.io - kind: MachinePool - name: machinepools - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusterxk8sio-machinepool-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machines.yaml deleted file mode 100644 index dbf66cb5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machines.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: Machine - k8s.io/resource: machines - k8s.io/version: v1beta1 - name: cluster.x-k8s.io-v1beta1-machines -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machines.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machines.png - type: image/png - resource: - group: cluster.x-k8s.io - kind: Machine - name: machines - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusterxk8sio-machine-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinesets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinesets.yaml deleted file mode 100644 index be1a9d52..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cluster.x-k8s.io/v1beta1/machinesets.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cluster.x-k8s.io - k8s.io/kind: MachineSet - k8s.io/resource: machinesets - k8s.io/version: v1beta1 - name: cluster.x-k8s.io-v1beta1-machinesets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machinesets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/cluster.x-k8s.io/machinesets.png - type: image/png - resource: - group: cluster.x-k8s.io - kind: MachineSet - name: machinesets - scope: Namespaced - version: v1beta1 - ui: - editor: - name: clusterxk8sio-machineset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/firewalls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/firewalls.yaml deleted file mode 100644 index a17c6e94..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/firewalls.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: compute.gcp.kubedb.com - k8s.io/kind: Firewall - k8s.io/resource: firewalls - k8s.io/version: v1alpha1 - name: compute.gcp.kubedb.com-v1alpha1-firewalls -spec: - resource: - group: compute.gcp.kubedb.com - kind: Firewall - name: firewalls - scope: Cluster - version: v1alpha1 - ui: - editor: - name: computegcpkubedbcom-firewall-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/networkpeerings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/networkpeerings.yaml deleted file mode 100644 index 50a38e69..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/networkpeerings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: compute.gcp.kubedb.com - k8s.io/kind: NetworkPeering - k8s.io/resource: networkpeerings - k8s.io/version: v1alpha1 - name: compute.gcp.kubedb.com-v1alpha1-networkpeerings -spec: - resource: - group: compute.gcp.kubedb.com - kind: NetworkPeering - name: networkpeerings - scope: Cluster - version: v1alpha1 - ui: - editor: - name: computegcpkubedbcom-networkpeering-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/networks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/networks.yaml deleted file mode 100644 index 7ef7382f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/compute.gcp.kubedb.com/v1alpha1/networks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: compute.gcp.kubedb.com - k8s.io/kind: Network - k8s.io/resource: networks - k8s.io/version: v1alpha1 - name: compute.gcp.kubedb.com-v1alpha1-networks -spec: - resource: - group: compute.gcp.kubedb.com - kind: Network - name: networks - scope: Cluster - version: v1alpha1 - ui: - editor: - name: computegcpkubedbcom-network-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/config.gatekeeper.sh/v1alpha1/configs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/config.gatekeeper.sh/v1alpha1/configs.yaml deleted file mode 100644 index a4f0350d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/config.gatekeeper.sh/v1alpha1/configs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: config.gatekeeper.sh - k8s.io/kind: Config - k8s.io/resource: configs - k8s.io/version: v1alpha1 - name: config.gatekeeper.sh-v1alpha1-configs -spec: - resource: - group: config.gatekeeper.sh - kind: Config - name: configs - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: configgatekeepersh-config-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/config.gateway.envoyproxy.io/v1alpha1/envoyproxies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/config.gateway.envoyproxy.io/v1alpha1/envoyproxies.yaml deleted file mode 100644 index 10b28db9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/config.gateway.envoyproxy.io/v1alpha1/envoyproxies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: config.gateway.envoyproxy.io - k8s.io/kind: EnvoyProxy - k8s.io/resource: envoyproxies - k8s.io/version: v1alpha1 - name: config.gateway.envoyproxy.io-v1alpha1-envoyproxies -spec: - resource: - group: config.gateway.envoyproxy.io - kind: EnvoyProxy - name: envoyproxies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: configgatewayenvoyproxyio-envoyproxy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/controlplane.cluster.x-k8s.io/v1beta1/awsmanagedcontrolplanes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/controlplane.cluster.x-k8s.io/v1beta1/awsmanagedcontrolplanes.yaml deleted file mode 100644 index c6066634..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/controlplane.cluster.x-k8s.io/v1beta1/awsmanagedcontrolplanes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: controlplane.cluster.x-k8s.io - k8s.io/kind: AWSManagedControlPlane - k8s.io/resource: awsmanagedcontrolplanes - k8s.io/version: v1beta1 - name: controlplane.cluster.x-k8s.io-v1beta1-awsmanagedcontrolplanes -spec: - resource: - group: controlplane.cluster.x-k8s.io - kind: AWSManagedControlPlane - name: awsmanagedcontrolplanes - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/controlplane.cluster.x-k8s.io/v1beta2/awsmanagedcontrolplanes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/controlplane.cluster.x-k8s.io/v1beta2/awsmanagedcontrolplanes.yaml deleted file mode 100644 index 89c5a55f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/controlplane.cluster.x-k8s.io/v1beta2/awsmanagedcontrolplanes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: controlplane.cluster.x-k8s.io - k8s.io/kind: AWSManagedControlPlane - k8s.io/resource: awsmanagedcontrolplanes - k8s.io/version: v1beta2 - name: controlplane.cluster.x-k8s.io-v1beta2-awsmanagedcontrolplanes -spec: - resource: - group: controlplane.cluster.x-k8s.io - kind: AWSManagedControlPlane - name: awsmanagedcontrolplanes - scope: Namespaced - version: v1beta2 - ui: - editor: - name: controlplaneclusterxk8sio-awsmanagedcontrolplane-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/coordination.k8s.io/v1/leases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/coordination.k8s.io/v1/leases.yaml deleted file mode 100644 index badd4ff7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/coordination.k8s.io/v1/leases.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: coordination.k8s.io - k8s.io/kind: Lease - k8s.io/resource: leases - k8s.io/version: v1 - name: coordination.k8s.io-v1-leases -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/coordination.k8s.io/leases.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/coordination.k8s.io/leases.png - type: image/png - resource: - group: coordination.k8s.io - kind: Lease - name: leases - scope: Namespaced - version: v1 - ui: - editor: - name: coordinationk8sio-lease-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/coordination.k8s.io/v1beta1/leases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/coordination.k8s.io/v1beta1/leases.yaml deleted file mode 100644 index df48fa2b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/coordination.k8s.io/v1beta1/leases.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: coordination.k8s.io - k8s.io/kind: Lease - k8s.io/resource: leases - k8s.io/version: v1beta1 - name: coordination.k8s.io-v1beta1-leases -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/coordination.k8s.io/leases.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/coordination.k8s.io/leases.png - type: image/png - resource: - group: coordination.k8s.io - kind: Lease - name: leases - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/genericresources.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/genericresources.yaml deleted file mode 100644 index fc70ba13..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/genericresources.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.k8s.appscode.com - k8s.io/kind: GenericResource - k8s.io/resource: genericresources - k8s.io/version: v1alpha1 - name: core.k8s.appscode.com-v1alpha1-genericresources -spec: - resource: - group: core.k8s.appscode.com - kind: GenericResource - name: genericresources - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corek8sappscodecom-genericresource-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/genericresourceservices.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/genericresourceservices.yaml deleted file mode 100644 index 1cb65543..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/genericresourceservices.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.k8s.appscode.com - k8s.io/kind: GenericResourceService - k8s.io/resource: genericresourceservices - k8s.io/version: v1alpha1 - name: core.k8s.appscode.com-v1alpha1-genericresourceservices -spec: - resource: - group: core.k8s.appscode.com - kind: GenericResourceService - name: genericresourceservices - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corek8sappscodecom-genericresourceservice-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/podviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/podviews.yaml deleted file mode 100644 index 749d8463..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/podviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.k8s.appscode.com - k8s.io/kind: PodView - k8s.io/resource: podviews - k8s.io/version: v1alpha1 - name: core.k8s.appscode.com-v1alpha1-podviews -spec: - resource: - group: core.k8s.appscode.com - kind: PodView - name: podviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corek8sappscodecom-podview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/projects.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/projects.yaml deleted file mode 100644 index 2e7f5cd8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/projects.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.k8s.appscode.com - k8s.io/kind: Project - k8s.io/resource: projects - k8s.io/version: v1alpha1 - name: core.k8s.appscode.com-v1alpha1-projects -spec: - resource: - group: core.k8s.appscode.com - kind: Project - name: projects - scope: Cluster - version: v1alpha1 - ui: - editor: - name: corek8sappscodecom-project-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/resourcesummaries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/resourcesummaries.yaml deleted file mode 100644 index c82310d1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.k8s.appscode.com/v1alpha1/resourcesummaries.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.k8s.appscode.com - k8s.io/kind: ResourceSummary - k8s.io/resource: resourcesummaries - k8s.io/version: v1alpha1 - name: core.k8s.appscode.com-v1alpha1-resourcesummaries -spec: - resource: - group: core.k8s.appscode.com - kind: ResourceSummary - name: resourcesummaries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corek8sappscodecom-resourcesummary-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupbatches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupbatches.yaml deleted file mode 100644 index 29618683..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupbatches.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.kubestash.com - k8s.io/kind: BackupBatch - k8s.io/resource: backupbatches - k8s.io/version: v1alpha1 - name: core.kubestash.com-v1alpha1-backupbatches -spec: - resource: - group: core.kubestash.com - kind: BackupBatch - name: backupbatches - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corekubestashcom-backupbatch-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupblueprints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupblueprints.yaml deleted file mode 100644 index d57b4f64..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupblueprints.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.kubestash.com - k8s.io/kind: BackupBlueprint - k8s.io/resource: backupblueprints - k8s.io/version: v1alpha1 - name: core.kubestash.com-v1alpha1-backupblueprints -spec: - resource: - group: core.kubestash.com - kind: BackupBlueprint - name: backupblueprints - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corekubestashcom-backupblueprint-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupconfigurations.yaml deleted file mode 100644 index 7bfd0d9a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupconfigurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.kubestash.com - k8s.io/kind: BackupConfiguration - k8s.io/resource: backupconfigurations - k8s.io/version: v1alpha1 - name: core.kubestash.com-v1alpha1-backupconfigurations -spec: - resource: - group: core.kubestash.com - kind: BackupConfiguration - name: backupconfigurations - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corekubestashcom-backupconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupsessions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupsessions.yaml deleted file mode 100644 index 4a33eb90..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/backupsessions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.kubestash.com - k8s.io/kind: BackupSession - k8s.io/resource: backupsessions - k8s.io/version: v1alpha1 - name: core.kubestash.com-v1alpha1-backupsessions -spec: - resource: - group: core.kubestash.com - kind: BackupSession - name: backupsessions - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corekubestashcom-backupsession-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/hooktemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/hooktemplates.yaml deleted file mode 100644 index a90486d8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/hooktemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.kubestash.com - k8s.io/kind: HookTemplate - k8s.io/resource: hooktemplates - k8s.io/version: v1alpha1 - name: core.kubestash.com-v1alpha1-hooktemplates -spec: - resource: - group: core.kubestash.com - kind: HookTemplate - name: hooktemplates - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corekubestashcom-hooktemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/restoresessions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/restoresessions.yaml deleted file mode 100644 index a31a034d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core.kubestash.com/v1alpha1/restoresessions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: core.kubestash.com - k8s.io/kind: RestoreSession - k8s.io/resource: restoresessions - k8s.io/version: v1alpha1 - name: core.kubestash.com-v1alpha1-restoresessions -spec: - resource: - group: core.kubestash.com - kind: RestoreSession - name: restoresessions - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: corekubestashcom-restoresession-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/bindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/bindings.yaml deleted file mode 100644 index 35042861..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/bindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Binding - k8s.io/resource: bindings - k8s.io/version: v1 - name: core-v1-bindings -spec: - resource: - group: "" - kind: Binding - name: bindings - scope: Namespaced - version: v1 - ui: - editor: - name: core-binding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/componentstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/componentstatuses.yaml deleted file mode 100644 index aa5d9d56..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/componentstatuses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: ComponentStatus - k8s.io/resource: componentstatuses - k8s.io/version: v1 - name: core-v1-componentstatuses -spec: - resource: - group: "" - kind: ComponentStatus - name: componentstatuses - scope: Cluster - version: v1 - ui: - editor: - name: core-componentstatus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/configmaps.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/configmaps.yaml deleted file mode 100644 index 890a5a22..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/configmaps.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: ConfigMap - k8s.io/resource: configmaps - k8s.io/version: v1 - name: core-v1-configmaps -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/configmaps.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/configmaps.png - type: image/png - resource: - group: "" - kind: ConfigMap - name: configmaps - scope: Namespaced - version: v1 - ui: - editor: - name: core-configmap-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/endpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/endpoints.yaml deleted file mode 100644 index 5445d998..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/endpoints.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Endpoints - k8s.io/resource: endpoints - k8s.io/version: v1 - name: core-v1-endpoints -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/endpoints.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/endpoints.png - type: image/png - resource: - group: "" - kind: Endpoints - name: endpoints - scope: Namespaced - version: v1 - ui: - editor: - name: core-endpoints-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/ephemeralcontainers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/ephemeralcontainers.yaml deleted file mode 100644 index eb2a5e96..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/ephemeralcontainers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: EphemeralContainers - k8s.io/resource: ephemeralcontainers - k8s.io/version: v1 - name: core-v1-ephemeralcontainers -spec: - resource: - group: "" - kind: EphemeralContainers - name: ephemeralcontainers - scope: Namespaced - version: v1 - ui: - editor: - name: core-ephemeralcontainers-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/events.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/events.yaml deleted file mode 100644 index 500ea7c1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/events.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Event - k8s.io/resource: events - k8s.io/version: v1 - name: core-v1-events -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/events.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/events.png - type: image/png - resource: - group: "" - kind: Event - name: events - scope: Namespaced - version: v1 - ui: - editor: - name: core-event-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/limitranges.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/limitranges.yaml deleted file mode 100644 index 1e613a50..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/limitranges.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: LimitRange - k8s.io/resource: limitranges - k8s.io/version: v1 - name: core-v1-limitranges -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/limitranges.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/limitranges.png - type: image/png - resource: - group: "" - kind: LimitRange - name: limitranges - scope: Namespaced - version: v1 - ui: - editor: - name: core-limitrange-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/namespaces.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/namespaces.yaml deleted file mode 100644 index 0bd9e721..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/namespaces.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Namespace - k8s.io/resource: namespaces - k8s.io/version: v1 - name: core-v1-namespaces -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/namespaces.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/namespaces.png - type: image/png - resource: - group: "" - kind: Namespace - name: namespaces - scope: Cluster - version: v1 - ui: - editor: - name: core-namespace-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/nodes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/nodes.yaml deleted file mode 100644 index ba0a1841..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/nodes.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Node - k8s.io/resource: nodes - k8s.io/version: v1 - name: core-v1-nodes -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/nodes.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/nodes.png - type: image/png - resource: - group: "" - kind: Node - name: nodes - scope: Cluster - version: v1 - ui: - editor: - name: core-node-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/persistentvolumeclaims.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/persistentvolumeclaims.yaml deleted file mode 100644 index 51f4e655..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/persistentvolumeclaims.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: PersistentVolumeClaim - k8s.io/resource: persistentvolumeclaims - k8s.io/version: v1 - name: core-v1-persistentvolumeclaims -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/persistentvolumeclaims.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/persistentvolumeclaims.png - type: image/png - resource: - group: "" - kind: PersistentVolumeClaim - name: persistentvolumeclaims - scope: Namespaced - version: v1 - ui: - editor: - name: core-persistentvolumeclaim-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/persistentvolumes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/persistentvolumes.yaml deleted file mode 100644 index 68153538..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/persistentvolumes.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: PersistentVolume - k8s.io/resource: persistentvolumes - k8s.io/version: v1 - name: core-v1-persistentvolumes -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/persistentvolumes.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/persistentvolumes.png - type: image/png - resource: - group: "" - kind: PersistentVolume - name: persistentvolumes - scope: Cluster - version: v1 - ui: - editor: - name: core-persistentvolume-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/pods.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/pods.yaml deleted file mode 100644 index f18c73fd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/pods.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Pod - k8s.io/resource: pods - k8s.io/version: v1 - name: core-v1-pods -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/pods.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/pods.png - type: image/png - resource: - group: "" - kind: Pod - name: pods - scope: Namespaced - version: v1 - ui: - editor: - name: core-pod-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/podstatusresults.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/podstatusresults.yaml deleted file mode 100644 index fb7a5460..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/podstatusresults.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: PodStatusResult - k8s.io/resource: podstatusresults - k8s.io/version: v1 - name: core-v1-podstatusresults -spec: - resource: - group: "" - kind: PodStatusResult - name: podstatusresults - scope: Namespaced - version: v1 - ui: - editor: - name: core-podstatusresult-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/rangeallocations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/rangeallocations.yaml deleted file mode 100644 index 47767148..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/rangeallocations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: RangeAllocation - k8s.io/resource: rangeallocations - k8s.io/version: v1 - name: core-v1-rangeallocations -spec: - resource: - group: "" - kind: RangeAllocation - name: rangeallocations - scope: Namespaced - version: v1 - ui: - editor: - name: core-rangeallocation-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/replicationcontrollers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/replicationcontrollers.yaml deleted file mode 100644 index 36eda559..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/replicationcontrollers.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: ReplicationController - k8s.io/resource: replicationcontrollers - k8s.io/version: v1 - name: core-v1-replicationcontrollers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/replicationcontrollers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/replicationcontrollers.png - type: image/png - resource: - group: "" - kind: ReplicationController - name: replicationcontrollers - scope: Namespaced - version: v1 - ui: - editor: - name: core-replicationcontroller-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/resourcequotas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/resourcequotas.yaml deleted file mode 100644 index a57e3ef1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/resourcequotas.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: ResourceQuota - k8s.io/resource: resourcequotas - k8s.io/version: v1 - name: core-v1-resourcequotas -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/resourcequotas.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/resourcequotas.png - type: image/png - resource: - group: "" - kind: ResourceQuota - name: resourcequotas - scope: Namespaced - version: v1 - ui: - editor: - name: core-resourcequota-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/secrets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/secrets.yaml deleted file mode 100644 index c379dd2a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/secrets.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Secret - k8s.io/resource: secrets - k8s.io/version: v1 - name: core-v1-secrets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/secrets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/secrets.png - type: image/png - resource: - group: "" - kind: Secret - name: secrets - scope: Namespaced - version: v1 - ui: - editor: - name: core-secret-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/serviceaccounts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/serviceaccounts.yaml deleted file mode 100644 index 472102ed..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/serviceaccounts.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: ServiceAccount - k8s.io/resource: serviceaccounts - k8s.io/version: v1 - name: core-v1-serviceaccounts -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/serviceaccounts.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/serviceaccounts.png - type: image/png - resource: - group: "" - kind: ServiceAccount - name: serviceaccounts - scope: Namespaced - version: v1 - ui: - editor: - name: core-serviceaccount-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/services.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/services.yaml deleted file mode 100644 index 9e668d44..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/core/v1/services.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: "" - k8s.io/kind: Service - k8s.io/resource: services - k8s.io/version: v1 - name: core-v1-services -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/core/services.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/core/services.png - type: image/png - resource: - group: "" - kind: Service - name: services - scope: Namespaced - version: v1 - ui: - editor: - name: core-service-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/accounts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/accounts.yaml deleted file mode 100644 index d82d4987..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/accounts.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: Account - k8s.io/resource: accounts - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-accounts -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: Account - name: accounts - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-account-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandraclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandraclusters.yaml deleted file mode 100644 index 67330689..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandraclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: CassandraCluster - k8s.io/resource: cassandraclusters - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-cassandraclusters -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: CassandraCluster - name: cassandraclusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-cassandracluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandradatacenters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandradatacenters.yaml deleted file mode 100644 index 9166cb75..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandradatacenters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: CassandraDatacenter - k8s.io/resource: cassandradatacenters - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-cassandradatacenters -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: CassandraDatacenter - name: cassandradatacenters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-cassandradatacenter-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandrakeyspaces.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandrakeyspaces.yaml deleted file mode 100644 index 3c69b7a2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandrakeyspaces.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: CassandraKeySpace - k8s.io/resource: cassandrakeyspaces - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-cassandrakeyspaces -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: CassandraKeySpace - name: cassandrakeyspaces - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-cassandrakeyspace-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandratables.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandratables.yaml deleted file mode 100644 index 5408d216..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/cassandratables.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: CassandraTable - k8s.io/resource: cassandratables - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-cassandratables -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: CassandraTable - name: cassandratables - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-cassandratable-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/gremlindatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/gremlindatabases.yaml deleted file mode 100644 index 4bab4c83..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/gremlindatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: GremlinDatabase - k8s.io/resource: gremlindatabases - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-gremlindatabases -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: GremlinDatabase - name: gremlindatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-gremlindatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/gremlingraphs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/gremlingraphs.yaml deleted file mode 100644 index 35486d2c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/gremlingraphs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: GremlinGraph - k8s.io/resource: gremlingraphs - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-gremlingraphs -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: GremlinGraph - name: gremlingraphs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-gremlingraph-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/mongocollections.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/mongocollections.yaml deleted file mode 100644 index 2be53d66..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/mongocollections.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: MongoCollection - k8s.io/resource: mongocollections - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-mongocollections -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: MongoCollection - name: mongocollections - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-mongocollection-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/mongodatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/mongodatabases.yaml deleted file mode 100644 index 7bdff59b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/mongodatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: MongoDatabase - k8s.io/resource: mongodatabases - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-mongodatabases -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: MongoDatabase - name: mongodatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-mongodatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlcontainers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlcontainers.yaml deleted file mode 100644 index 6a61f777..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlcontainers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLContainer - k8s.io/resource: sqlcontainers - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqlcontainers -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLContainer - name: sqlcontainers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqlcontainer-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqldatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqldatabases.yaml deleted file mode 100644 index 635d4331..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqldatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLDatabase - k8s.io/resource: sqldatabases - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqldatabases -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLDatabase - name: sqldatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqldatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqldedicatedgateways.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqldedicatedgateways.yaml deleted file mode 100644 index 0bc551e9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqldedicatedgateways.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLDedicatedGateway - k8s.io/resource: sqldedicatedgateways - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqldedicatedgateways -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLDedicatedGateway - name: sqldedicatedgateways - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqldedicatedgateway-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlfunctions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlfunctions.yaml deleted file mode 100644 index 6964f903..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlfunctions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLFunction - k8s.io/resource: sqlfunctions - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqlfunctions -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLFunction - name: sqlfunctions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqlfunction-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlroleassignments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlroleassignments.yaml deleted file mode 100644 index 0d1e2d20..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlroleassignments.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLRoleAssignment - k8s.io/resource: sqlroleassignments - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqlroleassignments -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLRoleAssignment - name: sqlroleassignments - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqlroleassignment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlroledefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlroledefinitions.yaml deleted file mode 100644 index 7a3ee97c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlroledefinitions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLRoleDefinition - k8s.io/resource: sqlroledefinitions - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqlroledefinitions -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLRoleDefinition - name: sqlroledefinitions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqlroledefinition-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlstoredprocedures.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlstoredprocedures.yaml deleted file mode 100644 index fa3289f2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqlstoredprocedures.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLStoredProcedure - k8s.io/resource: sqlstoredprocedures - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqlstoredprocedures -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLStoredProcedure - name: sqlstoredprocedures - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqlstoredprocedure-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqltriggers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqltriggers.yaml deleted file mode 100644 index cab1f52d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/sqltriggers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: SQLTrigger - k8s.io/resource: sqltriggers - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-sqltriggers -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: SQLTrigger - name: sqltriggers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-sqltrigger-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/tables.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/tables.yaml deleted file mode 100644 index 7532b6d4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/cosmosdb.azure.kubedb.com/v1alpha1/tables.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: cosmosdb.azure.kubedb.com - k8s.io/kind: Table - k8s.io/resource: tables - k8s.io/version: v1alpha1 - name: cosmosdb.azure.kubedb.com-v1alpha1-tables -spec: - resource: - group: cosmosdb.azure.kubedb.com - kind: Table - name: tables - scope: Cluster - version: v1alpha1 - ui: - editor: - name: cosmosdbazurekubedbcom-table-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dashboard.kubedb.com/v1alpha1/elasticsearchdashboards.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dashboard.kubedb.com/v1alpha1/elasticsearchdashboards.yaml deleted file mode 100644 index f1c24fdf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dashboard.kubedb.com/v1alpha1/elasticsearchdashboards.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dashboard.kubedb.com - k8s.io/kind: ElasticsearchDashboard - k8s.io/resource: elasticsearchdashboards - k8s.io/version: v1alpha1 - name: dashboard.kubedb.com-v1alpha1-elasticsearchdashboards -spec: - resource: - group: dashboard.kubedb.com - kind: ElasticsearchDashboard - name: elasticsearchdashboards - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: dashboardkubedbcom-elasticsearchdashboard-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/configurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/configurations.yaml deleted file mode 100644 index e7c39ab3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/configurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformariadb.azure.kubedb.com - k8s.io/kind: Configuration - k8s.io/resource: configurations - k8s.io/version: v1alpha1 - name: dbformariadb.azure.kubedb.com-v1alpha1-configurations -spec: - resource: - group: dbformariadb.azure.kubedb.com - kind: Configuration - name: configurations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformariadbazurekubedbcom-configuration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/databases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/databases.yaml deleted file mode 100644 index b18f8aeb..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/databases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformariadb.azure.kubedb.com - k8s.io/kind: Database - k8s.io/resource: databases - k8s.io/version: v1alpha1 - name: dbformariadb.azure.kubedb.com-v1alpha1-databases -spec: - resource: - group: dbformariadb.azure.kubedb.com - kind: Database - name: databases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformariadbazurekubedbcom-database-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/firewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/firewallrules.yaml deleted file mode 100644 index 5287dbbe..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/firewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformariadb.azure.kubedb.com - k8s.io/kind: FirewallRule - k8s.io/resource: firewallrules - k8s.io/version: v1alpha1 - name: dbformariadb.azure.kubedb.com-v1alpha1-firewallrules -spec: - resource: - group: dbformariadb.azure.kubedb.com - kind: FirewallRule - name: firewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformariadbazurekubedbcom-firewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/servers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/servers.yaml deleted file mode 100644 index 88edafde..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/servers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformariadb.azure.kubedb.com - k8s.io/kind: Server - k8s.io/resource: servers - k8s.io/version: v1alpha1 - name: dbformariadb.azure.kubedb.com-v1alpha1-servers -spec: - resource: - group: dbformariadb.azure.kubedb.com - kind: Server - name: servers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformariadbazurekubedbcom-server-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml deleted file mode 100644 index 32018d72..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformariadb.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformariadb.azure.kubedb.com - k8s.io/kind: VirtualNetworkRule - k8s.io/resource: virtualnetworkrules - k8s.io/version: v1alpha1 - name: dbformariadb.azure.kubedb.com-v1alpha1-virtualnetworkrules -spec: - resource: - group: dbformariadb.azure.kubedb.com - kind: VirtualNetworkRule - name: virtualnetworkrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformariadbazurekubedbcom-virtualnetworkrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/activedirectoryadministrators.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/activedirectoryadministrators.yaml deleted file mode 100644 index cd4cf950..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/activedirectoryadministrators.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: ActiveDirectoryAdministrator - k8s.io/resource: activedirectoryadministrators - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-activedirectoryadministrators -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: ActiveDirectoryAdministrator - name: activedirectoryadministrators - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-activedirectoryadministrator-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/configurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/configurations.yaml deleted file mode 100644 index 4533d6e7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/configurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: Configuration - k8s.io/resource: configurations - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-configurations -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: Configuration - name: configurations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-configuration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/databases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/databases.yaml deleted file mode 100644 index 503f8c4f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/databases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: Database - k8s.io/resource: databases - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-databases -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: Database - name: databases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-database-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/firewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/firewallrules.yaml deleted file mode 100644 index e87740e2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/firewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: FirewallRule - k8s.io/resource: firewallrules - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-firewallrules -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: FirewallRule - name: firewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-firewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibledatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibledatabases.yaml deleted file mode 100644 index d85dbda4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibledatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: FlexibleDatabase - k8s.io/resource: flexibledatabases - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-flexibledatabases -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: FlexibleDatabase - name: flexibledatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-flexibledatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleserverconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleserverconfigurations.yaml deleted file mode 100644 index ec056fbc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleserverconfigurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: FlexibleServerConfiguration - k8s.io/resource: flexibleserverconfigurations - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-flexibleserverconfigurations -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: FlexibleServerConfiguration - name: flexibleserverconfigurations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-flexibleserverconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleserverfirewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleserverfirewallrules.yaml deleted file mode 100644 index 1bf29834..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleserverfirewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: FlexibleServerFirewallRule - k8s.io/resource: flexibleserverfirewallrules - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-flexibleserverfirewallrules -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: FlexibleServerFirewallRule - name: flexibleserverfirewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-flexibleserverfirewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleservers.yaml deleted file mode 100644 index 391cfae1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/flexibleservers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: FlexibleServer - k8s.io/resource: flexibleservers - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-flexibleservers -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: FlexibleServer - name: flexibleservers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-flexibleserver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/servers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/servers.yaml deleted file mode 100644 index ea780c46..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/servers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: Server - k8s.io/resource: servers - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-servers -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: Server - name: servers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-server-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml deleted file mode 100644 index 226921e3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbformysql.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbformysql.azure.kubedb.com - k8s.io/kind: VirtualNetworkRule - k8s.io/resource: virtualnetworkrules - k8s.io/version: v1alpha1 - name: dbformysql.azure.kubedb.com-v1alpha1-virtualnetworkrules -spec: - resource: - group: dbformysql.azure.kubedb.com - kind: VirtualNetworkRule - name: virtualnetworkrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbformysqlazurekubedbcom-virtualnetworkrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/activedirectoryadministrators.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/activedirectoryadministrators.yaml deleted file mode 100644 index 3c0b5bcc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/activedirectoryadministrators.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: ActiveDirectoryAdministrator - k8s.io/resource: activedirectoryadministrators - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-activedirectoryadministrators -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: ActiveDirectoryAdministrator - name: activedirectoryadministrators - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-activedirectoryadministrator-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/configurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/configurations.yaml deleted file mode 100644 index c5f72540..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/configurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: Configuration - k8s.io/resource: configurations - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-configurations -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: Configuration - name: configurations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-configuration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/databases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/databases.yaml deleted file mode 100644 index be6f4527..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/databases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: Database - k8s.io/resource: databases - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-databases -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: Database - name: databases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-database-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/firewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/firewallrules.yaml deleted file mode 100644 index 71993348..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/firewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: FirewallRule - k8s.io/resource: firewallrules - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-firewallrules -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: FirewallRule - name: firewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-firewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverconfigurations.yaml deleted file mode 100644 index b3034063..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverconfigurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: FlexibleServerConfiguration - k8s.io/resource: flexibleserverconfigurations - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-flexibleserverconfigurations -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: FlexibleServerConfiguration - name: flexibleserverconfigurations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-flexibleserverconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverdatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverdatabases.yaml deleted file mode 100644 index 9a9cdb66..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverdatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: FlexibleServerDatabase - k8s.io/resource: flexibleserverdatabases - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-flexibleserverdatabases -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: FlexibleServerDatabase - name: flexibleserverdatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-flexibleserverdatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverfirewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverfirewallrules.yaml deleted file mode 100644 index 8813882e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleserverfirewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: FlexibleServerFirewallRule - k8s.io/resource: flexibleserverfirewallrules - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-flexibleserverfirewallrules -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: FlexibleServerFirewallRule - name: flexibleserverfirewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-flexibleserverfirewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleservers.yaml deleted file mode 100644 index 78952bb9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/flexibleservers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: FlexibleServer - k8s.io/resource: flexibleservers - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-flexibleservers -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: FlexibleServer - name: flexibleservers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-flexibleserver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/serverkeys.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/serverkeys.yaml deleted file mode 100644 index a3385dde..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/serverkeys.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: ServerKey - k8s.io/resource: serverkeys - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-serverkeys -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: ServerKey - name: serverkeys - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-serverkey-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/servers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/servers.yaml deleted file mode 100644 index e875a64c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/servers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: Server - k8s.io/resource: servers - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-servers -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: Server - name: servers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-server-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml deleted file mode 100644 index d2644362..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dbforpostgresql.azure.kubedb.com/v1alpha1/virtualnetworkrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dbforpostgresql.azure.kubedb.com - k8s.io/kind: VirtualNetworkRule - k8s.io/resource: virtualnetworkrules - k8s.io/version: v1alpha1 - name: dbforpostgresql.azure.kubedb.com-v1alpha1-virtualnetworkrules -spec: - resource: - group: dbforpostgresql.azure.kubedb.com - kind: VirtualNetworkRule - name: virtualnetworkrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dbforpostgresqlazurekubedbcom-virtualnetworkrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1/endpointslice.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1/endpointslice.yaml deleted file mode 100644 index b24a814f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1/endpointslice.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: discovery.k8s.io - k8s.io/kind: EndpointSlice - k8s.io/resource: endpointslice - k8s.io/version: v1 - name: discovery.k8s.io-v1-endpointslice -spec: - resource: - group: discovery.k8s.io - kind: EndpointSlice - name: endpointslice - scope: Namespaced - version: v1 - ui: - editor: - name: discoveryk8sio-endpointslice-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1alpha1/endpointslice.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1alpha1/endpointslice.yaml deleted file mode 100644 index 4524c511..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1alpha1/endpointslice.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: discovery.k8s.io - k8s.io/kind: EndpointSlice - k8s.io/resource: endpointslice - k8s.io/version: v1alpha1 - name: discovery.k8s.io-v1alpha1-endpointslice -spec: - resource: - group: discovery.k8s.io - kind: EndpointSlice - name: endpointslice - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1alpha1/endpointslices.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1alpha1/endpointslices.yaml deleted file mode 100644 index 6317a422..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1alpha1/endpointslices.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: discovery.k8s.io - k8s.io/kind: EndpointSlice - k8s.io/resource: endpointslices - k8s.io/version: v1alpha1 - name: discovery.k8s.io-v1alpha1-endpointslices -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/discovery.k8s.io/endpointslices.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/discovery.k8s.io/endpointslices.png - type: image/png - resource: - group: discovery.k8s.io - kind: EndpointSlice - name: endpointslices - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1beta1/endpointslice.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1beta1/endpointslice.yaml deleted file mode 100644 index bbb606db..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1beta1/endpointslice.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: discovery.k8s.io - k8s.io/kind: EndpointSlice - k8s.io/resource: endpointslice - k8s.io/version: v1beta1 - name: discovery.k8s.io-v1beta1-endpointslice -spec: - resource: - group: discovery.k8s.io - kind: EndpointSlice - name: endpointslice - scope: Namespaced - version: v1beta1 - ui: - editor: - name: discoveryk8sio-endpointslice-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1beta1/endpointslices.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1beta1/endpointslices.yaml deleted file mode 100644 index ef01fbff..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/discovery.k8s.io/v1beta1/endpointslices.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: discovery.k8s.io - k8s.io/kind: EndpointSlice - k8s.io/resource: endpointslices - k8s.io/version: v1beta1 - name: discovery.k8s.io-v1beta1-endpointslices -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/discovery.k8s.io/endpointslices.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/discovery.k8s.io/endpointslices.png - type: image/png - resource: - group: discovery.k8s.io - kind: EndpointSlice - name: endpointslices - scope: Namespaced - version: v1beta1 - ui: - editor: - name: discoveryk8sio-endpointslice-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusterinstances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusterinstances.yaml deleted file mode 100644 index 239b25fe..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusterinstances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: docdb.aws.kubedb.com - k8s.io/kind: ClusterInstance - k8s.io/resource: clusterinstances - k8s.io/version: v1alpha1 - name: docdb.aws.kubedb.com-v1alpha1-clusterinstances -spec: - resource: - group: docdb.aws.kubedb.com - kind: ClusterInstance - name: clusterinstances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: docdbawskubedbcom-clusterinstance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusterparametergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusterparametergroups.yaml deleted file mode 100644 index 5b6002f1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusterparametergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: docdb.aws.kubedb.com - k8s.io/kind: ClusterParameterGroup - k8s.io/resource: clusterparametergroups - k8s.io/version: v1alpha1 - name: docdb.aws.kubedb.com-v1alpha1-clusterparametergroups -spec: - resource: - group: docdb.aws.kubedb.com - kind: ClusterParameterGroup - name: clusterparametergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: docdbawskubedbcom-clusterparametergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusters.yaml deleted file mode 100644 index 90c07412..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: docdb.aws.kubedb.com - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1alpha1 - name: docdb.aws.kubedb.com-v1alpha1-clusters -spec: - resource: - group: docdb.aws.kubedb.com - kind: Cluster - name: clusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: docdbawskubedbcom-cluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clustersnapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clustersnapshots.yaml deleted file mode 100644 index 6d638afd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/clustersnapshots.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: docdb.aws.kubedb.com - k8s.io/kind: ClusterSnapshot - k8s.io/resource: clustersnapshots - k8s.io/version: v1alpha1 - name: docdb.aws.kubedb.com-v1alpha1-clustersnapshots -spec: - resource: - group: docdb.aws.kubedb.com - kind: ClusterSnapshot - name: clustersnapshots - scope: Cluster - version: v1alpha1 - ui: - editor: - name: docdbawskubedbcom-clustersnapshot-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/eventsubscriptions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/eventsubscriptions.yaml deleted file mode 100644 index b1222c2a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/eventsubscriptions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: docdb.aws.kubedb.com - k8s.io/kind: EventSubscription - k8s.io/resource: eventsubscriptions - k8s.io/version: v1alpha1 - name: docdb.aws.kubedb.com-v1alpha1-eventsubscriptions -spec: - resource: - group: docdb.aws.kubedb.com - kind: EventSubscription - name: eventsubscriptions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: docdbawskubedbcom-eventsubscription-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/globalclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/globalclusters.yaml deleted file mode 100644 index cd2b263b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/globalclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: docdb.aws.kubedb.com - k8s.io/kind: GlobalCluster - k8s.io/resource: globalclusters - k8s.io/version: v1alpha1 - name: docdb.aws.kubedb.com-v1alpha1-globalclusters -spec: - resource: - group: docdb.aws.kubedb.com - kind: GlobalCluster - name: globalclusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: docdbawskubedbcom-globalcluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/subnetgroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/subnetgroups.yaml deleted file mode 100644 index 7d452954..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/docdb.aws.kubedb.com/v1alpha1/subnetgroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: docdb.aws.kubedb.com - k8s.io/kind: SubnetGroup - k8s.io/resource: subnetgroups - k8s.io/version: v1alpha1 - name: docdb.aws.kubedb.com-v1alpha1-subnetgroups -spec: - resource: - group: docdb.aws.kubedb.com - kind: SubnetGroup - name: subnetgroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: docdbawskubedbcom-subnetgroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/drivers.x-helm.dev/v1alpha1/appreleases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/drivers.x-helm.dev/v1alpha1/appreleases.yaml deleted file mode 100644 index 130e99f0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/drivers.x-helm.dev/v1alpha1/appreleases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: drivers.x-helm.dev - k8s.io/kind: AppRelease - k8s.io/resource: appreleases - k8s.io/version: v1alpha1 - name: drivers.x-helm.dev-v1alpha1-appreleases -spec: - resource: - group: drivers.x-helm.dev - kind: AppRelease - name: appreleases - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: driversxhelmdev-apprelease-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/contributorinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/contributorinsights.yaml deleted file mode 100644 index 29cb2ee0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/contributorinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dynamodb.aws.kubedb.com - k8s.io/kind: ContributorInsights - k8s.io/resource: contributorinsights - k8s.io/version: v1alpha1 - name: dynamodb.aws.kubedb.com-v1alpha1-contributorinsights -spec: - resource: - group: dynamodb.aws.kubedb.com - kind: ContributorInsights - name: contributorinsights - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dynamodbawskubedbcom-contributorinsights-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/globaltables.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/globaltables.yaml deleted file mode 100644 index e1bf84f7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/globaltables.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dynamodb.aws.kubedb.com - k8s.io/kind: GlobalTable - k8s.io/resource: globaltables - k8s.io/version: v1alpha1 - name: dynamodb.aws.kubedb.com-v1alpha1-globaltables -spec: - resource: - group: dynamodb.aws.kubedb.com - kind: GlobalTable - name: globaltables - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dynamodbawskubedbcom-globaltable-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/kinesisstreamingdestinations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/kinesisstreamingdestinations.yaml deleted file mode 100644 index 383324c8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/kinesisstreamingdestinations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dynamodb.aws.kubedb.com - k8s.io/kind: KinesisStreamingDestination - k8s.io/resource: kinesisstreamingdestinations - k8s.io/version: v1alpha1 - name: dynamodb.aws.kubedb.com-v1alpha1-kinesisstreamingdestinations -spec: - resource: - group: dynamodb.aws.kubedb.com - kind: KinesisStreamingDestination - name: kinesisstreamingdestinations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dynamodbawskubedbcom-kinesisstreamingdestination-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tableitems.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tableitems.yaml deleted file mode 100644 index 9ce81479..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tableitems.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dynamodb.aws.kubedb.com - k8s.io/kind: TableItem - k8s.io/resource: tableitems - k8s.io/version: v1alpha1 - name: dynamodb.aws.kubedb.com-v1alpha1-tableitems -spec: - resource: - group: dynamodb.aws.kubedb.com - kind: TableItem - name: tableitems - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dynamodbawskubedbcom-tableitem-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tablereplicas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tablereplicas.yaml deleted file mode 100644 index 54e23abe..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tablereplicas.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dynamodb.aws.kubedb.com - k8s.io/kind: TableReplica - k8s.io/resource: tablereplicas - k8s.io/version: v1alpha1 - name: dynamodb.aws.kubedb.com-v1alpha1-tablereplicas -spec: - resource: - group: dynamodb.aws.kubedb.com - kind: TableReplica - name: tablereplicas - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dynamodbawskubedbcom-tablereplica-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tables.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tables.yaml deleted file mode 100644 index ad1f7110..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tables.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dynamodb.aws.kubedb.com - k8s.io/kind: Table - k8s.io/resource: tables - k8s.io/version: v1alpha1 - name: dynamodb.aws.kubedb.com-v1alpha1-tables -spec: - resource: - group: dynamodb.aws.kubedb.com - kind: Table - name: tables - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dynamodbawskubedbcom-table-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tags.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tags.yaml deleted file mode 100644 index 0febd806..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/dynamodb.aws.kubedb.com/v1alpha1/tags.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: dynamodb.aws.kubedb.com - k8s.io/kind: Tag - k8s.io/resource: tags - k8s.io/version: v1alpha1 - name: dynamodb.aws.kubedb.com-v1alpha1-tags -spec: - resource: - group: dynamodb.aws.kubedb.com - kind: Tag - name: tags - scope: Cluster - version: v1alpha1 - ui: - editor: - name: dynamodbawskubedbcom-tag-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/routes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/routes.yaml deleted file mode 100644 index 40a9a27a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/routes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ec2.aws.kubedb.com - k8s.io/kind: Route - k8s.io/resource: routes - k8s.io/version: v1alpha1 - name: ec2.aws.kubedb.com-v1alpha1-routes -spec: - resource: - group: ec2.aws.kubedb.com - kind: Route - name: routes - scope: Cluster - version: v1alpha1 - ui: - editor: - name: ec2awskubedbcom-route-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/securitygrouprules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/securitygrouprules.yaml deleted file mode 100644 index 69301c5a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/securitygrouprules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ec2.aws.kubedb.com - k8s.io/kind: SecurityGroupRule - k8s.io/resource: securitygrouprules - k8s.io/version: v1alpha1 - name: ec2.aws.kubedb.com-v1alpha1-securitygrouprules -spec: - resource: - group: ec2.aws.kubedb.com - kind: SecurityGroupRule - name: securitygrouprules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: ec2awskubedbcom-securitygrouprule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/securitygroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/securitygroups.yaml deleted file mode 100644 index f8cbfa43..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/securitygroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ec2.aws.kubedb.com - k8s.io/kind: SecurityGroup - k8s.io/resource: securitygroups - k8s.io/version: v1alpha1 - name: ec2.aws.kubedb.com-v1alpha1-securitygroups -spec: - resource: - group: ec2.aws.kubedb.com - kind: SecurityGroup - name: securitygroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: ec2awskubedbcom-securitygroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/subnets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/subnets.yaml deleted file mode 100644 index 094646b8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/subnets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ec2.aws.kubedb.com - k8s.io/kind: Subnet - k8s.io/resource: subnets - k8s.io/version: v1alpha1 - name: ec2.aws.kubedb.com-v1alpha1-subnets -spec: - resource: - group: ec2.aws.kubedb.com - kind: Subnet - name: subnets - scope: Cluster - version: v1alpha1 - ui: - editor: - name: ec2awskubedbcom-subnet-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcendpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcendpoints.yaml deleted file mode 100644 index 8956cadc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcendpoints.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ec2.aws.kubedb.com - k8s.io/kind: VPCEndpoint - k8s.io/resource: vpcendpoints - k8s.io/version: v1alpha1 - name: ec2.aws.kubedb.com-v1alpha1-vpcendpoints -spec: - resource: - group: ec2.aws.kubedb.com - kind: VPCEndpoint - name: vpcendpoints - scope: Cluster - version: v1alpha1 - ui: - editor: - name: ec2awskubedbcom-vpcendpoint-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcpeeringconnections.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcpeeringconnections.yaml deleted file mode 100644 index 77522ba2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcpeeringconnections.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ec2.aws.kubedb.com - k8s.io/kind: VPCPeeringConnection - k8s.io/resource: vpcpeeringconnections - k8s.io/version: v1alpha1 - name: ec2.aws.kubedb.com-v1alpha1-vpcpeeringconnections -spec: - resource: - group: ec2.aws.kubedb.com - kind: VPCPeeringConnection - name: vpcpeeringconnections - scope: Cluster - version: v1alpha1 - ui: - editor: - name: ec2awskubedbcom-vpcpeeringconnection-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcs.yaml deleted file mode 100644 index 3ee0ab1f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ec2.aws.kubedb.com/v1alpha1/vpcs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ec2.aws.kubedb.com - k8s.io/kind: VPC - k8s.io/resource: vpcs - k8s.io/version: v1alpha1 - name: ec2.aws.kubedb.com-v1alpha1-vpcs -spec: - resource: - group: ec2.aws.kubedb.com - kind: VPC - name: vpcs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: ec2awskubedbcom-vpc-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/clusters.yaml deleted file mode 100644 index e070a68f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/clusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticache.aws.kubedb.com - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1alpha1 - name: elasticache.aws.kubedb.com-v1alpha1-clusters -spec: - resource: - group: elasticache.aws.kubedb.com - kind: Cluster - name: clusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticacheawskubedbcom-cluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/parametergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/parametergroups.yaml deleted file mode 100644 index 85833507..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/parametergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticache.aws.kubedb.com - k8s.io/kind: ParameterGroup - k8s.io/resource: parametergroups - k8s.io/version: v1alpha1 - name: elasticache.aws.kubedb.com-v1alpha1-parametergroups -spec: - resource: - group: elasticache.aws.kubedb.com - kind: ParameterGroup - name: parametergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticacheawskubedbcom-parametergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/replicationgroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/replicationgroups.yaml deleted file mode 100644 index 1f9ec128..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/replicationgroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticache.aws.kubedb.com - k8s.io/kind: ReplicationGroup - k8s.io/resource: replicationgroups - k8s.io/version: v1alpha1 - name: elasticache.aws.kubedb.com-v1alpha1-replicationgroups -spec: - resource: - group: elasticache.aws.kubedb.com - kind: ReplicationGroup - name: replicationgroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticacheawskubedbcom-replicationgroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/subnetgroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/subnetgroups.yaml deleted file mode 100644 index 9425dbb8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/subnetgroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticache.aws.kubedb.com - k8s.io/kind: SubnetGroup - k8s.io/resource: subnetgroups - k8s.io/version: v1alpha1 - name: elasticache.aws.kubedb.com-v1alpha1-subnetgroups -spec: - resource: - group: elasticache.aws.kubedb.com - kind: SubnetGroup - name: subnetgroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticacheawskubedbcom-subnetgroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/usergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/usergroups.yaml deleted file mode 100644 index 30823435..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/usergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticache.aws.kubedb.com - k8s.io/kind: UserGroup - k8s.io/resource: usergroups - k8s.io/version: v1alpha1 - name: elasticache.aws.kubedb.com-v1alpha1-usergroups -spec: - resource: - group: elasticache.aws.kubedb.com - kind: UserGroup - name: usergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticacheawskubedbcom-usergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/users.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/users.yaml deleted file mode 100644 index f90e4158..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticache.aws.kubedb.com/v1alpha1/users.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticache.aws.kubedb.com - k8s.io/kind: User - k8s.io/resource: users - k8s.io/version: v1alpha1 - name: elasticache.aws.kubedb.com-v1alpha1-users -spec: - resource: - group: elasticache.aws.kubedb.com - kind: User - name: users - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticacheawskubedbcom-user-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domainpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domainpolicies.yaml deleted file mode 100644 index 8e85b8c2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domainpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticsearch.aws.kubedb.com - k8s.io/kind: DomainPolicy - k8s.io/resource: domainpolicies - k8s.io/version: v1alpha1 - name: elasticsearch.aws.kubedb.com-v1alpha1-domainpolicies -spec: - resource: - group: elasticsearch.aws.kubedb.com - kind: DomainPolicy - name: domainpolicies - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticsearchawskubedbcom-domainpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domains.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domains.yaml deleted file mode 100644 index c7717432..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domains.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticsearch.aws.kubedb.com - k8s.io/kind: Domain - k8s.io/resource: domains - k8s.io/version: v1alpha1 - name: elasticsearch.aws.kubedb.com-v1alpha1-domains -spec: - resource: - group: elasticsearch.aws.kubedb.com - kind: Domain - name: domains - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticsearchawskubedbcom-domain-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domainsamloptions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domainsamloptions.yaml deleted file mode 100644 index 6f987da5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/elasticsearch.aws.kubedb.com/v1alpha1/domainsamloptions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: elasticsearch.aws.kubedb.com - k8s.io/kind: DomainSAMLOptions - k8s.io/resource: domainsamloptions - k8s.io/version: v1alpha1 - name: elasticsearch.aws.kubedb.com-v1alpha1-domainsamloptions -spec: - resource: - group: elasticsearch.aws.kubedb.com - kind: DomainSAMLOptions - name: domainsamloptions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: elasticsearchawskubedbcom-domainsamloptions-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/awsroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/awsroles.yaml deleted file mode 100644 index fedb2451..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/awsroles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: AWSRole - k8s.io/resource: awsroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-awsroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/awsroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/awsroles.png - type: image/png - resource: - group: engine.kubevault.com - kind: AWSRole - name: awsroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-awsrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/azureroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/azureroles.yaml deleted file mode 100644 index e0044037..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/azureroles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: AzureRole - k8s.io/resource: azureroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-azureroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/azureroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/azureroles.png - type: image/png - resource: - group: engine.kubevault.com - kind: AzureRole - name: azureroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-azurerole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/elasticsearchroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/elasticsearchroles.yaml deleted file mode 100644 index 6fb71723..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/elasticsearchroles.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: ElasticsearchRole - k8s.io/resource: elasticsearchroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-elasticsearchroles -spec: - resource: - group: engine.kubevault.com - kind: ElasticsearchRole - name: elasticsearchroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-elasticsearchrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/gcproles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/gcproles.yaml deleted file mode 100644 index 137c2cba..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/gcproles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: GCPRole - k8s.io/resource: gcproles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-gcproles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/gcproles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/gcproles.png - type: image/png - resource: - group: engine.kubevault.com - kind: GCPRole - name: gcproles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-gcprole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mariadbroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mariadbroles.yaml deleted file mode 100644 index 5c0d886e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mariadbroles.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: MariaDBRole - k8s.io/resource: mariadbroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-mariadbroles -spec: - resource: - group: engine.kubevault.com - kind: MariaDBRole - name: mariadbroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-mariadbrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mongodbroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mongodbroles.yaml deleted file mode 100644 index 50f54c4a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mongodbroles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: MongoDBRole - k8s.io/resource: mongodbroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-mongodbroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/mongodbroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/mongodbroles.png - type: image/png - resource: - group: engine.kubevault.com - kind: MongoDBRole - name: mongodbroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-mongodbrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mysqlroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mysqlroles.yaml deleted file mode 100644 index 69c94b6c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/mysqlroles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: MySQLRole - k8s.io/resource: mysqlroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-mysqlroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/mysqlroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/mysqlroles.png - type: image/png - resource: - group: engine.kubevault.com - kind: MySQLRole - name: mysqlroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-mysqlrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/postgresroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/postgresroles.yaml deleted file mode 100644 index cea0b948..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/postgresroles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: PostgresRole - k8s.io/resource: postgresroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-postgresroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/postgresroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/postgresroles.png - type: image/png - resource: - group: engine.kubevault.com - kind: PostgresRole - name: postgresroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-postgresrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/redisroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/redisroles.yaml deleted file mode 100644 index fc157243..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/redisroles.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: RedisRole - k8s.io/resource: redisroles - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-redisroles -spec: - resource: - group: engine.kubevault.com - kind: RedisRole - name: redisroles - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-redisrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretaccessrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretaccessrequests.yaml deleted file mode 100644 index ccb536d0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretaccessrequests.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: SecretAccessRequest - k8s.io/resource: secretaccessrequests - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-secretaccessrequests -spec: - resource: - group: engine.kubevault.com - kind: SecretAccessRequest - name: secretaccessrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-secretaccessrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretengines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretengines.yaml deleted file mode 100644 index d91d3dee..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretengines.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: SecretEngine - k8s.io/resource: secretengines - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-secretengines -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/secretengines.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/engine.kubevault.com/secretengines.png - type: image/png - resource: - group: engine.kubevault.com - kind: SecretEngine - name: secretengines - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-secretengine-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretrolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretrolebindings.yaml deleted file mode 100644 index 7dd6f308..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/engine.kubevault.com/v1alpha1/secretrolebindings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: engine.kubevault.com - k8s.io/kind: SecretRoleBinding - k8s.io/resource: secretrolebindings - k8s.io/version: v1alpha1 - name: engine.kubevault.com-v1alpha1-secretrolebindings -spec: - resource: - group: engine.kubevault.com - kind: SecretRoleBinding - name: secretrolebindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: enginekubevaultcom-secretrolebinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/events.k8s.io/v1/events.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/events.k8s.io/v1/events.yaml deleted file mode 100644 index 78f71f1a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/events.k8s.io/v1/events.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: events.k8s.io - k8s.io/kind: Event - k8s.io/resource: events - k8s.io/version: v1 - name: events.k8s.io-v1-events -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/events.k8s.io/events.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/events.k8s.io/events.png - type: image/png - resource: - group: events.k8s.io - kind: Event - name: events - scope: Namespaced - version: v1 - ui: - editor: - name: eventsk8sio-event-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/events.k8s.io/v1beta1/events.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/events.k8s.io/v1beta1/events.yaml deleted file mode 100644 index c5b56d7d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/events.k8s.io/v1beta1/events.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: events.k8s.io - k8s.io/kind: Event - k8s.io/resource: events - k8s.io/version: v1beta1 - name: events.k8s.io-v1beta1-events -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/events.k8s.io/events.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/events.k8s.io/events.png - type: image/png - resource: - group: events.k8s.io - kind: Event - name: events - scope: Namespaced - version: v1beta1 - ui: - editor: - name: eventsk8sio-event-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/expansion.gatekeeper.sh/v1alpha1/expansiontemplate.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/expansion.gatekeeper.sh/v1alpha1/expansiontemplate.yaml deleted file mode 100644 index 577e9338..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/expansion.gatekeeper.sh/v1alpha1/expansiontemplate.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: expansion.gatekeeper.sh - k8s.io/kind: ExpansionTemplate - k8s.io/resource: expansiontemplate - k8s.io/version: v1alpha1 - name: expansion.gatekeeper.sh-v1alpha1-expansiontemplate -spec: - resource: - group: expansion.gatekeeper.sh - kind: ExpansionTemplate - name: expansiontemplate - scope: Cluster - version: v1alpha1 - ui: - editor: - name: expansiongatekeepersh-expansiontemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/daemonsets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/daemonsets.yaml deleted file mode 100644 index d7e82753..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/daemonsets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: extensions - k8s.io/kind: DaemonSet - k8s.io/resource: daemonsets - k8s.io/version: v1beta1 - name: extensions-v1beta1-daemonsets -spec: - resource: - group: extensions - kind: DaemonSet - name: daemonsets - scope: Namespaced - version: v1beta1 - ui: - editor: - name: extensions-daemonset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/deployments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/deployments.yaml deleted file mode 100644 index 3c3756d0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/deployments.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: extensions - k8s.io/kind: Deployment - k8s.io/resource: deployments - k8s.io/version: v1beta1 - name: extensions-v1beta1-deployments -spec: - resource: - group: extensions - kind: Deployment - name: deployments - scope: Namespaced - version: v1beta1 - ui: - editor: - name: extensions-deployment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/ingresses.yaml deleted file mode 100644 index 39dc6bd8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/ingresses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: extensions - k8s.io/kind: Ingress - k8s.io/resource: ingresses - k8s.io/version: v1beta1 - name: extensions-v1beta1-ingresses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/extensions/ingresses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/extensions/ingresses.png - type: image/png - resource: - group: extensions - kind: Ingress - name: ingresses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: extensions-ingress-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/networkpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/networkpolicies.yaml deleted file mode 100644 index 70616be2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/networkpolicies.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: extensions - k8s.io/kind: NetworkPolicy - k8s.io/resource: networkpolicies - k8s.io/version: v1beta1 - name: extensions-v1beta1-networkpolicies -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/extensions/networkpolicies.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/extensions/networkpolicies.png - type: image/png - resource: - group: extensions - kind: NetworkPolicy - name: networkpolicies - scope: Namespaced - version: v1beta1 - ui: - editor: - name: extensions-networkpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/podsecuritypolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/podsecuritypolicies.yaml deleted file mode 100644 index 7a4b1096..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/podsecuritypolicies.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: extensions - k8s.io/kind: PodSecurityPolicy - k8s.io/resource: podsecuritypolicies - k8s.io/version: v1beta1 - name: extensions-v1beta1-podsecuritypolicies -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/extensions/podsecuritypolicies.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/extensions/podsecuritypolicies.png - type: image/png - resource: - group: extensions - kind: PodSecurityPolicy - name: podsecuritypolicies - scope: Cluster - version: v1beta1 - ui: - editor: - name: extensions-podsecuritypolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/replicasets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/replicasets.yaml deleted file mode 100644 index ca8d7015..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/replicasets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: extensions - k8s.io/kind: ReplicaSet - k8s.io/resource: replicasets - k8s.io/version: v1beta1 - name: extensions-v1beta1-replicasets -spec: - resource: - group: extensions - kind: ReplicaSet - name: replicasets - scope: Namespaced - version: v1beta1 - ui: - editor: - name: extensions-replicaset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/scales.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/scales.yaml deleted file mode 100644 index 8039ab80..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/extensions/v1beta1/scales.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: extensions - k8s.io/kind: Scale - k8s.io/resource: scales - k8s.io/version: v1beta1 - name: extensions-v1beta1-scales -spec: - resource: - group: extensions - kind: Scale - name: scales - scope: Namespaced - version: v1beta1 - ui: - editor: - name: extensions-scale-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/external-dns.appscode.com/v1alpha1/externaldns.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/external-dns.appscode.com/v1alpha1/externaldns.yaml deleted file mode 100644 index f94ca942..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/external-dns.appscode.com/v1alpha1/externaldns.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: external-dns.appscode.com - k8s.io/kind: ExternalDNS - k8s.io/resource: externaldns - k8s.io/version: v1alpha1 - name: external-dns.appscode.com-v1alpha1-externaldns -spec: - resource: - group: external-dns.appscode.com - kind: ExternalDNS - name: externaldns - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: externaldnsappscodecom-externaldns-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/falco.appscode.com/v1alpha1/falcoevents.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/falco.appscode.com/v1alpha1/falcoevents.yaml deleted file mode 100644 index ea1ad88c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/falco.appscode.com/v1alpha1/falcoevents.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: falco.appscode.com - k8s.io/kind: FalcoEvent - k8s.io/resource: falcoevents - k8s.io/version: v1alpha1 - name: falco.appscode.com-v1alpha1-falcoevents -spec: - resource: - group: falco.appscode.com - kind: FalcoEvent - name: falcoevents - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: falcoappscodecom-falcoevent-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas.yaml deleted file mode 100644 index dfb0e370..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1alpha1/flowschemas.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: flowcontrol.apiserver.k8s.io - k8s.io/kind: FlowSchema - k8s.io/resource: flowschemas - k8s.io/version: v1alpha1 - name: flowcontrol.apiserver.k8s.io-v1alpha1-flowschemas -spec: - resource: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - name: flowschemas - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: flowcontrolapiserverk8sio-flowschema-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations.yaml deleted file mode 100644 index 0d61f6a2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1alpha1/prioritylevelconfigurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: flowcontrol.apiserver.k8s.io - k8s.io/kind: PriorityLevelConfiguration - k8s.io/resource: prioritylevelconfigurations - k8s.io/version: v1alpha1 - name: flowcontrol.apiserver.k8s.io-v1alpha1-prioritylevelconfigurations -spec: - resource: - group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration - name: prioritylevelconfigurations - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: flowcontrolapiserverk8sio-prioritylevelconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas.yaml deleted file mode 100644 index 78f4b3ce..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: flowcontrol.apiserver.k8s.io - k8s.io/kind: FlowSchema - k8s.io/resource: flowschemas - k8s.io/version: v1beta1 - name: flowcontrol.apiserver.k8s.io-v1beta1-flowschemas -spec: - resource: - group: flowcontrol.apiserver.k8s.io - kind: FlowSchema - name: flowschemas - scope: Namespaced - version: v1beta1 - ui: - editor: - name: flowcontrolapiserverk8sio-flowschema-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations.yaml deleted file mode 100644 index fedc824a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: flowcontrol.apiserver.k8s.io - k8s.io/kind: PriorityLevelConfiguration - k8s.io/resource: prioritylevelconfigurations - k8s.io/version: v1beta1 - name: flowcontrol.apiserver.k8s.io-v1beta1-prioritylevelconfigurations -spec: - resource: - group: flowcontrol.apiserver.k8s.io - kind: PriorityLevelConfiguration - name: prioritylevelconfigurations - scope: Namespaced - version: v1beta1 - ui: - editor: - name: flowcontrolapiserverk8sio-prioritylevelconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/authenticationfilters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/authenticationfilters.yaml deleted file mode 100644 index d27e67f3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/authenticationfilters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.envoyproxy.io - k8s.io/kind: AuthenticationFilter - k8s.io/resource: authenticationfilters - k8s.io/version: v1alpha1 - name: gateway.envoyproxy.io-v1alpha1-authenticationfilters -spec: - resource: - group: gateway.envoyproxy.io - kind: AuthenticationFilter - name: authenticationfilters - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayenvoyproxyio-authenticationfilter-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/backendtrafficpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/backendtrafficpolicies.yaml deleted file mode 100644 index fcf68f1d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/backendtrafficpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.envoyproxy.io - k8s.io/kind: BackendTrafficPolicy - k8s.io/resource: backendtrafficpolicies - k8s.io/version: v1alpha1 - name: gateway.envoyproxy.io-v1alpha1-backendtrafficpolicies -spec: - resource: - group: gateway.envoyproxy.io - kind: BackendTrafficPolicy - name: backendtrafficpolicies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayenvoyproxyio-backendtrafficpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/clienttrafficpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/clienttrafficpolicies.yaml deleted file mode 100644 index 8d8c5b45..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/clienttrafficpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.envoyproxy.io - k8s.io/kind: ClientTrafficPolicy - k8s.io/resource: clienttrafficpolicies - k8s.io/version: v1alpha1 - name: gateway.envoyproxy.io-v1alpha1-clienttrafficpolicies -spec: - resource: - group: gateway.envoyproxy.io - kind: ClientTrafficPolicy - name: clienttrafficpolicies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayenvoyproxyio-clienttrafficpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/envoypatchpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/envoypatchpolicies.yaml deleted file mode 100644 index 9d08cac7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/envoypatchpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.envoyproxy.io - k8s.io/kind: EnvoyPatchPolicy - k8s.io/resource: envoypatchpolicies - k8s.io/version: v1alpha1 - name: gateway.envoyproxy.io-v1alpha1-envoypatchpolicies -spec: - resource: - group: gateway.envoyproxy.io - kind: EnvoyPatchPolicy - name: envoypatchpolicies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayenvoyproxyio-envoypatchpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/envoyproxies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/envoyproxies.yaml deleted file mode 100644 index 351b3fb3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/envoyproxies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.envoyproxy.io - k8s.io/kind: EnvoyProxy - k8s.io/resource: envoyproxies - k8s.io/version: v1alpha1 - name: gateway.envoyproxy.io-v1alpha1-envoyproxies -spec: - resource: - group: gateway.envoyproxy.io - kind: EnvoyProxy - name: envoyproxies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayenvoyproxyio-envoyproxy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/ratelimitfilters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/ratelimitfilters.yaml deleted file mode 100644 index a0d687a0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/ratelimitfilters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.envoyproxy.io - k8s.io/kind: RateLimitFilter - k8s.io/resource: ratelimitfilters - k8s.io/version: v1alpha1 - name: gateway.envoyproxy.io-v1alpha1-ratelimitfilters -spec: - resource: - group: gateway.envoyproxy.io - kind: RateLimitFilter - name: ratelimitfilters - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayenvoyproxyio-ratelimitfilter-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/securitypolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/securitypolicies.yaml deleted file mode 100644 index 9a105982..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.envoyproxy.io/v1alpha1/securitypolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.envoyproxy.io - k8s.io/kind: SecurityPolicy - k8s.io/resource: securitypolicies - k8s.io/version: v1alpha1 - name: gateway.envoyproxy.io-v1alpha1-securitypolicies -spec: - resource: - group: gateway.envoyproxy.io - kind: SecurityPolicy - name: securitypolicies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayenvoyproxyio-securitypolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/gatewayclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/gatewayclasses.yaml deleted file mode 100644 index fe49667a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/gatewayclasses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: GatewayClass - k8s.io/resource: gatewayclasses - k8s.io/version: v1 - name: gateway.networking.k8s.io-v1-gatewayclasses -spec: - resource: - group: gateway.networking.k8s.io - kind: GatewayClass - name: gatewayclasses - scope: Cluster - version: v1 - ui: - editor: - name: gatewaynetworkingk8sio-gatewayclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/gateways.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/gateways.yaml deleted file mode 100644 index b0c4f78a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/gateways.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: Gateway - k8s.io/resource: gateways - k8s.io/version: v1 - name: gateway.networking.k8s.io-v1-gateways -spec: - resource: - group: gateway.networking.k8s.io - kind: Gateway - name: gateways - scope: Namespaced - version: v1 - ui: - editor: - name: gatewaynetworkingk8sio-gateway-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/httproutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/httproutes.yaml deleted file mode 100644 index 98be33b6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1/httproutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: HTTPRoute - k8s.io/resource: httproutes - k8s.io/version: v1 - name: gateway.networking.k8s.io-v1-httproutes -spec: - resource: - group: gateway.networking.k8s.io - kind: HTTPRoute - name: httproutes - scope: Namespaced - version: v1 - ui: - editor: - name: gatewaynetworkingk8sio-httproute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/backendtlspolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/backendtlspolicies.yaml deleted file mode 100644 index c472bc0e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/backendtlspolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: BackendTLSPolicy - k8s.io/resource: backendtlspolicies - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-backendtlspolicies -spec: - resource: - group: gateway.networking.k8s.io - kind: BackendTLSPolicy - name: backendtlspolicies - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: gatewaynetworkingk8sio-backendtlspolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/gatewayclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/gatewayclasses.yaml deleted file mode 100644 index 3f1ada56..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/gatewayclasses.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: GatewayClass - k8s.io/resource: gatewayclasses - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-gatewayclasses -spec: - resource: - group: gateway.networking.k8s.io - kind: GatewayClass - name: gatewayclasses - scope: Cluster - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/gateways.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/gateways.yaml deleted file mode 100644 index 0803e8cf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/gateways.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: Gateway - k8s.io/resource: gateways - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-gateways -spec: - resource: - group: gateway.networking.k8s.io - kind: Gateway - name: gateways - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/grpcroutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/grpcroutes.yaml deleted file mode 100644 index 4f95a372..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/grpcroutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: GRPCRoute - k8s.io/resource: grpcroutes - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-grpcroutes -spec: - resource: - group: gateway.networking.k8s.io - kind: GRPCRoute - name: grpcroutes - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: gatewaynetworkingk8sio-grpcroute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/httproutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/httproutes.yaml deleted file mode 100644 index 4855d0c4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/httproutes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: HTTPRoute - k8s.io/resource: httproutes - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-httproutes -spec: - resource: - group: gateway.networking.k8s.io - kind: HTTPRoute - name: httproutes - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/referencegrants.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/referencegrants.yaml deleted file mode 100644 index 6e7732d4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/referencegrants.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: ReferenceGrant - k8s.io/resource: referencegrants - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-referencegrants -spec: - resource: - group: gateway.networking.k8s.io - kind: ReferenceGrant - name: referencegrants - scope: Namespaced - version: v1alpha2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/tcproutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/tcproutes.yaml deleted file mode 100644 index a3934d7b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/tcproutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: TCPRoute - k8s.io/resource: tcproutes - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-tcproutes -spec: - resource: - group: gateway.networking.k8s.io - kind: TCPRoute - name: tcproutes - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: gatewaynetworkingk8sio-tcproute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/tlsroutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/tlsroutes.yaml deleted file mode 100644 index 15873422..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/tlsroutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: TLSRoute - k8s.io/resource: tlsroutes - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-tlsroutes -spec: - resource: - group: gateway.networking.k8s.io - kind: TLSRoute - name: tlsroutes - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: gatewaynetworkingk8sio-tlsroute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/udproutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/udproutes.yaml deleted file mode 100644 index fd43b5e9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1alpha2/udproutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: UDPRoute - k8s.io/resource: udproutes - k8s.io/version: v1alpha2 - name: gateway.networking.k8s.io-v1alpha2-udproutes -spec: - resource: - group: gateway.networking.k8s.io - kind: UDPRoute - name: udproutes - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: gatewaynetworkingk8sio-udproute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/gatewayclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/gatewayclasses.yaml deleted file mode 100644 index f2f4c956..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/gatewayclasses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: GatewayClass - k8s.io/resource: gatewayclasses - k8s.io/version: v1beta1 - name: gateway.networking.k8s.io-v1beta1-gatewayclasses -spec: - resource: - group: gateway.networking.k8s.io - kind: GatewayClass - name: gatewayclasses - scope: Cluster - version: v1beta1 - ui: - editor: - name: gatewaynetworkingk8sio-gatewayclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/gateways.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/gateways.yaml deleted file mode 100644 index 9ea4f84e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/gateways.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: Gateway - k8s.io/resource: gateways - k8s.io/version: v1beta1 - name: gateway.networking.k8s.io-v1beta1-gateways -spec: - resource: - group: gateway.networking.k8s.io - kind: Gateway - name: gateways - scope: Namespaced - version: v1beta1 - ui: - editor: - name: gatewaynetworkingk8sio-gateway-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/httproutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/httproutes.yaml deleted file mode 100644 index 0060c4e8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/httproutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: HTTPRoute - k8s.io/resource: httproutes - k8s.io/version: v1beta1 - name: gateway.networking.k8s.io-v1beta1-httproutes -spec: - resource: - group: gateway.networking.k8s.io - kind: HTTPRoute - name: httproutes - scope: Namespaced - version: v1beta1 - ui: - editor: - name: gatewaynetworkingk8sio-httproute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/referencegrants.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/referencegrants.yaml deleted file mode 100644 index 9e8bfbe3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.networking.k8s.io/v1beta1/referencegrants.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.networking.k8s.io - k8s.io/kind: ReferenceGrant - k8s.io/resource: referencegrants - k8s.io/version: v1beta1 - name: gateway.networking.k8s.io-v1beta1-referencegrants -spec: - resource: - group: gateway.networking.k8s.io - kind: ReferenceGrant - name: referencegrants - scope: Namespaced - version: v1beta1 - ui: - editor: - name: gatewaynetworkingk8sio-referencegrant-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/kafkaroutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/kafkaroutes.yaml deleted file mode 100644 index 50ff61a2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/kafkaroutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.voyagermesh.com - k8s.io/kind: KafkaRoute - k8s.io/resource: kafkaroutes - k8s.io/version: v1alpha1 - name: gateway.voyagermesh.com-v1alpha1-kafkaroutes -spec: - resource: - group: gateway.voyagermesh.com - kind: KafkaRoute - name: kafkaroutes - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayvoyagermeshcom-kafkaroute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/mongodbroutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/mongodbroutes.yaml deleted file mode 100644 index 48925773..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/mongodbroutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.voyagermesh.com - k8s.io/kind: MongoDBRoute - k8s.io/resource: mongodbroutes - k8s.io/version: v1alpha1 - name: gateway.voyagermesh.com-v1alpha1-mongodbroutes -spec: - resource: - group: gateway.voyagermesh.com - kind: MongoDBRoute - name: mongodbroutes - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayvoyagermeshcom-mongodbroute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/mysqlroutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/mysqlroutes.yaml deleted file mode 100644 index f4f22f60..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/mysqlroutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.voyagermesh.com - k8s.io/kind: MySQLRoute - k8s.io/resource: mysqlroutes - k8s.io/version: v1alpha1 - name: gateway.voyagermesh.com-v1alpha1-mysqlroutes -spec: - resource: - group: gateway.voyagermesh.com - kind: MySQLRoute - name: mysqlroutes - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayvoyagermeshcom-mysqlroute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/postgresroutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/postgresroutes.yaml deleted file mode 100644 index 54fea379..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/postgresroutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.voyagermesh.com - k8s.io/kind: PostgresRoute - k8s.io/resource: postgresroutes - k8s.io/version: v1alpha1 - name: gateway.voyagermesh.com-v1alpha1-postgresroutes -spec: - resource: - group: gateway.voyagermesh.com - kind: PostgresRoute - name: postgresroutes - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayvoyagermeshcom-postgresroute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/redisroutes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/redisroutes.yaml deleted file mode 100644 index 08aaba07..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gateway.voyagermesh.com/v1alpha1/redisroutes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gateway.voyagermesh.com - k8s.io/kind: RedisRoute - k8s.io/resource: redisroutes - k8s.io/version: v1alpha1 - name: gateway.voyagermesh.com-v1alpha1-redisroutes -spec: - resource: - group: gateway.voyagermesh.com - kind: RedisRoute - name: redisroutes - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: gatewayvoyagermeshcom-redisroute-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1alpha1/storeconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1alpha1/storeconfigs.yaml deleted file mode 100644 index b1838640..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1alpha1/storeconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gcp.kubedb.com - k8s.io/kind: StoreConfig - k8s.io/resource: storeconfigs - k8s.io/version: v1alpha1 - name: gcp.kubedb.com-v1alpha1-storeconfigs -spec: - resource: - group: gcp.kubedb.com - kind: StoreConfig - name: storeconfigs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: gcpkubedbcom-storeconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1beta1/providerconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1beta1/providerconfigs.yaml deleted file mode 100644 index 983c6937..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1beta1/providerconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gcp.kubedb.com - k8s.io/kind: ProviderConfig - k8s.io/resource: providerconfigs - k8s.io/version: v1beta1 - name: gcp.kubedb.com-v1beta1-providerconfigs -spec: - resource: - group: gcp.kubedb.com - kind: ProviderConfig - name: providerconfigs - scope: Cluster - version: v1beta1 - ui: - editor: - name: gcpkubedbcom-providerconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1beta1/providerconfigusages.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1beta1/providerconfigusages.yaml deleted file mode 100644 index 931503dd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/gcp.kubedb.com/v1beta1/providerconfigusages.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: gcp.kubedb.com - k8s.io/kind: ProviderConfigUsage - k8s.io/resource: providerconfigusages - k8s.io/version: v1beta1 - name: gcp.kubedb.com-v1beta1-providerconfigusages -spec: - resource: - group: gcp.kubedb.com - kind: ProviderConfigUsage - name: providerconfigusages - scope: Cluster - version: v1beta1 - ui: - editor: - name: gcpkubedbcom-providerconfigusage-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml deleted file mode 100644 index 85d3a50c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/helm.toolkit.fluxcd.io/v2beta1/helmreleases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: helm.toolkit.fluxcd.io - k8s.io/kind: HelmRelease - k8s.io/resource: helmreleases - k8s.io/version: v2beta1 - name: helm.toolkit.fluxcd.io-v2beta1-helmreleases -spec: - resource: - group: helm.toolkit.fluxcd.io - kind: HelmRelease - name: helmreleases - scope: Namespaced - version: v2beta1 - ui: - editor: - name: helmtoolkitfluxcdio-helmrelease-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/helm.toolkit.fluxcd.io/v2beta2/helmreleases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/helm.toolkit.fluxcd.io/v2beta2/helmreleases.yaml deleted file mode 100644 index 2d66d94a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/helm.toolkit.fluxcd.io/v2beta2/helmreleases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: helm.toolkit.fluxcd.io - k8s.io/kind: HelmRelease - k8s.io/resource: helmreleases - k8s.io/version: v2beta2 - name: helm.toolkit.fluxcd.io-v2beta2-helmreleases -spec: - resource: - group: helm.toolkit.fluxcd.io - kind: HelmRelease - name: helmreleases - scope: Namespaced - version: v2beta2 - ui: - editor: - name: helmtoolkitfluxcdio-helmrelease-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/iam.aws.kubedb.com/v1alpha1/roles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/iam.aws.kubedb.com/v1alpha1/roles.yaml deleted file mode 100644 index c8d5927a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/iam.aws.kubedb.com/v1alpha1/roles.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: iam.aws.kubedb.com - k8s.io/kind: Role - k8s.io/resource: roles - k8s.io/version: v1alpha1 - name: iam.aws.kubedb.com-v1alpha1-roles -spec: - resource: - group: iam.aws.kubedb.com - kind: Role - name: roles - scope: Cluster - version: v1alpha1 - ui: - editor: - name: iamawskubedbcom-role-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imagepolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imagepolicies.yaml deleted file mode 100644 index bca53c19..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imagepolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: image.toolkit.fluxcd.io - k8s.io/kind: ImagePolicy - k8s.io/resource: imagepolicies - k8s.io/version: v1beta1 - name: image.toolkit.fluxcd.io-v1beta1-imagepolicies -spec: - resource: - group: image.toolkit.fluxcd.io - kind: ImagePolicy - name: imagepolicies - scope: Namespaced - version: v1beta1 - ui: - editor: - name: imagetoolkitfluxcdio-imagepolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imagerepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imagerepositories.yaml deleted file mode 100644 index 6b9f2209..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imagerepositories.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: image.toolkit.fluxcd.io - k8s.io/kind: ImageRepository - k8s.io/resource: imagerepositories - k8s.io/version: v1beta1 - name: image.toolkit.fluxcd.io-v1beta1-imagerepositories -spec: - resource: - group: image.toolkit.fluxcd.io - kind: ImageRepository - name: imagerepositories - scope: Namespaced - version: v1beta1 - ui: - editor: - name: imagetoolkitfluxcdio-imagerepository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imageupdateautomations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imageupdateautomations.yaml deleted file mode 100644 index f5155b2e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta1/imageupdateautomations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: image.toolkit.fluxcd.io - k8s.io/kind: ImageUpdateAutomation - k8s.io/resource: imageupdateautomations - k8s.io/version: v1beta1 - name: image.toolkit.fluxcd.io-v1beta1-imageupdateautomations -spec: - resource: - group: image.toolkit.fluxcd.io - kind: ImageUpdateAutomation - name: imageupdateautomations - scope: Namespaced - version: v1beta1 - ui: - editor: - name: imagetoolkitfluxcdio-imageupdateautomation-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta2/imagepolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta2/imagepolicies.yaml deleted file mode 100644 index d9e1ef36..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta2/imagepolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: image.toolkit.fluxcd.io - k8s.io/kind: ImagePolicy - k8s.io/resource: imagepolicies - k8s.io/version: v1beta2 - name: image.toolkit.fluxcd.io-v1beta2-imagepolicies -spec: - resource: - group: image.toolkit.fluxcd.io - kind: ImagePolicy - name: imagepolicies - scope: Namespaced - version: v1beta2 - ui: - editor: - name: imagetoolkitfluxcdio-imagepolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta2/imagerepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta2/imagerepositories.yaml deleted file mode 100644 index 05f52b9a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/image.toolkit.fluxcd.io/v1beta2/imagerepositories.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: image.toolkit.fluxcd.io - k8s.io/kind: ImageRepository - k8s.io/resource: imagerepositories - k8s.io/version: v1beta2 - name: image.toolkit.fluxcd.io-v1beta2-imagerepositories -spec: - resource: - group: image.toolkit.fluxcd.io - kind: ImageRepository - name: imagerepositories - scope: Namespaced - version: v1beta2 - ui: - editor: - name: imagetoolkitfluxcdio-imagerepository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/imagepolicy.k8s.io/v1alpha1/imagereviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/imagepolicy.k8s.io/v1alpha1/imagereviews.yaml deleted file mode 100644 index 02bdf7bd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/imagepolicy.k8s.io/v1alpha1/imagereviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: imagepolicy.k8s.io - k8s.io/kind: ImageReview - k8s.io/resource: imagereviews - k8s.io/version: v1alpha1 - name: imagepolicy.k8s.io-v1alpha1-imagereviews -spec: - resource: - group: imagepolicy.k8s.io - kind: ImageReview - name: imagereviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: imagepolicyk8sio-imagereview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureclusteridentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureclusteridentities.yaml deleted file mode 100644 index 48e21f23..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureclusteridentities.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureClusterIdentity - k8s.io/resource: azureclusteridentities - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azureclusteridentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureClusterIdentity - name: azureclusteridentities - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureclusters.yaml deleted file mode 100644 index c35d53ee..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureclusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureCluster - k8s.io/resource: azureclusters - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azureclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureCluster - name: azureclusters - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachinepools.yaml deleted file mode 100644 index c7817aba..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachinePool - k8s.io/resource: azuremachinepools - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azuremachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachinePool - name: azuremachinepools - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachines.yaml deleted file mode 100644 index 952c3d04..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachines.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachine - k8s.io/resource: azuremachines - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azuremachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachine - name: azuremachines - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachinetemplates.yaml deleted file mode 100644 index d23810a1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremachinetemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachineTemplate - k8s.io/resource: azuremachinetemplates - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azuremachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachineTemplate - name: azuremachinetemplates - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedclusters.yaml deleted file mode 100644 index 58128493..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedclusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedCluster - k8s.io/resource: azuremanagedclusters - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azuremanagedclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedCluster - name: azuremanagedclusters - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedcontrolplanes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedcontrolplanes.yaml deleted file mode 100644 index dc57cf6f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedcontrolplanes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedControlPlane - k8s.io/resource: azuremanagedcontrolplanes - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azuremanagedcontrolplanes -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedControlPlane - name: azuremanagedcontrolplanes - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedmachinepools.yaml deleted file mode 100644 index b4519c80..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuremanagedmachinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedMachinePool - k8s.io/resource: azuremanagedmachinepools - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azuremanagedmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedMachinePool - name: azuremanagedmachinepools - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureserviceprincipals.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureserviceprincipals.yaml deleted file mode 100644 index c880c283..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureserviceprincipals.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureServicePrincipal - k8s.io/resource: azureserviceprincipals - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azureserviceprincipals -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureServicePrincipal - name: azureserviceprincipals - scope: Namespaced - version: v1alpha3 - ui: - editor: - name: infrastructureclusterxk8sio-azureserviceprincipal-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuresystemassignedidentites.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuresystemassignedidentites.yaml deleted file mode 100644 index 85ebc028..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azuresystemassignedidentites.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureSystemAssignedIdentity - k8s.io/resource: azuresystemassignedidentites - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azuresystemassignedidentites -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureSystemAssignedIdentity - name: azuresystemassignedidentites - scope: Namespaced - version: v1alpha3 - ui: - editor: - name: infrastructureclusterxk8sio-azuresystemassignedidentity-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureuserassignedidentites.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureuserassignedidentites.yaml deleted file mode 100644 index 9d575a82..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/azureuserassignedidentites.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureUserAssignedIdentity - k8s.io/resource: azureuserassignedidentites - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-azureuserassignedidentites -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureUserAssignedIdentity - name: azureuserassignedidentites - scope: Namespaced - version: v1alpha3 - ui: - editor: - name: infrastructureclusterxk8sio-azureuserassignedidentity-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpclusters.yaml deleted file mode 100644 index 4992755c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpclusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPCluster - k8s.io/resource: gcpclusters - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-gcpclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPCluster - name: gcpclusters - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpmachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpmachines.yaml deleted file mode 100644 index e3f324cf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpmachines.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPMachine - k8s.io/resource: gcpmachines - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-gcpmachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPMachine - name: gcpmachines - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpmachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpmachinetemplates.yaml deleted file mode 100644 index ea7c9f27..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha3/gcpmachinetemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPMachineTemplate - k8s.io/resource: gcpmachinetemplates - k8s.io/version: v1alpha3 - name: infrastructure.cluster.x-k8s.io-v1alpha3-gcpmachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPMachineTemplate - name: gcpmachinetemplates - scope: Namespaced - version: v1alpha3 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azureclusteridentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azureclusteridentities.yaml deleted file mode 100644 index c21e36ae..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azureclusteridentities.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureClusterIdentity - k8s.io/resource: azureclusteridentities - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azureclusteridentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureClusterIdentity - name: azureclusteridentities - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azureclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azureclusters.yaml deleted file mode 100644 index 659291d7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azureclusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureCluster - k8s.io/resource: azureclusters - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azureclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureCluster - name: azureclusters - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinepoolmachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinepoolmachines.yaml deleted file mode 100644 index c4f124fc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinepoolmachines.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachinePoolMachine - k8s.io/resource: azuremachinepoolmachines - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azuremachinepoolmachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachinePoolMachine - name: azuremachinepoolmachines - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinepools.yaml deleted file mode 100644 index 45c47974..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachinePool - k8s.io/resource: azuremachinepools - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azuremachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachinePool - name: azuremachinepools - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachines.yaml deleted file mode 100644 index 1c9ec771..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachines.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachine - k8s.io/resource: azuremachines - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azuremachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachine - name: azuremachines - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinetemplates.yaml deleted file mode 100644 index 3ac3b910..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremachinetemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachineTemplate - k8s.io/resource: azuremachinetemplates - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azuremachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachineTemplate - name: azuremachinetemplates - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedclusters.yaml deleted file mode 100644 index 84f5a2e0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedclusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedCluster - k8s.io/resource: azuremanagedclusters - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azuremanagedclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedCluster - name: azuremanagedclusters - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedcontrolplanes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedcontrolplanes.yaml deleted file mode 100644 index 6034b096..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedcontrolplanes.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedControlPlane - k8s.io/resource: azuremanagedcontrolplanes - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azuremanagedcontrolplanes -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedControlPlane - name: azuremanagedcontrolplanes - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedmachinepools.yaml deleted file mode 100644 index 721353c3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/azuremanagedmachinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedMachinePool - k8s.io/resource: azuremanagedmachinepools - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-azuremanagedmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedMachinePool - name: azuremanagedmachinepools - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpclusters.yaml deleted file mode 100644 index 4083028e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpclusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPCluster - k8s.io/resource: gcpclusters - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-gcpclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPCluster - name: gcpclusters - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpclustertemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpclustertemplates.yaml deleted file mode 100644 index 46d77543..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpclustertemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPClusterTemplate - k8s.io/resource: gcpclustertemplates - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-gcpclustertemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPClusterTemplate - name: gcpclustertemplates - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpmachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpmachines.yaml deleted file mode 100644 index 9995cf73..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpmachines.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPMachine - k8s.io/resource: gcpmachines - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-gcpmachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPMachine - name: gcpmachines - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpmachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpmachinetemplates.yaml deleted file mode 100644 index e217075f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1alpha4/gcpmachinetemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPMachineTemplate - k8s.io/resource: gcpmachinetemplates - k8s.io/version: v1alpha4 - name: infrastructure.cluster.x-k8s.io-v1alpha4-gcpmachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPMachineTemplate - name: gcpmachinetemplates - scope: Namespaced - version: v1alpha4 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclustercontrolleridentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclustercontrolleridentities.yaml deleted file mode 100644 index f190abed..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclustercontrolleridentities.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterControllerIdentity - k8s.io/resource: awsclustercontrolleridentities - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsclustercontrolleridentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterControllerIdentity - name: awsclustercontrolleridentities - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusterroleidentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusterroleidentities.yaml deleted file mode 100644 index 8d94b7d4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusterroleidentities.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterRoleIdentity - k8s.io/resource: awsclusterroleidentities - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsclusterroleidentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterRoleIdentity - name: awsclusterroleidentities - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusters.yaml deleted file mode 100644 index ba5c1f35..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusters.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSCluster - k8s.io/resource: awsclusters - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSCluster - name: awsclusters - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusterstaticidentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusterstaticidentities.yaml deleted file mode 100644 index 63464359..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclusterstaticidentities.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterStaticIdentity - k8s.io/resource: awsclusterstaticidentities - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsclusterstaticidentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterStaticIdentity - name: awsclusterstaticidentities - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclustertemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclustertemplates.yaml deleted file mode 100644 index 0d549c2f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsclustertemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterTemplate - k8s.io/resource: awsclustertemplates - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsclustertemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterTemplate - name: awsclustertemplates - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsfargateprofiles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsfargateprofiles.yaml deleted file mode 100644 index 2736d542..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsfargateprofiles.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSFargateProfile - k8s.io/resource: awsfargateprofiles - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsfargateprofiles -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSFargateProfile - name: awsfargateprofiles - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachinepools.yaml deleted file mode 100644 index f999e9e5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSMachinePool - k8s.io/resource: awsmachinepools - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSMachinePool - name: awsmachinepools - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachines.yaml deleted file mode 100644 index 6fa1ef48..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachines.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSMachine - k8s.io/resource: awsmachines - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsmachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSMachine - name: awsmachines - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachinetemplates.yaml deleted file mode 100644 index 7225a10e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmachinetemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSMachineTemplate - k8s.io/resource: awsmachinetemplates - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsmachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSMachineTemplate - name: awsmachinetemplates - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmanagedmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmanagedmachinepools.yaml deleted file mode 100644 index 7d56b038..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/awsmanagedmachinepools.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSManagedMachinePool - k8s.io/resource: awsmanagedmachinepools - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-awsmanagedmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSManagedMachinePool - name: awsmanagedmachinepools - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclusteridentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclusteridentities.yaml deleted file mode 100644 index 8944e1b9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclusteridentities.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureClusterIdentity - k8s.io/resource: azureclusteridentities - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azureclusteridentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureClusterIdentity - name: azureclusteridentities - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azureclusteridentity-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclusters.yaml deleted file mode 100644 index 87c338b1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureCluster - k8s.io/resource: azureclusters - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azureclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureCluster - name: azureclusters - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azurecluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclustertemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclustertemplates.yaml deleted file mode 100644 index 5bbe5c26..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azureclustertemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureClusterTemplate - k8s.io/resource: azureclustertemplates - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azureclustertemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureClusterTemplate - name: azureclustertemplates - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azureclustertemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinepoolmachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinepoolmachines.yaml deleted file mode 100644 index c396737b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinepoolmachines.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachinePoolMachine - k8s.io/resource: azuremachinepoolmachines - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azuremachinepoolmachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachinePoolMachine - name: azuremachinepoolmachines - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azuremachinepoolmachine-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinepools.yaml deleted file mode 100644 index e38d3c49..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinepools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachinePool - k8s.io/resource: azuremachinepools - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azuremachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachinePool - name: azuremachinepools - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azuremachinepool-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachines.yaml deleted file mode 100644 index 874fc7e7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachines.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachine - k8s.io/resource: azuremachines - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azuremachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachine - name: azuremachines - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azuremachine-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinetemplates.yaml deleted file mode 100644 index d737ec40..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremachinetemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureMachineTemplate - k8s.io/resource: azuremachinetemplates - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azuremachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureMachineTemplate - name: azuremachinetemplates - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azuremachinetemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedclusters.yaml deleted file mode 100644 index 1fb707a9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedCluster - k8s.io/resource: azuremanagedclusters - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azuremanagedclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedCluster - name: azuremanagedclusters - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azuremanagedcluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedcontrolplanes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedcontrolplanes.yaml deleted file mode 100644 index a265bea0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedcontrolplanes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedControlPlane - k8s.io/resource: azuremanagedcontrolplanes - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azuremanagedcontrolplanes -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedControlPlane - name: azuremanagedcontrolplanes - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azuremanagedcontrolplane-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedmachinepools.yaml deleted file mode 100644 index 5177c406..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/azuremanagedmachinepools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AzureManagedMachinePool - k8s.io/resource: azuremanagedmachinepools - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-azuremanagedmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AzureManagedMachinePool - name: azuremanagedmachinepools - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-azuremanagedmachinepool-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpclusters.yaml deleted file mode 100644 index 3407a2c8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPCluster - k8s.io/resource: gcpclusters - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-gcpclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPCluster - name: gcpclusters - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-gcpcluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpclustertemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpclustertemplates.yaml deleted file mode 100644 index 207a1d9e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpclustertemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPClusterTemplate - k8s.io/resource: gcpclustertemplates - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-gcpclustertemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPClusterTemplate - name: gcpclustertemplates - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-gcpclustertemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmachines.yaml deleted file mode 100644 index dab1a72f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmachines.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPMachine - k8s.io/resource: gcpmachines - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-gcpmachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPMachine - name: gcpmachines - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-gcpmachine-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmachinetemplates.yaml deleted file mode 100644 index 3037a468..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmachinetemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPMachineTemplate - k8s.io/resource: gcpmachinetemplates - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-gcpmachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPMachineTemplate - name: gcpmachinetemplates - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-gcpmachinetemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedclusters.yaml deleted file mode 100644 index 432fad01..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPManagedCluster - k8s.io/resource: gcpmanagedclusters - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-gcpmanagedclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPManagedCluster - name: gcpmanagedclusters - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-gcpmanagedcluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedcontrolplanes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedcontrolplanes.yaml deleted file mode 100644 index 6756195d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedcontrolplanes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPManagedControlPlane - k8s.io/resource: gcpmanagedcontrolplanes - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-gcpmanagedcontrolplanes -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPManagedControlPlane - name: gcpmanagedcontrolplanes - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-gcpmanagedcontrolplane-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedmachinepools.yaml deleted file mode 100644 index 16f417c8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta1/gcpmanagedmachinepools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: GCPManagedMachinePool - k8s.io/resource: gcpmanagedmachinepools - k8s.io/version: v1beta1 - name: infrastructure.cluster.x-k8s.io-v1beta1-gcpmanagedmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: GCPManagedMachinePool - name: gcpmanagedmachinepools - scope: Namespaced - version: v1beta1 - ui: - editor: - name: infrastructureclusterxk8sio-gcpmanagedmachinepool-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclustercontrolleridentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclustercontrolleridentities.yaml deleted file mode 100644 index f7e75afa..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclustercontrolleridentities.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterControllerIdentity - k8s.io/resource: awsclustercontrolleridentities - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsclustercontrolleridentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterControllerIdentity - name: awsclustercontrolleridentities - scope: Cluster - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsclustercontrolleridentity-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusterroleidentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusterroleidentities.yaml deleted file mode 100644 index 0adc600b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusterroleidentities.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterRoleIdentity - k8s.io/resource: awsclusterroleidentities - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsclusterroleidentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterRoleIdentity - name: awsclusterroleidentities - scope: Cluster - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsclusterroleidentity-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusters.yaml deleted file mode 100644 index 902c0441..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSCluster - k8s.io/resource: awsclusters - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSCluster - name: awsclusters - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awscluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusterstaticidentities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusterstaticidentities.yaml deleted file mode 100644 index 939689d9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclusterstaticidentities.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterStaticIdentity - k8s.io/resource: awsclusterstaticidentities - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsclusterstaticidentities -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterStaticIdentity - name: awsclusterstaticidentities - scope: Cluster - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsclusterstaticidentity-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclustertemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclustertemplates.yaml deleted file mode 100644 index aa85c2f5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsclustertemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSClusterTemplate - k8s.io/resource: awsclustertemplates - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsclustertemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSClusterTemplate - name: awsclustertemplates - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsclustertemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsfargateprofiles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsfargateprofiles.yaml deleted file mode 100644 index 82a53a77..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsfargateprofiles.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSFargateProfile - k8s.io/resource: awsfargateprofiles - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsfargateprofiles -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSFargateProfile - name: awsfargateprofiles - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsfargateprofile-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachinepools.yaml deleted file mode 100644 index aabe7f92..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachinepools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSMachinePool - k8s.io/resource: awsmachinepools - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSMachinePool - name: awsmachinepools - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsmachinepool-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachines.yaml deleted file mode 100644 index ede9aa26..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachines.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSMachine - k8s.io/resource: awsmachines - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsmachines -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSMachine - name: awsmachines - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsmachine-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachinetemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachinetemplates.yaml deleted file mode 100644 index 1ffeec0e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmachinetemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSMachineTemplate - k8s.io/resource: awsmachinetemplates - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsmachinetemplates -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSMachineTemplate - name: awsmachinetemplates - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsmachinetemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmanagedclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmanagedclusters.yaml deleted file mode 100644 index 4a1a30ea..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmanagedclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSManagedCluster - k8s.io/resource: awsmanagedclusters - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsmanagedclusters -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSManagedCluster - name: awsmanagedclusters - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsmanagedcluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmanagedmachinepools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmanagedmachinepools.yaml deleted file mode 100644 index 4032c371..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/infrastructure.cluster.x-k8s.io/v1beta2/awsmanagedmachinepools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: infrastructure.cluster.x-k8s.io - k8s.io/kind: AWSManagedMachinePool - k8s.io/resource: awsmanagedmachinepools - k8s.io/version: v1beta2 - name: infrastructure.cluster.x-k8s.io-v1beta2-awsmanagedmachinepools -spec: - resource: - group: infrastructure.cluster.x-k8s.io - kind: AWSManagedMachinePool - name: awsmanagedmachinepools - scope: Namespaced - version: v1beta2 - ui: - editor: - name: infrastructureclusterxk8sio-awsmanagedmachinepool-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/internal.apiserver.k8s.io/v1alpha1/storageversions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/internal.apiserver.k8s.io/v1alpha1/storageversions.yaml deleted file mode 100644 index 2b5d9ec1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/internal.apiserver.k8s.io/v1alpha1/storageversions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: internal.apiserver.k8s.io - k8s.io/kind: StorageVersion - k8s.io/resource: storageversions - k8s.io/version: v1alpha1 - name: internal.apiserver.k8s.io-v1alpha1-storageversions -spec: - resource: - group: internal.apiserver.k8s.io - kind: StorageVersion - name: storageversions - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: internalapiserverk8sio-storageversion-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ipam.cluster.x-k8s.io/v1alpha1/ipaddressclaims.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ipam.cluster.x-k8s.io/v1alpha1/ipaddressclaims.yaml deleted file mode 100644 index 0ea8b288..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ipam.cluster.x-k8s.io/v1alpha1/ipaddressclaims.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ipam.cluster.x-k8s.io - k8s.io/kind: IPAddressClaim - k8s.io/resource: ipaddressclaims - k8s.io/version: v1alpha1 - name: ipam.cluster.x-k8s.io-v1alpha1-ipaddressclaims -spec: - resource: - group: ipam.cluster.x-k8s.io - kind: IPAddressClaim - name: ipaddressclaims - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: ipamclusterxk8sio-ipaddressclaim-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ipam.cluster.x-k8s.io/v1alpha1/ipaddresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ipam.cluster.x-k8s.io/v1alpha1/ipaddresses.yaml deleted file mode 100644 index 65adf1e7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ipam.cluster.x-k8s.io/v1alpha1/ipaddresses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ipam.cluster.x-k8s.io - k8s.io/kind: IPAddress - k8s.io/resource: ipaddresses - k8s.io/version: v1alpha1 - name: ipam.cluster.x-k8s.io-v1alpha1-ipaddresses -spec: - resource: - group: ipam.cluster.x-k8s.io - kind: IPAddress - name: ipaddresses - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: ipamclusterxk8sio-ipaddress-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kafka.aws.kubedb.com/v1alpha1/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kafka.aws.kubedb.com/v1alpha1/clusters.yaml deleted file mode 100644 index 0ddbf2f6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kafka.aws.kubedb.com/v1alpha1/clusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kafka.aws.kubedb.com - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1alpha1 - name: kafka.aws.kubedb.com-v1alpha1-clusters -spec: - resource: - group: kafka.aws.kubedb.com - kind: Cluster - name: clusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: kafkaawskubedbcom-cluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kafka.aws.kubedb.com/v1alpha1/configurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kafka.aws.kubedb.com/v1alpha1/configurations.yaml deleted file mode 100644 index 811bf054..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kafka.aws.kubedb.com/v1alpha1/configurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kafka.aws.kubedb.com - k8s.io/kind: Configuration - k8s.io/resource: configurations - k8s.io/version: v1alpha1 - name: kafka.aws.kubedb.com-v1alpha1-configurations -spec: - resource: - group: kafka.aws.kubedb.com - kind: Configuration - name: configurations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: kafkaawskubedbcom-configuration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/keyvault.azure.kubedb.com/v1alpha1/keys.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/keyvault.azure.kubedb.com/v1alpha1/keys.yaml deleted file mode 100644 index 0c0d40c9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/keyvault.azure.kubedb.com/v1alpha1/keys.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: keyvault.azure.kubedb.com - k8s.io/kind: Key - k8s.io/resource: keys - k8s.io/version: v1alpha1 - name: keyvault.azure.kubedb.com-v1alpha1-keys -spec: - resource: - group: keyvault.azure.kubedb.com - kind: Key - name: keys - scope: Cluster - version: v1alpha1 - ui: - editor: - name: keyvaultazurekubedbcom-key-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/keyvault.azure.kubedb.com/v1alpha1/vaults.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/keyvault.azure.kubedb.com/v1alpha1/vaults.yaml deleted file mode 100644 index 9d736c8c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/keyvault.azure.kubedb.com/v1alpha1/vaults.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: keyvault.azure.kubedb.com - k8s.io/kind: Vault - k8s.io/resource: vaults - k8s.io/version: v1alpha1 - name: keyvault.azure.kubedb.com-v1alpha1-vaults -spec: - resource: - group: keyvault.azure.kubedb.com - kind: Vault - name: vaults - scope: Cluster - version: v1alpha1 - ui: - editor: - name: keyvaultazurekubedbcom-vault-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kinesis.aws.kubedb.com/v1alpha1/streams.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kinesis.aws.kubedb.com/v1alpha1/streams.yaml deleted file mode 100644 index 06e9238d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kinesis.aws.kubedb.com/v1alpha1/streams.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kinesis.aws.kubedb.com - k8s.io/kind: Stream - k8s.io/resource: streams - k8s.io/version: v1alpha1 - name: kinesis.aws.kubedb.com-v1alpha1-streams -spec: - resource: - group: kinesis.aws.kubedb.com - kind: Stream - name: streams - scope: Cluster - version: v1alpha1 - ui: - editor: - name: kinesisawskubedbcom-stream-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kms.aws.kubedb.com/v1alpha1/keys.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kms.aws.kubedb.com/v1alpha1/keys.yaml deleted file mode 100644 index ce5b1f0b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kms.aws.kubedb.com/v1alpha1/keys.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kms.aws.kubedb.com - k8s.io/kind: Key - k8s.io/resource: keys - k8s.io/version: v1alpha1 - name: kms.aws.kubedb.com-v1alpha1-keys -spec: - resource: - group: kms.aws.kubedb.com - kind: Key - name: keys - scope: Cluster - version: v1alpha1 - ui: - editor: - name: kmsawskubedbcom-key-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/elasticsearches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/elasticsearches.yaml deleted file mode 100644 index 7130b209..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/elasticsearches.yaml +++ /dev/null @@ -1,180 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: Elasticsearch - k8s.io/resource: elasticsearches - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-elasticsearches -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/elasticsearches.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/elasticsearches.png - type: image/png - resource: - group: kubedb.com - kind: Elasticsearch - name: elasticsearches - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: kubedbcom-elasticsearch-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg - type: image/svg+xml - name: Backup - operationId: edit-self-backupconfiguration - - editor: - name: stashappscodecom-restoresession-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg - type: image/svg+xml - name: Restore - operationId: create-restoresession - name: Backups - - items: - - editor: - name: opskubedbcom-elasticsearchopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg - type: image/svg+xml - name: Update Version - operationId: create-opsrequest-upgrade - - editor: - name: opskubedbcom-elasticsearchopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg - type: image/svg+xml - name: Restart - operationId: create-opsrequest-restart - name: Operations - - items: - - editor: - name: opskubedbcom-elasticsearchopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg - type: image/svg+xml - name: Horizontal Scale - operationId: create-opsrequest-horizontalscaling - - editor: - name: opskubedbcom-elasticsearchopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg - type: image/svg+xml - name: Vertical Scale - operationId: create-opsrequest-verticalscaling - - editor: - name: opskubedbcom-elasticsearchopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg - type: image/svg+xml - name: Expand Volume - operationId: create-opsrequest-volumeexpansion - name: Scaling - - items: - - disabledTemplate: | - {{ not (and (hasKey .spec "tls") ( hasKey .spec.tls "issuerRef"))}} - editor: - name: opskubedbcom-elasticsearchopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg - type: image/svg+xml - name: TLS Configure - operationId: create-opsrequest-reconfiguretls - - editor: - name: kubedbcom-elasticsearch-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-elasticsearch-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-elasticsearch-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/etcds.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/etcds.yaml deleted file mode 100644 index 23ef77ff..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/etcds.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: Etcd - k8s.io/resource: etcds - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-etcds -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/etcds.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/etcds.png - type: image/png - resource: - group: kubedb.com - kind: Etcd - name: etcds - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: kubedbcom-etcd-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - options: - name: kubedbcom-etcd-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/kafkas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/kafkas.yaml deleted file mode 100644 index d59311af..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/kafkas.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: Kafka - k8s.io/resource: kafkas - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-kafkas -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/kafkas.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/kafkas.png - type: image/png - resource: - group: kubedb.com - kind: Kafka - name: kafkas - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: kubedbcom-kafka-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-kafka-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-kafka-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mariadbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mariadbs.yaml deleted file mode 100644 index 070685b2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mariadbs.yaml +++ /dev/null @@ -1,194 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: MariaDB - k8s.io/resource: mariadbs - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-mariadbs -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/mariadbs.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/mariadbs.png - type: image/png - resource: - group: kubedb.com - kind: MariaDB - name: mariadbs - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: kubedbcom-mariadb-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg - type: image/svg+xml - name: Backup - operationId: edit-self-backupconfiguration - - editor: - name: stashappscodecom-restoresession-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg - type: image/svg+xml - name: Restore - operationId: create-restoresession - name: Backups - - items: - - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg - type: image/svg+xml - name: Update Version - operationId: create-opsrequest-upgrade - - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg - type: image/svg+xml - name: Restart - operationId: create-opsrequest-restart - - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg - type: image/svg+xml - name: Reconfigure - operationId: create-opsrequest-reconfigure - name: Operations - - items: - - disabledTemplate: | - {{ not (gt .spec.replicas 1) }} - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg - type: image/svg+xml - name: Horizontal Scale - operationId: create-opsrequest-horizontalscaling - - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg - type: image/svg+xml - name: Vertical Scale - operationId: create-opsrequest-verticalscaling - - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg - type: image/svg+xml - name: Expand Volume - operationId: create-opsrequest-volumeexpansion - name: Scaling - - items: - - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg - type: image/svg+xml - name: TLS Configure - operationId: create-opsrequest-reconfiguretls - - editor: - name: kubedbcom-mariadb-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-mariadb-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-mariadb-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/memcacheds.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/memcacheds.yaml deleted file mode 100644 index b3fb87c0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/memcacheds.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: Memcached - k8s.io/resource: memcacheds - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-memcacheds -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/memcacheds.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/memcacheds.png - type: image/png - resource: - group: kubedb.com - kind: Memcached - name: memcacheds - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: kubedbcom-memcached-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - options: - name: kubedbcom-memcached-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mongodbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mongodbs.yaml deleted file mode 100644 index 35d01db9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mongodbs.yaml +++ /dev/null @@ -1,194 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: MongoDB - k8s.io/resource: mongodbs - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-mongodbs -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/mongodbs.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/mongodbs.png - type: image/png - resource: - group: kubedb.com - kind: MongoDB - name: mongodbs - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: kubedbcom-mongodb-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg - type: image/svg+xml - name: Backup - operationId: edit-self-backupconfiguration - - editor: - name: stashappscodecom-restoresession-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg - type: image/svg+xml - name: Restore - operationId: create-restoresession - name: Backups - - items: - - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg - type: image/svg+xml - name: Update Version - operationId: create-opsrequest-upgrade - - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg - type: image/svg+xml - name: Restart - operationId: create-opsrequest-restart - - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg - type: image/svg+xml - name: Reconfigure - operationId: create-opsrequest-reconfigure - name: Operations - - items: - - disabledTemplate: | - {{ not (or (hasKey .spec "shardTopology") ( hasKey .spec "replicaSet"))}} - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg - type: image/svg+xml - name: Horizontal Scale - operationId: create-opsrequest-horizontalscaling - - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg - type: image/svg+xml - name: Vertical Scale - operationId: create-opsrequest-verticalscaling - - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg - type: image/svg+xml - name: Expand Volume - operationId: create-opsrequest-volumeexpansion - name: Scaling - - items: - - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg - type: image/svg+xml - name: TLS Configure - operationId: create-opsrequest-reconfiguretls - - editor: - name: kubedbcom-mongodb-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-mongodb-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-mongodb-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mysqls.yaml deleted file mode 100644 index d56b4d57..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/mysqls.yaml +++ /dev/null @@ -1,194 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: MySQL - k8s.io/resource: mysqls - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-mysqls -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/mysqls.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/mysqls.png - type: image/png - resource: - group: kubedb.com - kind: MySQL - name: mysqls - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: kubedbcom-mysql-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg - type: image/svg+xml - name: Backup - operationId: edit-self-backupconfiguration - - editor: - name: stashappscodecom-restoresession-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg - type: image/svg+xml - name: Restore - operationId: create-restoresession - name: Backups - - items: - - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg - type: image/svg+xml - name: Update Version - operationId: create-opsrequest-upgrade - - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg - type: image/svg+xml - name: Restart - operationId: create-opsrequest-restart - - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg - type: image/svg+xml - name: Reconfigure - operationId: create-opsrequest-reconfigure - name: Operations - - items: - - disabledTemplate: | - {{ not (and (hasKey .spec "topology") (hasKey .spec.topology "mode")) }} - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg - type: image/svg+xml - name: Horizontal Scale - operationId: create-opsrequest-horizontalscaling - - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg - type: image/svg+xml - name: Vertical Scale - operationId: create-opsrequest-verticalscaling - - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg - type: image/svg+xml - name: Expand Volume - operationId: create-opsrequest-volumeexpansion - name: Scaling - - items: - - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg - type: image/svg+xml - name: TLS Configure - operationId: create-opsrequest-reconfiguretls - - editor: - name: kubedbcom-mysql-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-mysql-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-mysql-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/perconaxtradbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/perconaxtradbs.yaml deleted file mode 100644 index 7e9e0324..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/perconaxtradbs.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: PerconaXtraDB - k8s.io/resource: perconaxtradbs - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-perconaxtradbs -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/perconaxtradbs.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/perconaxtradbs.png - type: image/png - resource: - group: kubedb.com - kind: PerconaXtraDB - name: perconaxtradbs - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: kubedbcom-perconaxtradb-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-perconaxtradb-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/pgbouncers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/pgbouncers.yaml deleted file mode 100644 index 9ac53818..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/pgbouncers.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: PgBouncer - k8s.io/resource: pgbouncers - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-pgbouncers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/pgbouncers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/pgbouncers.png - type: image/png - resource: - group: kubedb.com - kind: PgBouncer - name: pgbouncers - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: kubedbcom-pgbouncer-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - options: - name: kubedbcom-pgbouncer-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/postgreses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/postgreses.yaml deleted file mode 100644 index c71f17b3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/postgreses.yaml +++ /dev/null @@ -1,194 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: Postgres - k8s.io/resource: postgreses - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-postgreses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/postgreses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/postgreses.png - type: image/png - resource: - group: kubedb.com - kind: Postgres - name: postgreses - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: kubedbcom-postgres-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg - type: image/svg+xml - name: Backup - operationId: edit-self-backupconfiguration - - editor: - name: stashappscodecom-restoresession-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg - type: image/svg+xml - name: Restore - operationId: create-restoresession - name: Backups - - items: - - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg - type: image/svg+xml - name: Update Version - operationId: create-opsrequest-upgrade - - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg - type: image/svg+xml - name: Restart - operationId: create-opsrequest-restart - - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg - type: image/svg+xml - name: Reconfigure - operationId: create-opsrequest-reconfigure - name: Operations - - items: - - disabledTemplate: | - {{ not (hasKey .spec "standbyMode") }} - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg - type: image/svg+xml - name: Horizontal Scale - operationId: create-opsrequest-horizontalscaling - - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg - type: image/svg+xml - name: Vertical Scale - operationId: create-opsrequest-verticalscaling - - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg - type: image/svg+xml - name: Expand Volume - operationId: create-opsrequest-volumeexpansion - name: Scaling - - items: - - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg - type: image/svg+xml - name: TLS Configure - operationId: create-opsrequest-reconfiguretls - - editor: - name: kubedbcom-postgres-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-postgres-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-postgres-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/proxysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/proxysqls.yaml deleted file mode 100644 index d695e0b3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/proxysqls.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: ProxySQL - k8s.io/resource: proxysqls - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-proxysqls -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/proxysqls.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/proxysqls.png - type: image/png - resource: - group: kubedb.com - kind: ProxySQL - name: proxysqls - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: opskubedbcom-proxysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg - type: image/svg+xml - name: Update Version - operationId: create-opsrequest-upgrade - - editor: - name: opskubedbcom-proxysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg - type: image/svg+xml - name: Restart - operationId: create-opsrequest-restart - - editor: - name: opskubedbcom-proxysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg - type: image/svg+xml - name: Reconfigure - operationId: create-opsrequest-reconfigure - name: Operations - - items: - - editor: - name: opskubedbcom-proxysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg - type: image/svg+xml - name: Horizontal Scale - operationId: create-opsrequest-horizontalscaling - - editor: - name: opskubedbcom-proxysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg - type: image/svg+xml - name: Vertical Scale - operationId: create-opsrequest-verticalscaling - name: Scaling - - items: - - editor: - name: opskubedbcom-proxysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg - type: image/svg+xml - name: TLS Configure - operationId: create-opsrequest-reconfiguretls - - editor: - name: kubedbcom-proxysql-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-proxysql-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - options: - name: kubedbcom-proxysql-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/redises.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/redises.yaml deleted file mode 100644 index 6b6c1528..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/redises.yaml +++ /dev/null @@ -1,194 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: Redis - k8s.io/resource: redises - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-redises -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/redises.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/redises.png - type: image/png - resource: - group: kubedb.com - kind: Redis - name: redises - scope: Namespaced - version: v1alpha2 - ui: - actions: - - items: - - editor: - name: kubedbcom-redis-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg - type: image/svg+xml - name: Backup - operationId: edit-self-backupconfiguration - - editor: - name: stashappscodecom-restoresession-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg - type: image/svg+xml - name: Restore - operationId: create-restoresession - name: Backups - - items: - - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg - type: image/svg+xml - name: Update Version - operationId: create-opsrequest-upgrade - - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg - type: image/svg+xml - name: Restart - operationId: create-opsrequest-restart - - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg - type: image/svg+xml - name: Reconfigure - operationId: create-opsrequest-reconfigure - name: Operations - - items: - - disabledTemplate: | - {{ or (not (hasKey .spec "mode")) (eq .spec.mode "Standalone") }} - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg - type: image/svg+xml - name: Horizontal Scale - operationId: create-opsrequest-horizontalscaling - - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg - type: image/svg+xml - name: Vertical Scale - operationId: create-opsrequest-verticalscaling - - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg - type: image/svg+xml - name: Expand Volume - operationId: create-opsrequest-volumeexpansion - name: Scaling - - items: - - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-create - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg - type: image/svg+xml - name: TLS Configure - operationId: create-opsrequest-reconfiguretls - - editor: - name: kubedbcom-redis-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - flow: standalone-edit - icons: - - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg - type: image/svg+xml - name: Monitoring - operationId: edit-self-monitoring - name: Security & Monitoring - editor: - name: kubedbcom-redis-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: true - options: - name: kubedbcom-redis-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/redissentinels.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/redissentinels.yaml deleted file mode 100644 index b53e81fa..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1alpha2/redissentinels.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubedb.com - k8s.io/kind: RedisSentinel - k8s.io/resource: redissentinels - k8s.io/version: v1alpha2 - name: kubedb.com-v1alpha2-redissentinels -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/redissentinels.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubedb.com/redissentinels.png - type: image/png - resource: - group: kubedb.com - kind: RedisSentinel - name: redissentinels - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: kubedbcom-redissentinel-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubevault.com/v1alpha1/vaultservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubevault.com/v1alpha1/vaultservers.yaml deleted file mode 100644 index 0b52dacd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubevault.com/v1alpha1/vaultservers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubevault.com - k8s.io/kind: VaultServer - k8s.io/resource: vaultservers - k8s.io/version: v1alpha1 - name: kubevault.com-v1alpha1-vaultservers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubevault.com/vaultservers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubevault.com/vaultservers.png - type: image/png - resource: - group: kubevault.com - kind: VaultServer - name: vaultservers - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubevault.com/v1alpha2/vaultservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubevault.com/v1alpha2/vaultservers.yaml deleted file mode 100644 index 3f777ae6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubevault.com/v1alpha2/vaultservers.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kubevault.com - k8s.io/kind: VaultServer - k8s.io/resource: vaultservers - k8s.io/version: v1alpha2 - name: kubevault.com-v1alpha2-vaultservers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/kubevault.com/vaultservers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/kubevault.com/vaultservers.png - type: image/png - resource: - group: kubevault.com - kind: VaultServer - name: vaultservers - scope: Namespaced - version: v1alpha2 - ui: - editor: - name: kubevaultcom-vaultserver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - options: - name: kubevaultcom-vaultserver-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - variants: - - name: default - selector: - matchLabels: - charts.x-helm.dev/is-default-preset: "true" diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1/kustomizations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1/kustomizations.yaml deleted file mode 100644 index 37450c85..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1/kustomizations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kustomize.toolkit.fluxcd.io - k8s.io/kind: Kustomization - k8s.io/resource: kustomizations - k8s.io/version: v1 - name: kustomize.toolkit.fluxcd.io-v1-kustomizations -spec: - resource: - group: kustomize.toolkit.fluxcd.io - kind: Kustomization - name: kustomizations - scope: Namespaced - version: v1 - ui: - editor: - name: kustomizetoolkitfluxcdio-kustomization-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1beta1/kustomizations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1beta1/kustomizations.yaml deleted file mode 100644 index efe214de..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1beta1/kustomizations.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kustomize.toolkit.fluxcd.io - k8s.io/kind: Kustomization - k8s.io/resource: kustomizations - k8s.io/version: v1beta1 - name: kustomize.toolkit.fluxcd.io-v1beta1-kustomizations -spec: - resource: - group: kustomize.toolkit.fluxcd.io - kind: Kustomization - name: kustomizations - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1beta2/kustomizations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1beta2/kustomizations.yaml deleted file mode 100644 index d1c347c7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kustomize.toolkit.fluxcd.io/v1beta2/kustomizations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: kustomize.toolkit.fluxcd.io - k8s.io/kind: Kustomization - k8s.io/resource: kustomizations - k8s.io/version: v1beta2 - name: kustomize.toolkit.fluxcd.io-v1beta2-kustomizations -spec: - resource: - group: kustomize.toolkit.fluxcd.io - kind: Kustomization - name: kustomizations - scope: Namespaced - version: v1beta2 - ui: - editor: - name: kustomizetoolkitfluxcdio-kustomization-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/lib.go b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/lib.go deleted file mode 100644 index 665e3553..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/lib.go +++ /dev/null @@ -1,207 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resourceeditors - -import ( - "context" - "embed" - "fmt" - iofs "io/fs" - "path/filepath" - "reflect" - "sort" - "sync" - - kmapi "kmodules.xyz/client-go/api/v1" - "kmodules.xyz/resource-metadata/apis/ui/v1alpha1" - - "github.com/pkg/errors" - ioutilx "gomodules.xyz/x/ioutil" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/klog/v2" - "sigs.k8s.io/controller-runtime/pkg/client" - "sigs.k8s.io/yaml" -) - -var ( - //go:embed **/**/*.yaml trigger - fs embed.FS - - m sync.Mutex - reMap map[string]*v1alpha1.ResourceEditor - - loader = ioutilx.NewReloader( - filepath.Join("/tmp", "hub", "resourceeditors"), - fs, - func(fsys iofs.FS) { - reMap = map[string]*v1alpha1.ResourceEditor{} - - if err := iofs.WalkDir(fsys, ".", func(path string, d iofs.DirEntry, err error) error { - if d.IsDir() || err != nil { - return errors.Wrap(err, path) - } - ext := filepath.Ext(d.Name()) - if ext != ".yaml" && ext != ".yml" && ext != ".json" { - return nil - } - - data, err := iofs.ReadFile(fsys, path) - if err != nil { - return errors.Wrap(err, path) - } - var obj v1alpha1.ResourceEditor - err = yaml.Unmarshal(data, &obj) - if err != nil { - return errors.Wrap(err, path) - } - reMap[obj.Name] = &obj - - return nil - }); err != nil { - panic(errors.Wrapf(err, "failed to load %s", reflect.TypeOf(v1alpha1.ResourceEditor{}))) - } - }, - ) -) - -func init() { - loader.ReloadIfTriggered() -} - -func EmbeddedFS() iofs.FS { - return fs -} - -func DefaultEditorName(gvr schema.GroupVersionResource) string { - if gvr.Group == "" && gvr.Version == "v1" { - return fmt.Sprintf("core-v1-%s", gvr.Resource) - } - return fmt.Sprintf("%s-%s-%s", gvr.Group, gvr.Version, gvr.Resource) -} - -func LoadByName(name string) (*v1alpha1.ResourceEditor, error) { - m.Lock() - defer m.Unlock() - loader.ReloadIfTriggered() - - if obj, ok := reMap[name]; ok { - return obj, nil - } - return nil, apierrors.NewNotFound(v1alpha1.Resource(v1alpha1.ResourceKindResourceEditor), name) -} - -func LoadDefaultByGVR(gvr schema.GroupVersionResource) (*v1alpha1.ResourceEditor, bool) { - m.Lock() - defer m.Unlock() - loader.ReloadIfTriggered() - - name := DefaultEditorName(gvr) - obj, ok := reMap[name] - return obj, ok -} - -func LoadByGVR(kc client.Client, gvr schema.GroupVersionResource) (*v1alpha1.ResourceEditor, bool) { - var ed v1alpha1.ResourceEditor - err := kc.Get(context.TODO(), client.ObjectKey{Name: DefaultEditorName(gvr)}, &ed) - if err == nil { - d, _ := LoadDefaultByGVR(gvr) - return merge(&ed, d), true - } else if !meta.IsNoMatchError(err) && !apierrors.IsNotFound(err) { - klog.V(3).ErrorS(err, fmt.Sprintf("failed to load resource editor for %+v", gvr)) - } - return LoadDefaultByGVR(gvr) -} - -func merge(in, d *v1alpha1.ResourceEditor) *v1alpha1.ResourceEditor { - if d == nil { - return in - } - - in.Labels = d.Labels - in.Spec.Resource = d.Spec.Resource - - if d.Spec.UI != nil { - if in.Spec.UI == nil { - in.Spec.UI = &v1alpha1.UIParameters{ - Actions: d.Spec.UI.Actions, - InstanceLabelPaths: d.Spec.UI.InstanceLabelPaths, - } - } - - if d.Spec.UI.Options != nil && in.Spec.UI.Options == nil { - in.Spec.UI.Options = d.Spec.UI.Options - } - if d.Spec.UI.Editor != nil && in.Spec.UI.Editor == nil { - in.Spec.UI.Editor = d.Spec.UI.Editor - } - } - - if len(in.Spec.Icons) == 0 { - in.Spec.Icons = d.Spec.Icons - } - if in.Spec.Installer == nil { - in.Spec.Installer = d.Spec.Installer - } - return in -} - -func LoadByResourceID(kc client.Client, rid *kmapi.ResourceID) (*v1alpha1.ResourceEditor, bool) { - if rid == nil { - return nil, false - } - - gvr := rid.GroupVersionResource() - if gvr.Version == "" || gvr.Resource == "" { - id, err := kmapi.ExtractResourceID(kc.RESTMapper(), *rid) - if err != nil { - klog.V(3).InfoS(fmt.Sprintf("failed to extract resource id for %+v", *rid)) - return nil, false - } - gvr = id.GroupVersionResource() - } - return LoadByGVR(kc, gvr) -} - -func List() []v1alpha1.ResourceEditor { - m.Lock() - defer m.Unlock() - loader.ReloadIfTriggered() - - out := make([]v1alpha1.ResourceEditor, 0, len(reMap)) - for _, rl := range reMap { - out = append(out, *rl) - } - sort.Slice(out, func(i, j int) bool { - return out[i].Name < out[j].Name - }) - return out -} - -func Names() []string { - m.Lock() - defer m.Unlock() - loader.ReloadIfTriggered() - - out := make([]string, 0, len(reMap)) - for name := range reMap { - out = append(out, name) - } - sort.Strings(out) - return out -} diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/management.k8s.appscode.com/v1alpha1/projectquotas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/management.k8s.appscode.com/v1alpha1/projectquotas.yaml deleted file mode 100644 index 5afc5825..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/management.k8s.appscode.com/v1alpha1/projectquotas.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: management.k8s.appscode.com - k8s.io/kind: ProjectQuota - k8s.io/resource: projectquotas - k8s.io/version: v1alpha1 - name: management.k8s.appscode.com-v1alpha1-projectquotas -spec: - resource: - group: management.k8s.appscode.com - kind: ProjectQuota - name: projectquotas - scope: Cluster - version: v1alpha1 - ui: - editor: - name: managementk8sappscodecom-projectquota-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/match.gatekeeper.sh/match/matchcrd.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/match.gatekeeper.sh/match/matchcrd.yaml deleted file mode 100644 index 0f189f34..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/match.gatekeeper.sh/match/matchcrd.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: match.gatekeeper.sh - k8s.io/kind: DummyCRD - k8s.io/resource: matchcrd - k8s.io/version: match - name: match.gatekeeper.sh-match-matchcrd -spec: - resource: - group: match.gatekeeper.sh - kind: DummyCRD - name: matchcrd - scope: Namespaced - version: match - ui: - editor: - name: matchgatekeepersh-dummycrd-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/acls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/acls.yaml deleted file mode 100644 index 97547305..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/acls.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: memorydb.aws.kubedb.com - k8s.io/kind: ACL - k8s.io/resource: acls - k8s.io/version: v1alpha1 - name: memorydb.aws.kubedb.com-v1alpha1-acls -spec: - resource: - group: memorydb.aws.kubedb.com - kind: ACL - name: acls - scope: Cluster - version: v1alpha1 - ui: - editor: - name: memorydbawskubedbcom-acl-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/clusters.yaml deleted file mode 100644 index 239d2959..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/clusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: memorydb.aws.kubedb.com - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1alpha1 - name: memorydb.aws.kubedb.com-v1alpha1-clusters -spec: - resource: - group: memorydb.aws.kubedb.com - kind: Cluster - name: clusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: memorydbawskubedbcom-cluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/parametergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/parametergroups.yaml deleted file mode 100644 index fa045ac1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/parametergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: memorydb.aws.kubedb.com - k8s.io/kind: ParameterGroup - k8s.io/resource: parametergroups - k8s.io/version: v1alpha1 - name: memorydb.aws.kubedb.com-v1alpha1-parametergroups -spec: - resource: - group: memorydb.aws.kubedb.com - kind: ParameterGroup - name: parametergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: memorydbawskubedbcom-parametergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/snapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/snapshots.yaml deleted file mode 100644 index 10091846..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/snapshots.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: memorydb.aws.kubedb.com - k8s.io/kind: Snapshot - k8s.io/resource: snapshots - k8s.io/version: v1alpha1 - name: memorydb.aws.kubedb.com-v1alpha1-snapshots -spec: - resource: - group: memorydb.aws.kubedb.com - kind: Snapshot - name: snapshots - scope: Cluster - version: v1alpha1 - ui: - editor: - name: memorydbawskubedbcom-snapshot-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/subnetgroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/subnetgroups.yaml deleted file mode 100644 index 07c75a63..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/memorydb.aws.kubedb.com/v1alpha1/subnetgroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: memorydb.aws.kubedb.com - k8s.io/kind: SubnetGroup - k8s.io/resource: subnetgroups - k8s.io/version: v1alpha1 - name: memorydb.aws.kubedb.com-v1alpha1-subnetgroups -spec: - resource: - group: memorydb.aws.kubedb.com - kind: SubnetGroup - name: subnetgroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: memorydbawskubedbcom-subnetgroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.appscode.com/v1alpha1/resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.appscode.com/v1alpha1/resourcedescriptors.yaml deleted file mode 100644 index 0abecbd9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.appscode.com/v1alpha1/resourcedescriptors.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ResourceEditor - k8s.io/resource: resourcedescriptors - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-resourcedescriptors -spec: - resource: - group: meta.k8s.appscode.com - kind: ResourceEditor - name: resourcedescriptors - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: metaappscodecom-resourcedescriptor-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/clusterstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/clusterstatuses.yaml deleted file mode 100644 index 6c55b679..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/clusterstatuses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ClusterStatus - k8s.io/resource: clusterstatuses - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-clusterstatuses -spec: - resource: - group: meta.k8s.appscode.com - kind: ClusterStatus - name: clusterstatuses - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-clusterstatus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/menuoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/menuoutlines.yaml deleted file mode 100644 index c7a1c826..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/menuoutlines.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: MenuOutline - k8s.io/resource: menuoutlines - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-menuoutlines -spec: - resource: - group: meta.k8s.appscode.com - kind: MenuOutline - name: menuoutlines - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-menuoutline-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/menus.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/menus.yaml deleted file mode 100644 index eeb135d4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/menus.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: Menu - k8s.io/resource: menus - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-menus -spec: - resource: - group: meta.k8s.appscode.com - kind: Menu - name: menus - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-menu-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml deleted file mode 100644 index 59d92bc3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ResourceBlockDefinition - k8s.io/resource: resourceblockdefinitions - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-resourceblockdefinitions -spec: - resource: - group: meta.k8s.appscode.com - kind: ResourceBlockDefinition - name: resourceblockdefinitions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-resourceblockdefinition-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcecalculators.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcecalculators.yaml deleted file mode 100644 index aac66dfd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcecalculators.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ResourceCalculator - k8s.io/resource: resourcecalculators - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-resourcecalculators -spec: - resource: - group: meta.k8s.appscode.com - kind: ResourceCalculator - name: resourcecalculators - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-resourcecalculator-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcedescriptors.yaml deleted file mode 100644 index 11e485f9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcedescriptors.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ResourceEditor - k8s.io/resource: resourcedescriptors - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-resourcedescriptors -spec: - resource: - group: meta.k8s.appscode.com - kind: ResourceEditor - name: resourcedescriptors - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-resourcedescriptor-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcelayouts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcelayouts.yaml deleted file mode 100644 index 2cec6c3b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcelayouts.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ResourceLayout - k8s.io/resource: resourcelayouts - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-resourcelayouts -spec: - resource: - group: meta.k8s.appscode.com - kind: ResourceLayout - name: resourcelayouts - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-resourcelayout-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourceoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourceoutlines.yaml deleted file mode 100644 index 19909fa5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourceoutlines.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ResourceOutline - k8s.io/resource: resourceoutlines - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-resourceoutlines -spec: - resource: - group: meta.k8s.appscode.com - kind: ResourceOutline - name: resourceoutlines - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-resourceoutline-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcetabledefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcetabledefinitions.yaml deleted file mode 100644 index acad5a9f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/resourcetabledefinitions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: meta.k8s.appscode.com - k8s.io/kind: ResourceTableDefinition - k8s.io/resource: resourcetabledefinitions - k8s.io/version: v1alpha1 - name: meta.k8s.appscode.com-v1alpha1-resourcetabledefinitions -spec: - resource: - group: meta.k8s.appscode.com - kind: ResourceTableDefinition - name: resourcetabledefinitions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metak8sappscodecom-resourcetabledefinition-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/metrics.appscode.com/v1alpha1/metricsconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/metrics.appscode.com/v1alpha1/metricsconfigurations.yaml deleted file mode 100644 index 92e8bd96..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/metrics.appscode.com/v1alpha1/metricsconfigurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: metrics.appscode.com - k8s.io/kind: MetricsConfiguration - k8s.io/resource: metricsconfigurations - k8s.io/version: v1alpha1 - name: metrics.appscode.com-v1alpha1-metricsconfigurations -spec: - resource: - group: metrics.appscode.com - kind: MetricsConfiguration - name: metricsconfigurations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: metricsappscodecom-metricsconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/alertmanagers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/alertmanagers.yaml deleted file mode 100644 index 6b063bf9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/alertmanagers.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: Alertmanager - k8s.io/resource: alertmanagers - k8s.io/version: v1 - name: monitoring.coreos.com-v1-alertmanagers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/alertmanagers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/alertmanagers.png - type: image/png - resource: - group: monitoring.coreos.com - kind: Alertmanager - name: alertmanagers - scope: Namespaced - version: v1 - ui: - editor: - name: monitoringcoreoscom-alertmanager-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/podmonitors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/podmonitors.yaml deleted file mode 100644 index 6932dcd7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/podmonitors.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: PodMonitor - k8s.io/resource: podmonitors - k8s.io/version: v1 - name: monitoring.coreos.com-v1-podmonitors -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/podmonitors.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/podmonitors.png - type: image/png - resource: - group: monitoring.coreos.com - kind: PodMonitor - name: podmonitors - scope: Namespaced - version: v1 - ui: - editor: - name: monitoringcoreoscom-podmonitor-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/probes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/probes.yaml deleted file mode 100644 index dfec4b03..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/probes.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: Probe - k8s.io/resource: probes - k8s.io/version: v1 - name: monitoring.coreos.com-v1-probes -spec: - resource: - group: monitoring.coreos.com - kind: Probe - name: probes - scope: Namespaced - version: v1 - ui: - editor: - name: monitoringcoreoscom-probe-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/prometheuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/prometheuses.yaml deleted file mode 100644 index e035133a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/prometheuses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: Prometheus - k8s.io/resource: prometheuses - k8s.io/version: v1 - name: monitoring.coreos.com-v1-prometheuses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/prometheuses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/prometheuses.png - type: image/png - resource: - group: monitoring.coreos.com - kind: Prometheus - name: prometheuses - scope: Namespaced - version: v1 - ui: - editor: - name: monitoringcoreoscom-prometheus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/prometheusrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/prometheusrules.yaml deleted file mode 100644 index e192f201..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/prometheusrules.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: PrometheusRule - k8s.io/resource: prometheusrules - k8s.io/version: v1 - name: monitoring.coreos.com-v1-prometheusrules -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/prometheusrules.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/prometheusrules.png - type: image/png - resource: - group: monitoring.coreos.com - kind: PrometheusRule - name: prometheusrules - scope: Namespaced - version: v1 - ui: - editor: - name: monitoringcoreoscom-prometheusrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/servicemonitors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/servicemonitors.yaml deleted file mode 100644 index f1584e2e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/servicemonitors.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: ServiceMonitor - k8s.io/resource: servicemonitors - k8s.io/version: v1 - name: monitoring.coreos.com-v1-servicemonitors -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/servicemonitors.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/monitoring.coreos.com/servicemonitors.png - type: image/png - resource: - group: monitoring.coreos.com - kind: ServiceMonitor - name: servicemonitors - scope: Namespaced - version: v1 - ui: - editor: - name: monitoringcoreoscom-servicemonitor-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - instanceLabelPaths: - - spec.selector.matchLabels diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/thanosrulers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/thanosrulers.yaml deleted file mode 100644 index c38765c9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1/thanosrulers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: ThanosRuler - k8s.io/resource: thanosrulers - k8s.io/version: v1 - name: monitoring.coreos.com-v1-thanosrulers -spec: - resource: - group: monitoring.coreos.com - kind: ThanosRuler - name: thanosrulers - scope: Namespaced - version: v1 - ui: - editor: - name: monitoringcoreoscom-thanosruler-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/alertmanagerconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/alertmanagerconfigs.yaml deleted file mode 100644 index 5211be00..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/alertmanagerconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: AlertmanagerConfig - k8s.io/resource: alertmanagerconfigs - k8s.io/version: v1alpha1 - name: monitoring.coreos.com-v1alpha1-alertmanagerconfigs -spec: - resource: - group: monitoring.coreos.com - kind: AlertmanagerConfig - name: alertmanagerconfigs - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: monitoringcoreoscom-alertmanagerconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/prometheusagents.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/prometheusagents.yaml deleted file mode 100644 index e8cc7eab..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/prometheusagents.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: PrometheusAgent - k8s.io/resource: prometheusagents - k8s.io/version: v1alpha1 - name: monitoring.coreos.com-v1alpha1-prometheusagents -spec: - resource: - group: monitoring.coreos.com - kind: PrometheusAgent - name: prometheusagents - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: monitoringcoreoscom-prometheusagent-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/scrapeconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/scrapeconfigs.yaml deleted file mode 100644 index 00b346d0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/monitoring.coreos.com/v1alpha1/scrapeconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: monitoring.coreos.com - k8s.io/kind: ScrapeConfig - k8s.io/resource: scrapeconfigs - k8s.io/version: v1alpha1 - name: monitoring.coreos.com-v1alpha1-scrapeconfigs -spec: - resource: - group: monitoring.coreos.com - kind: ScrapeConfig - name: scrapeconfigs - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: monitoringcoreoscom-scrapeconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/assign.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/assign.yaml deleted file mode 100644 index 08cb36e4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/assign.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: Assign - k8s.io/resource: assign - k8s.io/version: v1 - name: mutations.gatekeeper.sh-v1-assign -spec: - resource: - group: mutations.gatekeeper.sh - kind: Assign - name: assign - scope: Cluster - version: v1 - ui: - editor: - name: mutationsgatekeepersh-assign-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/assignmetadata.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/assignmetadata.yaml deleted file mode 100644 index 4bff438b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/assignmetadata.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: AssignMetadata - k8s.io/resource: assignmetadata - k8s.io/version: v1 - name: mutations.gatekeeper.sh-v1-assignmetadata -spec: - resource: - group: mutations.gatekeeper.sh - kind: AssignMetadata - name: assignmetadata - scope: Cluster - version: v1 - ui: - editor: - name: mutationsgatekeepersh-assignmetadata-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/modifyset.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/modifyset.yaml deleted file mode 100644 index 6760df95..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1/modifyset.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: ModifySet - k8s.io/resource: modifyset - k8s.io/version: v1 - name: mutations.gatekeeper.sh-v1-modifyset -spec: - resource: - group: mutations.gatekeeper.sh - kind: ModifySet - name: modifyset - scope: Cluster - version: v1 - ui: - editor: - name: mutationsgatekeepersh-modifyset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assign.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assign.yaml deleted file mode 100644 index b79092f0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assign.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: Assign - k8s.io/resource: assign - k8s.io/version: v1alpha1 - name: mutations.gatekeeper.sh-v1alpha1-assign -spec: - resource: - group: mutations.gatekeeper.sh - kind: Assign - name: assign - scope: Cluster - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assignimage.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assignimage.yaml deleted file mode 100644 index e062f410..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assignimage.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: AssignImage - k8s.io/resource: assignimage - k8s.io/version: v1alpha1 - name: mutations.gatekeeper.sh-v1alpha1-assignimage -spec: - resource: - group: mutations.gatekeeper.sh - kind: AssignImage - name: assignimage - scope: Cluster - version: v1alpha1 - ui: - editor: - name: mutationsgatekeepersh-assignimage-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assignmetadata.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assignmetadata.yaml deleted file mode 100644 index 9f5639c8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/assignmetadata.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: AssignMetadata - k8s.io/resource: assignmetadata - k8s.io/version: v1alpha1 - name: mutations.gatekeeper.sh-v1alpha1-assignmetadata -spec: - resource: - group: mutations.gatekeeper.sh - kind: AssignMetadata - name: assignmetadata - scope: Cluster - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/modifyset.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/modifyset.yaml deleted file mode 100644 index 4b673ff7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1alpha1/modifyset.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: ModifySet - k8s.io/resource: modifyset - k8s.io/version: v1alpha1 - name: mutations.gatekeeper.sh-v1alpha1-modifyset -spec: - resource: - group: mutations.gatekeeper.sh - kind: ModifySet - name: modifyset - scope: Cluster - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/assign.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/assign.yaml deleted file mode 100644 index bc95a0aa..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/assign.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: Assign - k8s.io/resource: assign - k8s.io/version: v1beta1 - name: mutations.gatekeeper.sh-v1beta1-assign -spec: - resource: - group: mutations.gatekeeper.sh - kind: Assign - name: assign - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/assignmetadata.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/assignmetadata.yaml deleted file mode 100644 index cf19ebb0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/assignmetadata.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: AssignMetadata - k8s.io/resource: assignmetadata - k8s.io/version: v1beta1 - name: mutations.gatekeeper.sh-v1beta1-assignmetadata -spec: - resource: - group: mutations.gatekeeper.sh - kind: AssignMetadata - name: assignmetadata - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/modifyset.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/modifyset.yaml deleted file mode 100644 index 468c141a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/mutations.gatekeeper.sh/v1beta1/modifyset.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: mutations.gatekeeper.sh - k8s.io/kind: ModifySet - k8s.io/resource: modifyset - k8s.io/version: v1beta1 - name: mutations.gatekeeper.sh-v1beta1-modifyset -spec: - resource: - group: mutations.gatekeeper.sh - kind: ModifySet - name: modifyset - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/privatednszones.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/privatednszones.yaml deleted file mode 100644 index 82308a9c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/privatednszones.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: PrivateDNSZone - k8s.io/resource: privatednszones - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-privatednszones -spec: - resource: - group: network.azure.kubedb.com - kind: PrivateDNSZone - name: privatednszones - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-privatednszone-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/privatednszonevirtualnetworklinks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/privatednszonevirtualnetworklinks.yaml deleted file mode 100644 index f5afe55a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/privatednszonevirtualnetworklinks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: PrivateDNSZoneVirtualNetworkLink - k8s.io/resource: privatednszonevirtualnetworklinks - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-privatednszonevirtualnetworklinks -spec: - resource: - group: network.azure.kubedb.com - kind: PrivateDNSZoneVirtualNetworkLink - name: privatednszonevirtualnetworklinks - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-privatednszonevirtualnetworklink-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/routetables.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/routetables.yaml deleted file mode 100644 index c75b649f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/routetables.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: RouteTable - k8s.io/resource: routetables - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-routetables -spec: - resource: - group: network.azure.kubedb.com - kind: RouteTable - name: routetables - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-routetable-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/securitygroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/securitygroups.yaml deleted file mode 100644 index 8e7f32ac..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/securitygroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: SecurityGroup - k8s.io/resource: securitygroups - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-securitygroups -spec: - resource: - group: network.azure.kubedb.com - kind: SecurityGroup - name: securitygroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-securitygroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnetnetworksecuritygroupassociations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnetnetworksecuritygroupassociations.yaml deleted file mode 100644 index 5439dfeb..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnetnetworksecuritygroupassociations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: SubnetNetworkSecurityGroupAssociation - k8s.io/resource: subnetnetworksecuritygroupassociations - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-subnetnetworksecuritygroupassociations -spec: - resource: - group: network.azure.kubedb.com - kind: SubnetNetworkSecurityGroupAssociation - name: subnetnetworksecuritygroupassociations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-subnetnetworksecuritygroupassociation-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnetroutetableassociations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnetroutetableassociations.yaml deleted file mode 100644 index 7d29c40f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnetroutetableassociations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: SubnetRouteTableAssociation - k8s.io/resource: subnetroutetableassociations - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-subnetroutetableassociations -spec: - resource: - group: network.azure.kubedb.com - kind: SubnetRouteTableAssociation - name: subnetroutetableassociations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-subnetroutetableassociation-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnets.yaml deleted file mode 100644 index b0ad69f7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/subnets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: Subnet - k8s.io/resource: subnets - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-subnets -spec: - resource: - group: network.azure.kubedb.com - kind: Subnet - name: subnets - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-subnet-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/virtualnetworkpeerings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/virtualnetworkpeerings.yaml deleted file mode 100644 index 746b0474..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/virtualnetworkpeerings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: VirtualNetworkPeering - k8s.io/resource: virtualnetworkpeerings - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-virtualnetworkpeerings -spec: - resource: - group: network.azure.kubedb.com - kind: VirtualNetworkPeering - name: virtualnetworkpeerings - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-virtualnetworkpeering-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/virtualnetworks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/virtualnetworks.yaml deleted file mode 100644 index 4c91c699..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/network.azure.kubedb.com/v1alpha1/virtualnetworks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: network.azure.kubedb.com - k8s.io/kind: VirtualNetwork - k8s.io/resource: virtualnetworks - k8s.io/version: v1alpha1 - name: network.azure.kubedb.com-v1alpha1-virtualnetworks -spec: - resource: - group: network.azure.kubedb.com - kind: VirtualNetwork - name: virtualnetworks - scope: Cluster - version: v1alpha1 - ui: - editor: - name: networkazurekubedbcom-virtualnetwork-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/ingressclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/ingressclasses.yaml deleted file mode 100644 index ee312a99..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/ingressclasses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: networking.k8s.io - k8s.io/kind: IngressClass - k8s.io/resource: ingressclasses - k8s.io/version: v1 - name: networking.k8s.io-v1-ingressclasses -spec: - resource: - group: networking.k8s.io - kind: IngressClass - name: ingressclasses - scope: Namespaced - version: v1 - ui: - editor: - name: networkingk8sio-ingressclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/ingresses.yaml deleted file mode 100644 index aa2b01a9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/ingresses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: networking.k8s.io - k8s.io/kind: Ingress - k8s.io/resource: ingresses - k8s.io/version: v1 - name: networking.k8s.io-v1-ingresses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/networking.k8s.io/ingresses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/networking.k8s.io/ingresses.png - type: image/png - resource: - group: networking.k8s.io - kind: Ingress - name: ingresses - scope: Namespaced - version: v1 - ui: - editor: - name: networkingk8sio-ingress-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/networkpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/networkpolicies.yaml deleted file mode 100644 index 854f4dca..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1/networkpolicies.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: networking.k8s.io - k8s.io/kind: NetworkPolicy - k8s.io/resource: networkpolicies - k8s.io/version: v1 - name: networking.k8s.io-v1-networkpolicies -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/networking.k8s.io/networkpolicies.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/networking.k8s.io/networkpolicies.png - type: image/png - resource: - group: networking.k8s.io - kind: NetworkPolicy - name: networkpolicies - scope: Namespaced - version: v1 - ui: - editor: - name: networkingk8sio-networkpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1beta1/ingressclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1beta1/ingressclasses.yaml deleted file mode 100644 index 9a0eb04f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1beta1/ingressclasses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: networking.k8s.io - k8s.io/kind: IngressClass - k8s.io/resource: ingressclasses - k8s.io/version: v1beta1 - name: networking.k8s.io-v1beta1-ingressclasses -spec: - resource: - group: networking.k8s.io - kind: IngressClass - name: ingressclasses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: networkingk8sio-ingressclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1beta1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1beta1/ingresses.yaml deleted file mode 100644 index a2e42244..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/networking.k8s.io/v1beta1/ingresses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: networking.k8s.io - k8s.io/kind: Ingress - k8s.io/resource: ingresses - k8s.io/version: v1beta1 - name: networking.k8s.io-v1beta1-ingresses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/networking.k8s.io/ingresses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/networking.k8s.io/ingresses.png - type: image/png - resource: - group: networking.k8s.io - kind: Ingress - name: ingresses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: networkingk8sio-ingress-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.appscode.com/v1alpha1/nodetopologies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.appscode.com/v1alpha1/nodetopologies.yaml deleted file mode 100644 index 4cc60b0d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.appscode.com/v1alpha1/nodetopologies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: node.k8s.appscode.com - k8s.io/kind: NodeTopology - k8s.io/resource: nodetopologies - k8s.io/version: v1alpha1 - name: node.k8s.appscode.com-v1alpha1-nodetopologies -spec: - resource: - group: node.k8s.appscode.com - kind: NodeTopology - name: nodetopologies - scope: Cluster - version: v1alpha1 - ui: - editor: - name: nodek8sappscodecom-nodetopology-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1/runtimeclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1/runtimeclasses.yaml deleted file mode 100644 index 48e33a2a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1/runtimeclasses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: node.k8s.io - k8s.io/kind: RuntimeClass - k8s.io/resource: runtimeclasses - k8s.io/version: v1 - name: node.k8s.io-v1-runtimeclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/node.k8s.io/runtimeclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/node.k8s.io/runtimeclasses.png - type: image/png - resource: - group: node.k8s.io - kind: RuntimeClass - name: runtimeclasses - scope: Namespaced - version: v1 - ui: - editor: - name: nodek8sio-runtimeclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1alpha1/runtimeclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1alpha1/runtimeclasses.yaml deleted file mode 100644 index 2618a55c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1alpha1/runtimeclasses.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: node.k8s.io - k8s.io/kind: RuntimeClass - k8s.io/resource: runtimeclasses - k8s.io/version: v1alpha1 - name: node.k8s.io-v1alpha1-runtimeclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/node.k8s.io/runtimeclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/node.k8s.io/runtimeclasses.png - type: image/png - resource: - group: node.k8s.io - kind: RuntimeClass - name: runtimeclasses - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1beta1/runtimeclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1beta1/runtimeclasses.yaml deleted file mode 100644 index bce72a1e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/node.k8s.io/v1beta1/runtimeclasses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: node.k8s.io - k8s.io/kind: RuntimeClass - k8s.io/resource: runtimeclasses - k8s.io/version: v1beta1 - name: node.k8s.io-v1beta1-runtimeclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/node.k8s.io/runtimeclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/node.k8s.io/runtimeclasses.png - type: image/png - resource: - group: node.k8s.io - kind: RuntimeClass - name: runtimeclasses - scope: Cluster - version: v1beta1 - ui: - editor: - name: nodek8sio-runtimeclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1/receivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1/receivers.yaml deleted file mode 100644 index f859e353..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1/receivers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Receiver - k8s.io/resource: receivers - k8s.io/version: v1 - name: notification.toolkit.fluxcd.io-v1-receivers -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Receiver - name: receivers - scope: Namespaced - version: v1 - ui: - editor: - name: notificationtoolkitfluxcdio-receiver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/alerts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/alerts.yaml deleted file mode 100644 index f239981d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/alerts.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Alert - k8s.io/resource: alerts - k8s.io/version: v1beta1 - name: notification.toolkit.fluxcd.io-v1beta1-alerts -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Alert - name: alerts - scope: Namespaced - version: v1beta1 - ui: - editor: - name: notificationtoolkitfluxcdio-alert-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/providers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/providers.yaml deleted file mode 100644 index 40ae9abb..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/providers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Provider - k8s.io/resource: providers - k8s.io/version: v1beta1 - name: notification.toolkit.fluxcd.io-v1beta1-providers -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Provider - name: providers - scope: Namespaced - version: v1beta1 - ui: - editor: - name: notificationtoolkitfluxcdio-provider-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/receivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/receivers.yaml deleted file mode 100644 index 6bf1989a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta1/receivers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Receiver - k8s.io/resource: receivers - k8s.io/version: v1beta1 - name: notification.toolkit.fluxcd.io-v1beta1-receivers -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Receiver - name: receivers - scope: Namespaced - version: v1beta1 - ui: - editor: - name: notificationtoolkitfluxcdio-receiver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/alerts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/alerts.yaml deleted file mode 100644 index 94fd0b13..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/alerts.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Alert - k8s.io/resource: alerts - k8s.io/version: v1beta2 - name: notification.toolkit.fluxcd.io-v1beta2-alerts -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Alert - name: alerts - scope: Namespaced - version: v1beta2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/providers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/providers.yaml deleted file mode 100644 index b83ee2df..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/providers.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Provider - k8s.io/resource: providers - k8s.io/version: v1beta2 - name: notification.toolkit.fluxcd.io-v1beta2-providers -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Provider - name: providers - scope: Namespaced - version: v1beta2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/receivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/receivers.yaml deleted file mode 100644 index 5788a950..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta2/receivers.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Receiver - k8s.io/resource: receivers - k8s.io/version: v1beta2 - name: notification.toolkit.fluxcd.io-v1beta2-receivers -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Receiver - name: receivers - scope: Namespaced - version: v1beta2 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta3/alerts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta3/alerts.yaml deleted file mode 100644 index 974ceefc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta3/alerts.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Alert - k8s.io/resource: alerts - k8s.io/version: v1beta3 - name: notification.toolkit.fluxcd.io-v1beta3-alerts -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Alert - name: alerts - scope: Namespaced - version: v1beta3 - ui: - editor: - name: notificationtoolkitfluxcdio-alert-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta3/providers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta3/providers.yaml deleted file mode 100644 index 26b6df11..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/notification.toolkit.fluxcd.io/v1beta3/providers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: notification.toolkit.fluxcd.io - k8s.io/kind: Provider - k8s.io/resource: providers - k8s.io/version: v1beta3 - name: notification.toolkit.fluxcd.io-v1beta3-providers -spec: - resource: - group: notification.toolkit.fluxcd.io - kind: Provider - name: providers - scope: Namespaced - version: v1beta3 - ui: - editor: - name: notificationtoolkitfluxcdio-provider-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/dashboards.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/dashboards.yaml deleted file mode 100644 index b7bd2cbd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/dashboards.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: openviz.dev - k8s.io/kind: Dashboard - k8s.io/resource: dashboards - k8s.io/version: v1alpha1 - name: openviz.dev-v1alpha1-dashboards -spec: - resource: - group: openviz.dev - kind: Dashboard - name: dashboards - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/dashboardtemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/dashboardtemplates.yaml deleted file mode 100644 index 893e0473..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/dashboardtemplates.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: openviz.dev - k8s.io/kind: DashboardTemplate - k8s.io/resource: dashboardtemplates - k8s.io/version: v1alpha1 - name: openviz.dev-v1alpha1-dashboardtemplates -spec: - resource: - group: openviz.dev - kind: DashboardTemplate - name: dashboardtemplates - scope: Cluster - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/datasources.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/datasources.yaml deleted file mode 100644 index 35eae9ff..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/datasources.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: openviz.dev - k8s.io/kind: Datasource - k8s.io/resource: datasources - k8s.io/version: v1alpha1 - name: openviz.dev-v1alpha1-datasources -spec: - resource: - group: openviz.dev - kind: Datasource - name: datasources - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadashboards.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadashboards.yaml deleted file mode 100644 index 34ebca0a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadashboards.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: openviz.dev - k8s.io/kind: GrafanaDashboard - k8s.io/resource: grafanadashboards - k8s.io/version: v1alpha1 - name: openviz.dev-v1alpha1-grafanadashboards -spec: - resource: - group: openviz.dev - kind: GrafanaDashboard - name: grafanadashboards - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: openvizdev-grafanadashboard-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadashboardtemplates.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadashboardtemplates.yaml deleted file mode 100644 index d9e66ed1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadashboardtemplates.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: openviz.dev - k8s.io/kind: GrafanaDashboardTemplate - k8s.io/resource: grafanadashboardtemplates - k8s.io/version: v1alpha1 - name: openviz.dev-v1alpha1-grafanadashboardtemplates -spec: - resource: - group: openviz.dev - kind: GrafanaDashboardTemplate - name: grafanadashboardtemplates - scope: Cluster - version: v1alpha1 - ui: - editor: - name: openvizdev-grafanadashboardtemplate-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadatasources.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadatasources.yaml deleted file mode 100644 index 85d4b510..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/openviz.dev/v1alpha1/grafanadatasources.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: openviz.dev - k8s.io/kind: GrafanaDatasource - k8s.io/resource: grafanadatasources - k8s.io/version: v1alpha1 - name: openviz.dev-v1alpha1-grafanadatasources -spec: - resource: - group: openviz.dev - kind: GrafanaDatasource - name: grafanadatasources - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: openvizdev-grafanadatasource-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/operator.open-cluster-management.io/v1/clustermanagers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/operator.open-cluster-management.io/v1/clustermanagers.yaml deleted file mode 100644 index 41cc4565..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/operator.open-cluster-management.io/v1/clustermanagers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: operator.open-cluster-management.io - k8s.io/kind: ClusterManager - k8s.io/resource: clustermanagers - k8s.io/version: v1 - name: operator.open-cluster-management.io-v1-clustermanagers -spec: - resource: - group: operator.open-cluster-management.io - kind: ClusterManager - name: clustermanagers - scope: Cluster - version: v1 - ui: - editor: - name: operatoropenclustermanagementio-clustermanager-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/operator.open-cluster-management.io/v1/klusterlets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/operator.open-cluster-management.io/v1/klusterlets.yaml deleted file mode 100644 index 356e3095..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/operator.open-cluster-management.io/v1/klusterlets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: operator.open-cluster-management.io - k8s.io/kind: Klusterlet - k8s.io/resource: klusterlets - k8s.io/version: v1 - name: operator.open-cluster-management.io-v1-klusterlets -spec: - resource: - group: operator.open-cluster-management.io - kind: Klusterlet - name: klusterlets - scope: Cluster - version: v1 - ui: - editor: - name: operatoropenclustermanagementio-klusterlet-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/elasticsearchopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/elasticsearchopsrequests.yaml deleted file mode 100644 index 7fe32f4e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/elasticsearchopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: ElasticsearchOpsRequest - k8s.io/resource: elasticsearchopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-elasticsearchopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/elasticsearchopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/elasticsearchopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: ElasticsearchOpsRequest - name: elasticsearchopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-elasticsearchopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/etcdopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/etcdopsrequests.yaml deleted file mode 100644 index f2638da9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/etcdopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: EtcdOpsRequest - k8s.io/resource: etcdopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-etcdopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/etcdopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/etcdopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: EtcdOpsRequest - name: etcdopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-etcdopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/kafkaopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/kafkaopsrequests.yaml deleted file mode 100644 index 227f0876..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/kafkaopsrequests.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: KafkaOpsRequest - k8s.io/resource: kafkaopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-kafkaopsrequests -spec: - resource: - group: ops.kubedb.com - kind: KafkaOpsRequest - name: kafkaopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-kafkaopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mariadbopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mariadbopsrequests.yaml deleted file mode 100644 index 06d72a78..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mariadbopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: MariaDBOpsRequest - k8s.io/resource: mariadbopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-mariadbopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/mariadbopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/mariadbopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: MariaDBOpsRequest - name: mariadbopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-mariadbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/memcachedopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/memcachedopsrequests.yaml deleted file mode 100644 index e7e8e293..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/memcachedopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: MemcachedOpsRequest - k8s.io/resource: memcachedopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-memcachedopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/memcachedopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/memcachedopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: MemcachedOpsRequest - name: memcachedopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-memcachedopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mongodbopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mongodbopsrequests.yaml deleted file mode 100644 index ed3e7b50..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mongodbopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: MongoDBOpsRequest - k8s.io/resource: mongodbopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-mongodbopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/mongodbopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/mongodbopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: MongoDBOpsRequest - name: mongodbopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-mongodbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mysqlopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mysqlopsrequests.yaml deleted file mode 100644 index c40e7ab2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/mysqlopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: MySQLOpsRequest - k8s.io/resource: mysqlopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-mysqlopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/mysqlopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/mysqlopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: MySQLOpsRequest - name: mysqlopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-mysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/perconaxtradbopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/perconaxtradbopsrequests.yaml deleted file mode 100644 index a5599f07..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/perconaxtradbopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: PerconaXtraDBOpsRequest - k8s.io/resource: perconaxtradbopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-perconaxtradbopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/perconaxtradbopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/perconaxtradbopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: PerconaXtraDBOpsRequest - name: perconaxtradbopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-perconaxtradbopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/pgbounceropsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/pgbounceropsrequests.yaml deleted file mode 100644 index c7cbcbbf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/pgbounceropsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: PgBouncerOpsRequest - k8s.io/resource: pgbounceropsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-pgbounceropsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/pgbounceropsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/pgbounceropsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: PgBouncerOpsRequest - name: pgbounceropsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-pgbounceropsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/postgresopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/postgresopsrequests.yaml deleted file mode 100644 index d553dc1e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/postgresopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: PostgresOpsRequest - k8s.io/resource: postgresopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-postgresopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/postgresopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/postgresopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: PostgresOpsRequest - name: postgresopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-postgresopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/proxysqlopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/proxysqlopsrequests.yaml deleted file mode 100644 index f25d359e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/proxysqlopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: ProxySQLOpsRequest - k8s.io/resource: proxysqlopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-proxysqlopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/proxysqlopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/proxysqlopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: ProxySQLOpsRequest - name: proxysqlopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-proxysqlopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/redisopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/redisopsrequests.yaml deleted file mode 100644 index f9a9bade..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/redisopsrequests.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: RedisOpsRequest - k8s.io/resource: redisopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-redisopsrequests -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/redisopsrequests.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/ops.kubedb.com/redisopsrequests.png - type: image/png - resource: - group: ops.kubedb.com - kind: RedisOpsRequest - name: redisopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-redisopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/redissentinelopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/redissentinelopsrequests.yaml deleted file mode 100644 index f5d6f7f0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubedb.com/v1alpha1/redissentinelopsrequests.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubedb.com - k8s.io/kind: RedisSentinelOpsRequest - k8s.io/resource: redissentinelopsrequests - k8s.io/version: v1alpha1 - name: ops.kubedb.com-v1alpha1-redissentinelopsrequests -spec: - resource: - group: ops.kubedb.com - kind: RedisSentinelOpsRequest - name: redissentinelopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubedbcom-redissentinelopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubevault.com/v1alpha1/vaultopsrequests.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubevault.com/v1alpha1/vaultopsrequests.yaml deleted file mode 100644 index f140e3db..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ops.kubevault.com/v1alpha1/vaultopsrequests.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ops.kubevault.com - k8s.io/kind: VaultOpsRequest - k8s.io/resource: vaultopsrequests - k8s.io/version: v1alpha1 - name: ops.kubevault.com-v1alpha1-vaultopsrequests -spec: - resource: - group: ops.kubevault.com - kind: VaultOpsRequest - name: vaultopsrequests - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: opskubevaultcom-vaultopsrequest-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/configurationrevisions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/configurationrevisions.yaml deleted file mode 100644 index 3c953b01..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/configurationrevisions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: pkg.crossplane.io - k8s.io/kind: ConfigurationRevision - k8s.io/resource: configurationrevisions - k8s.io/version: v1 - name: pkg.crossplane.io-v1-configurationrevisions -spec: - resource: - group: pkg.crossplane.io - kind: ConfigurationRevision - name: configurationrevisions - scope: Cluster - version: v1 - ui: - editor: - name: pkgcrossplaneio-configurationrevision-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/configurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/configurations.yaml deleted file mode 100644 index 182a12a2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/configurations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: pkg.crossplane.io - k8s.io/kind: Configuration - k8s.io/resource: configurations - k8s.io/version: v1 - name: pkg.crossplane.io-v1-configurations -spec: - resource: - group: pkg.crossplane.io - kind: Configuration - name: configurations - scope: Cluster - version: v1 - ui: - editor: - name: pkgcrossplaneio-configuration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/providerrevisions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/providerrevisions.yaml deleted file mode 100644 index ad528761..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/providerrevisions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: pkg.crossplane.io - k8s.io/kind: ProviderRevision - k8s.io/resource: providerrevisions - k8s.io/version: v1 - name: pkg.crossplane.io-v1-providerrevisions -spec: - resource: - group: pkg.crossplane.io - kind: ProviderRevision - name: providerrevisions - scope: Cluster - version: v1 - ui: - editor: - name: pkgcrossplaneio-providerrevision-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/providers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/providers.yaml deleted file mode 100644 index 90774eea..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1/providers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: pkg.crossplane.io - k8s.io/kind: Provider - k8s.io/resource: providers - k8s.io/version: v1 - name: pkg.crossplane.io-v1-providers -spec: - resource: - group: pkg.crossplane.io - kind: Provider - name: providers - scope: Cluster - version: v1 - ui: - editor: - name: pkgcrossplaneio-provider-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1alpha1/controllerconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1alpha1/controllerconfigs.yaml deleted file mode 100644 index c00fed28..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1alpha1/controllerconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: pkg.crossplane.io - k8s.io/kind: ControllerConfig - k8s.io/resource: controllerconfigs - k8s.io/version: v1alpha1 - name: pkg.crossplane.io-v1alpha1-controllerconfigs -spec: - resource: - group: pkg.crossplane.io - kind: ControllerConfig - name: controllerconfigs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: pkgcrossplaneio-controllerconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1beta1/locks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1beta1/locks.yaml deleted file mode 100644 index 32cdd449..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/pkg.crossplane.io/v1beta1/locks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: pkg.crossplane.io - k8s.io/kind: Lock - k8s.io/resource: locks - k8s.io/version: v1beta1 - name: pkg.crossplane.io-v1beta1-locks -spec: - resource: - group: pkg.crossplane.io - kind: Lock - name: locks - scope: Cluster - version: v1beta1 - ui: - editor: - name: pkgcrossplaneio-lock-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy.kubevault.com/v1alpha1/vaultpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy.kubevault.com/v1alpha1/vaultpolicies.yaml deleted file mode 100644 index 3f45f536..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy.kubevault.com/v1alpha1/vaultpolicies.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: policy.kubevault.com - k8s.io/kind: VaultPolicy - k8s.io/resource: vaultpolicies - k8s.io/version: v1alpha1 - name: policy.kubevault.com-v1alpha1-vaultpolicies -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/policy.kubevault.com/vaultpolicies.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/policy.kubevault.com/vaultpolicies.png - type: image/png - resource: - group: policy.kubevault.com - kind: VaultPolicy - name: vaultpolicies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: policykubevaultcom-vaultpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy.kubevault.com/v1alpha1/vaultpolicybindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy.kubevault.com/v1alpha1/vaultpolicybindings.yaml deleted file mode 100644 index cf5eec78..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy.kubevault.com/v1alpha1/vaultpolicybindings.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: policy.kubevault.com - k8s.io/kind: VaultPolicyBinding - k8s.io/resource: vaultpolicybindings - k8s.io/version: v1alpha1 - name: policy.kubevault.com-v1alpha1-vaultpolicybindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/policy.kubevault.com/vaultpolicybindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/policy.kubevault.com/vaultpolicybindings.png - type: image/png - resource: - group: policy.kubevault.com - kind: VaultPolicyBinding - name: vaultpolicybindings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: policykubevaultcom-vaultpolicybinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/evictions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/evictions.yaml deleted file mode 100644 index b9a74a53..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/evictions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: policy - k8s.io/kind: Eviction - k8s.io/resource: evictions - k8s.io/version: v1beta1 - name: policy-v1beta1-evictions -spec: - resource: - group: policy - kind: Eviction - name: evictions - scope: Namespaced - version: v1beta1 - ui: - editor: - name: policy-eviction-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/poddisruptionbudgets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/poddisruptionbudgets.yaml deleted file mode 100644 index c4e2f065..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/poddisruptionbudgets.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: policy - k8s.io/kind: PodDisruptionBudget - k8s.io/resource: poddisruptionbudgets - k8s.io/version: v1beta1 - name: policy-v1beta1-poddisruptionbudgets -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/policy/poddisruptionbudgets.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/policy/poddisruptionbudgets.png - type: image/png - resource: - group: policy - kind: PodDisruptionBudget - name: poddisruptionbudgets - scope: Namespaced - version: v1beta1 - ui: - editor: - name: policy-poddisruptionbudget-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/podsecuritypolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/podsecuritypolicies.yaml deleted file mode 100644 index fbbd5df4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/policy/v1beta1/podsecuritypolicies.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: policy - k8s.io/kind: PodSecurityPolicy - k8s.io/resource: podsecuritypolicies - k8s.io/version: v1beta1 - name: policy-v1beta1-podsecuritypolicies -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/policy/podsecuritypolicies.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/policy/podsecuritypolicies.png - type: image/png - resource: - group: policy - kind: PodSecurityPolicy - name: podsecuritypolicies - scope: Cluster - version: v1beta1 - ui: - editor: - name: policy-podsecuritypolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/postgres.kubedb.com/v1alpha1/publishers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/postgres.kubedb.com/v1alpha1/publishers.yaml deleted file mode 100644 index 3ed4b19f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/postgres.kubedb.com/v1alpha1/publishers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: postgres.kubedb.com - k8s.io/kind: Publisher - k8s.io/resource: publishers - k8s.io/version: v1alpha1 - name: postgres.kubedb.com-v1alpha1-publishers -spec: - resource: - group: postgres.kubedb.com - kind: Publisher - name: publishers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: postgreskubedbcom-publisher-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/postgres.kubedb.com/v1alpha1/subscribers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/postgres.kubedb.com/v1alpha1/subscribers.yaml deleted file mode 100644 index bcca9ffc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/postgres.kubedb.com/v1alpha1/subscribers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: postgres.kubedb.com - k8s.io/kind: Subscriber - k8s.io/resource: subscribers - k8s.io/version: v1alpha1 - name: postgres.kubedb.com-v1alpha1-subscribers -spec: - resource: - group: postgres.kubedb.com - kind: Subscriber - name: subscribers - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: postgreskubedbcom-subscriber-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/products.x-helm.dev/v1alpha1/plans.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/products.x-helm.dev/v1alpha1/plans.yaml deleted file mode 100644 index 0dc314b9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/products.x-helm.dev/v1alpha1/plans.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: products.x-helm.dev - k8s.io/kind: Plan - k8s.io/resource: plans - k8s.io/version: v1alpha1 - name: products.x-helm.dev-v1alpha1-plans -spec: - resource: - group: products.x-helm.dev - kind: Plan - name: plans - scope: Cluster - version: v1alpha1 - ui: - editor: - name: productsxhelmdev-plan-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/products.x-helm.dev/v1alpha1/products.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/products.x-helm.dev/v1alpha1/products.yaml deleted file mode 100644 index f54c3c83..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/products.x-helm.dev/v1alpha1/products.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: products.x-helm.dev - k8s.io/kind: Product - k8s.io/resource: products - k8s.io/version: v1alpha1 - name: products.x-helm.dev-v1alpha1-products -spec: - resource: - group: products.x-helm.dev - kind: Product - name: products - scope: Cluster - version: v1alpha1 - ui: - editor: - name: productsxhelmdev-product-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/clusterrolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/clusterrolebindings.yaml deleted file mode 100644 index 3edbd8db..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/clusterrolebindings.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: ClusterRoleBinding - k8s.io/resource: clusterrolebindings - k8s.io/version: v1 - name: rbac.authorization.k8s.io-v1-clusterrolebindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterrolebindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterrolebindings.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: ClusterRoleBinding - name: clusterrolebindings - scope: Cluster - version: v1 - ui: - editor: - name: rbacauthorizationk8sio-clusterrolebinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/clusterroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/clusterroles.yaml deleted file mode 100644 index db772c08..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/clusterroles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: ClusterRole - k8s.io/resource: clusterroles - k8s.io/version: v1 - name: rbac.authorization.k8s.io-v1-clusterroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterroles.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: ClusterRole - name: clusterroles - scope: Cluster - version: v1 - ui: - editor: - name: rbacauthorizationk8sio-clusterrole-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/rolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/rolebindings.yaml deleted file mode 100644 index f1555bd6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/rolebindings.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: RoleBinding - k8s.io/resource: rolebindings - k8s.io/version: v1 - name: rbac.authorization.k8s.io-v1-rolebindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/rolebindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/rolebindings.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: RoleBinding - name: rolebindings - scope: Namespaced - version: v1 - ui: - editor: - name: rbacauthorizationk8sio-rolebinding-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/roles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/roles.yaml deleted file mode 100644 index 4a43dd67..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1/roles.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: Role - k8s.io/resource: roles - k8s.io/version: v1 - name: rbac.authorization.k8s.io-v1-roles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/roles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/roles.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: Role - name: roles - scope: Namespaced - version: v1 - ui: - editor: - name: rbacauthorizationk8sio-role-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings.yaml deleted file mode 100644 index 0fc08aaa..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: ClusterRoleBinding - k8s.io/resource: clusterrolebindings - k8s.io/version: v1alpha1 - name: rbac.authorization.k8s.io-v1alpha1-clusterrolebindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterrolebindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterrolebindings.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: ClusterRoleBinding - name: clusterrolebindings - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/clusterroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/clusterroles.yaml deleted file mode 100644 index d0dd3c19..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/clusterroles.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: ClusterRole - k8s.io/resource: clusterroles - k8s.io/version: v1alpha1 - name: rbac.authorization.k8s.io-v1alpha1-clusterroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterroles.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: ClusterRole - name: clusterroles - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/rolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/rolebindings.yaml deleted file mode 100644 index ab8690e9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/rolebindings.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: RoleBinding - k8s.io/resource: rolebindings - k8s.io/version: v1alpha1 - name: rbac.authorization.k8s.io-v1alpha1-rolebindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/rolebindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/rolebindings.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: RoleBinding - name: rolebindings - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/roles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/roles.yaml deleted file mode 100644 index 85fd65c9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1alpha1/roles.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: Role - k8s.io/resource: roles - k8s.io/version: v1alpha1 - name: rbac.authorization.k8s.io-v1alpha1-roles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/roles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/roles.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: Role - name: roles - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/clusterrolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/clusterrolebindings.yaml deleted file mode 100644 index c8a044d7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/clusterrolebindings.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: ClusterRoleBinding - k8s.io/resource: clusterrolebindings - k8s.io/version: v1beta1 - name: rbac.authorization.k8s.io-v1beta1-clusterrolebindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterrolebindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterrolebindings.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: ClusterRoleBinding - name: clusterrolebindings - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/clusterroles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/clusterroles.yaml deleted file mode 100644 index ff1031f3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/clusterroles.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: ClusterRole - k8s.io/resource: clusterroles - k8s.io/version: v1beta1 - name: rbac.authorization.k8s.io-v1beta1-clusterroles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterroles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/clusterroles.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: ClusterRole - name: clusterroles - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/rolebindings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/rolebindings.yaml deleted file mode 100644 index 9b467023..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/rolebindings.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: RoleBinding - k8s.io/resource: rolebindings - k8s.io/version: v1beta1 - name: rbac.authorization.k8s.io-v1beta1-rolebindings -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/rolebindings.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/rolebindings.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: RoleBinding - name: rolebindings - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/roles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/roles.yaml deleted file mode 100644 index c3572b5c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rbac.authorization.k8s.io/v1beta1/roles.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rbac.authorization.k8s.io - k8s.io/kind: Role - k8s.io/resource: roles - k8s.io/version: v1beta1 - name: rbac.authorization.k8s.io-v1beta1-roles -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/roles.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/rbac.authorization.k8s.io/roles.png - type: image/png - resource: - group: rbac.authorization.k8s.io - kind: Role - name: roles - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusteractivitystreams.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusteractivitystreams.yaml deleted file mode 100644 index 7cde909b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusteractivitystreams.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ClusterActivityStream - k8s.io/resource: clusteractivitystreams - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-clusteractivitystreams -spec: - resource: - group: rds.aws.kubedb.com - kind: ClusterActivityStream - name: clusteractivitystreams - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-clusteractivitystream-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterendpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterendpoints.yaml deleted file mode 100644 index c27c92a8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterendpoints.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ClusterEndpoint - k8s.io/resource: clusterendpoints - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-clusterendpoints -spec: - resource: - group: rds.aws.kubedb.com - kind: ClusterEndpoint - name: clusterendpoints - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-clusterendpoint-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterinstances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterinstances.yaml deleted file mode 100644 index 2b901e82..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterinstances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ClusterInstance - k8s.io/resource: clusterinstances - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-clusterinstances -spec: - resource: - group: rds.aws.kubedb.com - kind: ClusterInstance - name: clusterinstances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-clusterinstance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterparametergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterparametergroups.yaml deleted file mode 100644 index 654a616c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterparametergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ClusterParameterGroup - k8s.io/resource: clusterparametergroups - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-clusterparametergroups -spec: - resource: - group: rds.aws.kubedb.com - kind: ClusterParameterGroup - name: clusterparametergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-clusterparametergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterroleassociations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterroleassociations.yaml deleted file mode 100644 index 2419590b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusterroleassociations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ClusterRoleAssociation - k8s.io/resource: clusterroleassociations - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-clusterroleassociations -spec: - resource: - group: rds.aws.kubedb.com - kind: ClusterRoleAssociation - name: clusterroleassociations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-clusterroleassociation-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusters.yaml deleted file mode 100644 index 4d2c979b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clusters.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: Cluster - k8s.io/resource: clusters - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-clusters -spec: - resource: - group: rds.aws.kubedb.com - kind: Cluster - name: clusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-cluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - variants: - - name: MariaDB - selector: - matchLabels: - rds.aws.kubedb.com/engine: mariadb - - name: MySQL - selector: - matchLabels: - rds.aws.kubedb.com/engine: mysql - - name: PostgreSQL - selector: - matchLabels: - rds.aws.kubedb.com/engine: postgres diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clustersnapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clustersnapshots.yaml deleted file mode 100644 index 4d471b1f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/clustersnapshots.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ClusterSnapshot - k8s.io/resource: clustersnapshots - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-clustersnapshots -spec: - resource: - group: rds.aws.kubedb.com - kind: ClusterSnapshot - name: clustersnapshots - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-clustersnapshot-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/dbinstanceautomatedbackupsreplications.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/dbinstanceautomatedbackupsreplications.yaml deleted file mode 100644 index b0fd43dc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/dbinstanceautomatedbackupsreplications.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: DBInstanceAutomatedBackupsReplication - k8s.io/resource: dbinstanceautomatedbackupsreplications - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-dbinstanceautomatedbackupsreplications -spec: - resource: - group: rds.aws.kubedb.com - kind: DBInstanceAutomatedBackupsReplication - name: dbinstanceautomatedbackupsreplications - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-dbinstanceautomatedbackupsreplication-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/dbsnapshotcopies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/dbsnapshotcopies.yaml deleted file mode 100644 index f7a30eb4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/dbsnapshotcopies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: DBSnapshotCopy - k8s.io/resource: dbsnapshotcopies - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-dbsnapshotcopies -spec: - resource: - group: rds.aws.kubedb.com - kind: DBSnapshotCopy - name: dbsnapshotcopies - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-dbsnapshotcopy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/eventsubscriptions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/eventsubscriptions.yaml deleted file mode 100644 index 8c80b53e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/eventsubscriptions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: EventSubscription - k8s.io/resource: eventsubscriptions - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-eventsubscriptions -spec: - resource: - group: rds.aws.kubedb.com - kind: EventSubscription - name: eventsubscriptions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-eventsubscription-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/globalclusters.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/globalclusters.yaml deleted file mode 100644 index 55e18fa4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/globalclusters.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: GlobalCluster - k8s.io/resource: globalclusters - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-globalclusters -spec: - resource: - group: rds.aws.kubedb.com - kind: GlobalCluster - name: globalclusters - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-globalcluster-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/instanceroleassociations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/instanceroleassociations.yaml deleted file mode 100644 index 5a25bcf0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/instanceroleassociations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: InstanceRoleAssociation - k8s.io/resource: instanceroleassociations - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-instanceroleassociations -spec: - resource: - group: rds.aws.kubedb.com - kind: InstanceRoleAssociation - name: instanceroleassociations - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-instanceroleassociation-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/instances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/instances.yaml deleted file mode 100644 index 749c058c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/instances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: Instance - k8s.io/resource: instances - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-instances -spec: - resource: - group: rds.aws.kubedb.com - kind: Instance - name: instances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-instance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/optiongroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/optiongroups.yaml deleted file mode 100644 index f0bec87a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/optiongroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: OptionGroup - k8s.io/resource: optiongroups - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-optiongroups -spec: - resource: - group: rds.aws.kubedb.com - kind: OptionGroup - name: optiongroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-optiongroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/parametergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/parametergroups.yaml deleted file mode 100644 index abed4111..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/parametergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ParameterGroup - k8s.io/resource: parametergroups - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-parametergroups -spec: - resource: - group: rds.aws.kubedb.com - kind: ParameterGroup - name: parametergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-parametergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxies.yaml deleted file mode 100644 index 65d34582..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: Proxy - k8s.io/resource: proxies - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-proxies -spec: - resource: - group: rds.aws.kubedb.com - kind: Proxy - name: proxies - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-proxy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxydefaulttargetgroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxydefaulttargetgroups.yaml deleted file mode 100644 index d8090680..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxydefaulttargetgroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ProxyDefaultTargetGroup - k8s.io/resource: proxydefaulttargetgroups - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-proxydefaulttargetgroups -spec: - resource: - group: rds.aws.kubedb.com - kind: ProxyDefaultTargetGroup - name: proxydefaulttargetgroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-proxydefaulttargetgroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxyendpoints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxyendpoints.yaml deleted file mode 100644 index 9cc12fb2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxyendpoints.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ProxyEndpoint - k8s.io/resource: proxyendpoints - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-proxyendpoints -spec: - resource: - group: rds.aws.kubedb.com - kind: ProxyEndpoint - name: proxyendpoints - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-proxyendpoint-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxytargets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxytargets.yaml deleted file mode 100644 index 56c7fb89..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/proxytargets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: ProxyTarget - k8s.io/resource: proxytargets - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-proxytargets -spec: - resource: - group: rds.aws.kubedb.com - kind: ProxyTarget - name: proxytargets - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-proxytarget-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/snapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/snapshots.yaml deleted file mode 100644 index c452a167..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/snapshots.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: Snapshot - k8s.io/resource: snapshots - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-snapshots -spec: - resource: - group: rds.aws.kubedb.com - kind: Snapshot - name: snapshots - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-snapshot-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/subnetgroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/subnetgroups.yaml deleted file mode 100644 index 9d82116e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/rds.aws.kubedb.com/v1alpha1/subnetgroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: rds.aws.kubedb.com - k8s.io/kind: SubnetGroup - k8s.io/resource: subnetgroups - k8s.io/version: v1alpha1 - name: rds.aws.kubedb.com-v1alpha1-subnetgroups -spec: - resource: - group: rds.aws.kubedb.com - kind: SubnetGroup - name: subnetgroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: rdsawskubedbcom-subnetgroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/redis.gcp.kubedb.com/v1alpha1/instances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/redis.gcp.kubedb.com/v1alpha1/instances.yaml deleted file mode 100644 index ff4a9ac4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/redis.gcp.kubedb.com/v1alpha1/instances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: redis.gcp.kubedb.com - k8s.io/kind: Instance - k8s.io/resource: instances - k8s.io/version: v1alpha1 - name: redis.gcp.kubedb.com-v1alpha1-instances -spec: - resource: - group: redis.gcp.kubedb.com - kind: Instance - name: instances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: redisgcpkubedbcom-instance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/releases.x-helm.dev/v1alpha1/bundles.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/releases.x-helm.dev/v1alpha1/bundles.yaml deleted file mode 100644 index a732ffa5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/releases.x-helm.dev/v1alpha1/bundles.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: releases.x-helm.dev - k8s.io/kind: Bundle - k8s.io/resource: bundles - k8s.io/version: v1alpha1 - name: releases.x-helm.dev-v1alpha1-bundles -spec: - resource: - group: releases.x-helm.dev - kind: Bundle - name: bundles - scope: Cluster - version: v1alpha1 - ui: - editor: - name: releasesxhelmdev-bundle-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/releases.x-helm.dev/v1alpha1/orders.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/releases.x-helm.dev/v1alpha1/orders.yaml deleted file mode 100644 index b5a46e49..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/releases.x-helm.dev/v1alpha1/orders.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: releases.x-helm.dev - k8s.io/kind: Order - k8s.io/resource: orders - k8s.io/version: v1alpha1 - name: releases.x-helm.dev-v1alpha1-orders -spec: - resource: - group: releases.x-helm.dev - kind: Order - name: orders - scope: Cluster - version: v1alpha1 - ui: - editor: - name: releasesxhelmdev-order-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/repositories.stash.appscode.com/v1alpha1/snapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/repositories.stash.appscode.com/v1alpha1/snapshots.yaml deleted file mode 100644 index 63398af4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/repositories.stash.appscode.com/v1alpha1/snapshots.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: repositories.stash.appscode.com - k8s.io/kind: Snapshot - k8s.io/resource: snapshots - k8s.io/version: v1alpha1 - name: repositories.stash.appscode.com-v1alpha1-snapshots -spec: - resource: - group: repositories.stash.appscode.com - kind: Snapshot - name: snapshots - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: repositoriesstashappscodecom-snapshot-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/runtime.cluster.x-k8s.io/v1alpha1/extensionconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/runtime.cluster.x-k8s.io/v1alpha1/extensionconfigs.yaml deleted file mode 100644 index 4b40028b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/runtime.cluster.x-k8s.io/v1alpha1/extensionconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: runtime.cluster.x-k8s.io - k8s.io/kind: ExtensionConfig - k8s.io/resource: extensionconfigs - k8s.io/version: v1alpha1 - name: runtime.cluster.x-k8s.io-v1alpha1-extensionconfigs -spec: - resource: - group: runtime.cluster.x-k8s.io - kind: ExtensionConfig - name: extensionconfigs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: runtimeclusterxk8sio-extensionconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1/priorityclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1/priorityclasses.yaml deleted file mode 100644 index 39218919..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1/priorityclasses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: scheduling.k8s.io - k8s.io/kind: PriorityClass - k8s.io/resource: priorityclasses - k8s.io/version: v1 - name: scheduling.k8s.io-v1-priorityclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/scheduling.k8s.io/priorityclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/scheduling.k8s.io/priorityclasses.png - type: image/png - resource: - group: scheduling.k8s.io - kind: PriorityClass - name: priorityclasses - scope: Cluster - version: v1 - ui: - editor: - name: schedulingk8sio-priorityclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1alpha1/priorityclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1alpha1/priorityclasses.yaml deleted file mode 100644 index 9792ef82..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1alpha1/priorityclasses.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: scheduling.k8s.io - k8s.io/kind: PriorityClass - k8s.io/resource: priorityclasses - k8s.io/version: v1alpha1 - name: scheduling.k8s.io-v1alpha1-priorityclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/scheduling.k8s.io/priorityclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/scheduling.k8s.io/priorityclasses.png - type: image/png - resource: - group: scheduling.k8s.io - kind: PriorityClass - name: priorityclasses - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1beta1/priorityclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1beta1/priorityclasses.yaml deleted file mode 100644 index 1b17a58b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/scheduling.k8s.io/v1beta1/priorityclasses.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: scheduling.k8s.io - k8s.io/kind: PriorityClass - k8s.io/resource: priorityclasses - k8s.io/version: v1beta1 - name: scheduling.k8s.io-v1beta1-priorityclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/scheduling.k8s.io/priorityclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/scheduling.k8s.io/priorityclasses.png - type: image/png - resource: - group: scheduling.k8s.io - kind: PriorityClass - name: priorityclasses - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mariadbdatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mariadbdatabases.yaml deleted file mode 100644 index 1265f15f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mariadbdatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: schema.kubedb.com - k8s.io/kind: MariaDBDatabase - k8s.io/resource: mariadbdatabases - k8s.io/version: v1alpha1 - name: schema.kubedb.com-v1alpha1-mariadbdatabases -spec: - resource: - group: schema.kubedb.com - kind: MariaDBDatabase - name: mariadbdatabases - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: schemakubedbcom-mariadbdatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mongodbdatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mongodbdatabases.yaml deleted file mode 100644 index d511f960..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mongodbdatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: schema.kubedb.com - k8s.io/kind: MongoDBDatabase - k8s.io/resource: mongodbdatabases - k8s.io/version: v1alpha1 - name: schema.kubedb.com-v1alpha1-mongodbdatabases -spec: - resource: - group: schema.kubedb.com - kind: MongoDBDatabase - name: mongodbdatabases - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: schemakubedbcom-mongodbdatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mysqldatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mysqldatabases.yaml deleted file mode 100644 index d6a50935..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/mysqldatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: schema.kubedb.com - k8s.io/kind: MySQLDatabase - k8s.io/resource: mysqldatabases - k8s.io/version: v1alpha1 - name: schema.kubedb.com-v1alpha1-mysqldatabases -spec: - resource: - group: schema.kubedb.com - kind: MySQLDatabase - name: mysqldatabases - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: schemakubedbcom-mysqldatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/postgresdatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/postgresdatabases.yaml deleted file mode 100644 index 7353e087..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/schema.kubedb.com/v1alpha1/postgresdatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: schema.kubedb.com - k8s.io/kind: PostgresDatabase - k8s.io/resource: postgresdatabases - k8s.io/version: v1alpha1 - name: schema.kubedb.com-v1alpha1-postgresdatabases -spec: - resource: - group: schema.kubedb.com - kind: PostgresDatabase - name: postgresdatabases - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: schemakubedbcom-postgresdatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml deleted file mode 100644 index e52de070..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: secrets-store.csi.x-k8s.io - k8s.io/kind: SecretProviderClass - k8s.io/resource: secretproviderclasses - k8s.io/version: v1alpha1 - name: secrets-store.csi.x-k8s.io-v1alpha1-secretproviderclasses -spec: - resource: - group: secrets-store.csi.x-k8s.io - kind: SecretProviderClass - name: secretproviderclasses - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: secretsstorecsixk8sio-secretproviderclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml deleted file mode 100644 index fcf6e446..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: secrets-store.csi.x-k8s.io - k8s.io/kind: SecretProviderClassPodStatus - k8s.io/resource: secretproviderclasspodstatuses - k8s.io/version: v1alpha1 - name: secrets-store.csi.x-k8s.io-v1alpha1-secretproviderclasspodstatuses -spec: - resource: - group: secrets-store.csi.x-k8s.io - kind: SecretProviderClassPodStatus - name: secretproviderclasspodstatuses - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: secretsstorecsixk8sio-secretproviderclasspodstatus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets.crossplane.io/v1alpha1/storeconfigs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets.crossplane.io/v1alpha1/storeconfigs.yaml deleted file mode 100644 index 9b5a7a1e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secrets.crossplane.io/v1alpha1/storeconfigs.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: secrets.crossplane.io - k8s.io/kind: StoreConfig - k8s.io/resource: storeconfigs - k8s.io/version: v1alpha1 - name: secrets.crossplane.io-v1alpha1-storeconfigs -spec: - resource: - group: secrets.crossplane.io - kind: StoreConfig - name: storeconfigs - scope: Cluster - version: v1alpha1 - ui: - editor: - name: secretscrossplaneio-storeconfig-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secretsmanager.aws.kubedb.com/v1alpha1/secrets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secretsmanager.aws.kubedb.com/v1alpha1/secrets.yaml deleted file mode 100644 index 3c1e3f52..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/secretsmanager.aws.kubedb.com/v1alpha1/secrets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: secretsmanager.aws.kubedb.com - k8s.io/kind: Secret - k8s.io/resource: secrets - k8s.io/version: v1alpha1 - name: secretsmanager.aws.kubedb.com-v1alpha1-secrets -spec: - resource: - group: secretsmanager.aws.kubedb.com - kind: Secret - name: secrets - scope: Cluster - version: v1alpha1 - ui: - editor: - name: secretsmanagerawskubedbcom-secret-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/settings.k8s.io/v1alpha1/podpresets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/settings.k8s.io/v1alpha1/podpresets.yaml deleted file mode 100644 index fa1dfe8a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/settings.k8s.io/v1alpha1/podpresets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: settings.k8s.io - k8s.io/kind: PodPreset - k8s.io/resource: podpresets - k8s.io/version: v1alpha1 - name: settings.k8s.io-v1alpha1-podpresets -spec: - resource: - group: settings.k8s.io - kind: PodPreset - name: podpresets - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: settingsk8sio-podpreset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshotclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshotclasses.yaml deleted file mode 100644 index 6ec15694..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshotclasses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: snapshot.storage.k8s.io - k8s.io/kind: VolumeSnapshotClass - k8s.io/resource: volumesnapshotclasses - k8s.io/version: v1 - name: snapshot.storage.k8s.io-v1-volumesnapshotclasses -spec: - resource: - group: snapshot.storage.k8s.io - kind: VolumeSnapshotClass - name: volumesnapshotclasses - scope: Cluster - version: v1 - ui: - editor: - name: snapshotstoragek8sio-volumesnapshotclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshotcontents.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshotcontents.yaml deleted file mode 100644 index 30a84c29..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshotcontents.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: snapshot.storage.k8s.io - k8s.io/kind: VolumeSnapshotContent - k8s.io/resource: volumesnapshotcontents - k8s.io/version: v1 - name: snapshot.storage.k8s.io-v1-volumesnapshotcontents -spec: - resource: - group: snapshot.storage.k8s.io - kind: VolumeSnapshotContent - name: volumesnapshotcontents - scope: Cluster - version: v1 - ui: - editor: - name: snapshotstoragek8sio-volumesnapshotcontent-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshots.yaml deleted file mode 100644 index 5c6a4f2e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1/volumesnapshots.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: snapshot.storage.k8s.io - k8s.io/kind: VolumeSnapshot - k8s.io/resource: volumesnapshots - k8s.io/version: v1 - name: snapshot.storage.k8s.io-v1-volumesnapshots -spec: - resource: - group: snapshot.storage.k8s.io - kind: VolumeSnapshot - name: volumesnapshots - scope: Namespaced - version: v1 - ui: - editor: - name: snapshotstoragek8sio-volumesnapshot-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshotclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshotclasses.yaml deleted file mode 100644 index bc1d76cc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshotclasses.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: snapshot.storage.k8s.io - k8s.io/kind: VolumeSnapshotClass - k8s.io/resource: volumesnapshotclasses - k8s.io/version: v1beta1 - name: snapshot.storage.k8s.io-v1beta1-volumesnapshotclasses -spec: - resource: - group: snapshot.storage.k8s.io - kind: VolumeSnapshotClass - name: volumesnapshotclasses - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshotcontents.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshotcontents.yaml deleted file mode 100644 index e31f4ecf..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshotcontents.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: snapshot.storage.k8s.io - k8s.io/kind: VolumeSnapshotContent - k8s.io/resource: volumesnapshotcontents - k8s.io/version: v1beta1 - name: snapshot.storage.k8s.io-v1beta1-volumesnapshotcontents -spec: - resource: - group: snapshot.storage.k8s.io - kind: VolumeSnapshotContent - name: volumesnapshotcontents - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshots.yaml deleted file mode 100644 index c201442c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/snapshot.storage.k8s.io/v1beta1/volumesnapshots.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: snapshot.storage.k8s.io - k8s.io/kind: VolumeSnapshot - k8s.io/resource: volumesnapshots - k8s.io/version: v1beta1 - name: snapshot.storage.k8s.io-v1beta1-volumesnapshots -spec: - resource: - group: snapshot.storage.k8s.io - kind: VolumeSnapshot - name: volumesnapshots - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sns.aws.kubedb.com/v1alpha1/topics.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sns.aws.kubedb.com/v1alpha1/topics.yaml deleted file mode 100644 index f4e5a3d4..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sns.aws.kubedb.com/v1alpha1/topics.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sns.aws.kubedb.com - k8s.io/kind: Topic - k8s.io/resource: topics - k8s.io/version: v1alpha1 - name: sns.aws.kubedb.com-v1alpha1-topics -spec: - resource: - group: sns.aws.kubedb.com - kind: Topic - name: topics - scope: Cluster - version: v1alpha1 - ui: - editor: - name: snsawskubedbcom-topic-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1/gitrepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1/gitrepositories.yaml deleted file mode 100644 index 6384fea3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1/gitrepositories.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: GitRepository - k8s.io/resource: gitrepositories - k8s.io/version: v1 - name: source.toolkit.fluxcd.io-v1-gitrepositories -spec: - resource: - group: source.toolkit.fluxcd.io - kind: GitRepository - name: gitrepositories - scope: Namespaced - version: v1 - ui: - editor: - name: sourcetoolkitfluxcdio-gitrepository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/buckets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/buckets.yaml deleted file mode 100644 index c8c9763b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/buckets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: Bucket - k8s.io/resource: buckets - k8s.io/version: v1beta1 - name: source.toolkit.fluxcd.io-v1beta1-buckets -spec: - resource: - group: source.toolkit.fluxcd.io - kind: Bucket - name: buckets - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/gitrepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/gitrepositories.yaml deleted file mode 100644 index 95f77a75..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/gitrepositories.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: GitRepository - k8s.io/resource: gitrepositories - k8s.io/version: v1beta1 - name: source.toolkit.fluxcd.io-v1beta1-gitrepositories -spec: - resource: - group: source.toolkit.fluxcd.io - kind: GitRepository - name: gitrepositories - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/helmcharts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/helmcharts.yaml deleted file mode 100644 index c4c2e31f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/helmcharts.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: HelmChart - k8s.io/resource: helmcharts - k8s.io/version: v1beta1 - name: source.toolkit.fluxcd.io-v1beta1-helmcharts -spec: - resource: - group: source.toolkit.fluxcd.io - kind: HelmChart - name: helmcharts - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/helmrepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/helmrepositories.yaml deleted file mode 100644 index dced2bdc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta1/helmrepositories.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: HelmRepository - k8s.io/resource: helmrepositories - k8s.io/version: v1beta1 - name: source.toolkit.fluxcd.io-v1beta1-helmrepositories -spec: - resource: - group: source.toolkit.fluxcd.io - kind: HelmRepository - name: helmrepositories - scope: Namespaced - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/buckets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/buckets.yaml deleted file mode 100644 index 69ed6e1a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/buckets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: Bucket - k8s.io/resource: buckets - k8s.io/version: v1beta2 - name: source.toolkit.fluxcd.io-v1beta2-buckets -spec: - resource: - group: source.toolkit.fluxcd.io - kind: Bucket - name: buckets - scope: Namespaced - version: v1beta2 - ui: - editor: - name: sourcetoolkitfluxcdio-bucket-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/gitrepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/gitrepositories.yaml deleted file mode 100644 index 7811ae7b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/gitrepositories.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: GitRepository - k8s.io/resource: gitrepositories - k8s.io/version: v1beta2 - name: source.toolkit.fluxcd.io-v1beta2-gitrepositories -spec: - resource: - group: source.toolkit.fluxcd.io - kind: GitRepository - name: gitrepositories - scope: Namespaced - version: v1beta2 - ui: - editor: - name: sourcetoolkitfluxcdio-gitrepository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml deleted file mode 100644 index 7f57d6ee..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/helmcharts.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: HelmChart - k8s.io/resource: helmcharts - k8s.io/version: v1beta2 - name: source.toolkit.fluxcd.io-v1beta2-helmcharts -spec: - resource: - group: source.toolkit.fluxcd.io - kind: HelmChart - name: helmcharts - scope: Namespaced - version: v1beta2 - ui: - editor: - name: sourcetoolkitfluxcdio-helmchart-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/helmrepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/helmrepositories.yaml deleted file mode 100644 index aa79ca4b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/helmrepositories.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: HelmRepository - k8s.io/resource: helmrepositories - k8s.io/version: v1beta2 - name: source.toolkit.fluxcd.io-v1beta2-helmrepositories -spec: - resource: - group: source.toolkit.fluxcd.io - kind: HelmRepository - name: helmrepositories - scope: Namespaced - version: v1beta2 - ui: - editor: - name: sourcetoolkitfluxcdio-helmrepository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/ocirepositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/ocirepositories.yaml deleted file mode 100644 index 1def2407..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/source.toolkit.fluxcd.io/v1beta2/ocirepositories.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: source.toolkit.fluxcd.io - k8s.io/kind: OCIRepository - k8s.io/resource: ocirepositories - k8s.io/version: v1beta2 - name: source.toolkit.fluxcd.io-v1beta2-ocirepositories -spec: - resource: - group: source.toolkit.fluxcd.io - kind: OCIRepository - name: ocirepositories - scope: Namespaced - version: v1beta2 - ui: - editor: - name: sourcetoolkitfluxcdio-ocirepository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/databaseiammembers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/databaseiammembers.yaml deleted file mode 100644 index d1bc832c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/databaseiammembers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: spanner.gcp.kubedb.com - k8s.io/kind: DatabaseIAMMember - k8s.io/resource: databaseiammembers - k8s.io/version: v1alpha1 - name: spanner.gcp.kubedb.com-v1alpha1-databaseiammembers -spec: - resource: - group: spanner.gcp.kubedb.com - kind: DatabaseIAMMember - name: databaseiammembers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: spannergcpkubedbcom-databaseiammember-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/databases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/databases.yaml deleted file mode 100644 index d0441a3c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/databases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: spanner.gcp.kubedb.com - k8s.io/kind: Database - k8s.io/resource: databases - k8s.io/version: v1alpha1 - name: spanner.gcp.kubedb.com-v1alpha1-databases -spec: - resource: - group: spanner.gcp.kubedb.com - kind: Database - name: databases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: spannergcpkubedbcom-database-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/instanceiammembers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/instanceiammembers.yaml deleted file mode 100644 index ccdfaef3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/instanceiammembers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: spanner.gcp.kubedb.com - k8s.io/kind: InstanceIAMMember - k8s.io/resource: instanceiammembers - k8s.io/version: v1alpha1 - name: spanner.gcp.kubedb.com-v1alpha1-instanceiammembers -spec: - resource: - group: spanner.gcp.kubedb.com - kind: InstanceIAMMember - name: instanceiammembers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: spannergcpkubedbcom-instanceiammember-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/instances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/instances.yaml deleted file mode 100644 index e9547419..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/spanner.gcp.kubedb.com/v1alpha1/instances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: spanner.gcp.kubedb.com - k8s.io/kind: Instance - k8s.io/resource: instances - k8s.io/version: v1alpha1 - name: spanner.gcp.kubedb.com-v1alpha1-instances -spec: - resource: - group: spanner.gcp.kubedb.com - kind: Instance - name: instances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: spannergcpkubedbcom-instance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqldatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqldatabases.yaml deleted file mode 100644 index 5285b063..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqldatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLDatabase - k8s.io/resource: mssqldatabases - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqldatabases -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLDatabase - name: mssqldatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqldatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqldatabasevulnerabilityassessmentrulebaselines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqldatabasevulnerabilityassessmentrulebaselines.yaml deleted file mode 100644 index ca5de2c3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqldatabasevulnerabilityassessmentrulebaselines.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLDatabaseVulnerabilityAssessmentRuleBaseline - k8s.io/resource: mssqldatabasevulnerabilityassessmentrulebaselines - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqldatabasevulnerabilityassessmentrulebaselines -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLDatabaseVulnerabilityAssessmentRuleBaseline - name: mssqldatabasevulnerabilityassessmentrulebaselines - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqldatabasevulnerabilityassessmentrulebaseline-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlelasticpools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlelasticpools.yaml deleted file mode 100644 index 4c2bb340..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlelasticpools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLElasticPool - k8s.io/resource: mssqlelasticpools - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlelasticpools -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLElasticPool - name: mssqlelasticpools - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlelasticpool-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlfailovergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlfailovergroups.yaml deleted file mode 100644 index 93316057..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlfailovergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLFailoverGroup - k8s.io/resource: mssqlfailovergroups - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlfailovergroups -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLFailoverGroup - name: mssqlfailovergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlfailovergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlfirewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlfirewallrules.yaml deleted file mode 100644 index e0f26214..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlfirewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLFirewallRule - k8s.io/resource: mssqlfirewallrules - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlfirewallrules -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLFirewallRule - name: mssqlfirewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlfirewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqljobagents.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqljobagents.yaml deleted file mode 100644 index bc681bb8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqljobagents.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLJobAgent - k8s.io/resource: mssqljobagents - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqljobagents -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLJobAgent - name: mssqljobagents - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqljobagent-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqljobcredentials.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqljobcredentials.yaml deleted file mode 100644 index 64c91eeb..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqljobcredentials.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLJobCredential - k8s.io/resource: mssqljobcredentials - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqljobcredentials -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLJobCredential - name: mssqljobcredentials - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqljobcredential-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanageddatabases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanageddatabases.yaml deleted file mode 100644 index 333f8a9c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanageddatabases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLManagedDatabase - k8s.io/resource: mssqlmanageddatabases - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlmanageddatabases -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLManagedDatabase - name: mssqlmanageddatabases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlmanageddatabase-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstanceactivedirectoryadministrators.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstanceactivedirectoryadministrators.yaml deleted file mode 100644 index 14e198e6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstanceactivedirectoryadministrators.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLManagedInstanceActiveDirectoryAdministrator - k8s.io/resource: mssqlmanagedinstanceactivedirectoryadministrators - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlmanagedinstanceactivedirectoryadministrators -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLManagedInstanceActiveDirectoryAdministrator - name: mssqlmanagedinstanceactivedirectoryadministrators - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlmanagedinstanceactivedirectoryadministrator-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstancefailovergroups.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstancefailovergroups.yaml deleted file mode 100644 index 14aaabc1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstancefailovergroups.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLManagedInstanceFailoverGroup - k8s.io/resource: mssqlmanagedinstancefailovergroups - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlmanagedinstancefailovergroups -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLManagedInstanceFailoverGroup - name: mssqlmanagedinstancefailovergroups - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlmanagedinstancefailovergroup-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstances.yaml deleted file mode 100644 index d916db26..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLManagedInstance - k8s.io/resource: mssqlmanagedinstances - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlmanagedinstances -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLManagedInstance - name: mssqlmanagedinstances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlmanagedinstance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstancevulnerabilityassessments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstancevulnerabilityassessments.yaml deleted file mode 100644 index 93b3614a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlmanagedinstancevulnerabilityassessments.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLManagedInstanceVulnerabilityAssessment - k8s.io/resource: mssqlmanagedinstancevulnerabilityassessments - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlmanagedinstancevulnerabilityassessments -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLManagedInstanceVulnerabilityAssessment - name: mssqlmanagedinstancevulnerabilityassessments - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlmanagedinstancevulnerabilityassessment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqloutboundfirewallrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqloutboundfirewallrules.yaml deleted file mode 100644 index ead82c92..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqloutboundfirewallrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLOutboundFirewallRule - k8s.io/resource: mssqloutboundfirewallrules - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqloutboundfirewallrules -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLOutboundFirewallRule - name: mssqloutboundfirewallrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqloutboundfirewallrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlserverdnsaliases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlserverdnsaliases.yaml deleted file mode 100644 index 8ddb2fd5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlserverdnsaliases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLServerDNSAlias - k8s.io/resource: mssqlserverdnsaliases - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlserverdnsaliases -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLServerDNSAlias - name: mssqlserverdnsaliases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlserverdnsalias-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservermicrosoftsupportauditingpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservermicrosoftsupportauditingpolicies.yaml deleted file mode 100644 index 9a53b5ff..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservermicrosoftsupportauditingpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLServerMicrosoftSupportAuditingPolicy - k8s.io/resource: mssqlservermicrosoftsupportauditingpolicies - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlservermicrosoftsupportauditingpolicies -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLServerMicrosoftSupportAuditingPolicy - name: mssqlservermicrosoftsupportauditingpolicies - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlservermicrosoftsupportauditingpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservers.yaml deleted file mode 100644 index 2eb76229..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLServer - k8s.io/resource: mssqlservers - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlservers -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLServer - name: mssqlservers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlserver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlserversecurityalertpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlserversecurityalertpolicies.yaml deleted file mode 100644 index 86d2c79d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlserversecurityalertpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLServerSecurityAlertPolicy - k8s.io/resource: mssqlserversecurityalertpolicies - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlserversecurityalertpolicies -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLServerSecurityAlertPolicy - name: mssqlserversecurityalertpolicies - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlserversecurityalertpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservertransparentdataencryptions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservertransparentdataencryptions.yaml deleted file mode 100644 index 3a13dd96..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservertransparentdataencryptions.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLServerTransparentDataEncryption - k8s.io/resource: mssqlservertransparentdataencryptions - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlservertransparentdataencryptions -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLServerTransparentDataEncryption - name: mssqlservertransparentdataencryptions - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlservertransparentdataencryption-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservervulnerabilityassessments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservervulnerabilityassessments.yaml deleted file mode 100644 index 2f888744..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlservervulnerabilityassessments.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLServerVulnerabilityAssessment - k8s.io/resource: mssqlservervulnerabilityassessments - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlservervulnerabilityassessments -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLServerVulnerabilityAssessment - name: mssqlservervulnerabilityassessments - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlservervulnerabilityassessment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlvirtualnetworkrules.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlvirtualnetworkrules.yaml deleted file mode 100644 index 27bd1462..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.azure.kubedb.com/v1alpha1/mssqlvirtualnetworkrules.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.azure.kubedb.com - k8s.io/kind: MSSQLVirtualNetworkRule - k8s.io/resource: mssqlvirtualnetworkrules - k8s.io/version: v1alpha1 - name: sql.azure.kubedb.com-v1alpha1-mssqlvirtualnetworkrules -spec: - resource: - group: sql.azure.kubedb.com - kind: MSSQLVirtualNetworkRule - name: mssqlvirtualnetworkrules - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlazurekubedbcom-mssqlvirtualnetworkrule-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/databaseinstances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/databaseinstances.yaml deleted file mode 100644 index 4bb3261d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/databaseinstances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.gcp.kubedb.com - k8s.io/kind: DatabaseInstance - k8s.io/resource: databaseinstances - k8s.io/version: v1alpha1 - name: sql.gcp.kubedb.com-v1alpha1-databaseinstances -spec: - resource: - group: sql.gcp.kubedb.com - kind: DatabaseInstance - name: databaseinstances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlgcpkubedbcom-databaseinstance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/databases.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/databases.yaml deleted file mode 100644 index 4fa8e9f5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/databases.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.gcp.kubedb.com - k8s.io/kind: Database - k8s.io/resource: databases - k8s.io/version: v1alpha1 - name: sql.gcp.kubedb.com-v1alpha1-databases -spec: - resource: - group: sql.gcp.kubedb.com - kind: Database - name: databases - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlgcpkubedbcom-database-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/sourcerepresentationinstances.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/sourcerepresentationinstances.yaml deleted file mode 100644 index 85cb3987..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/sourcerepresentationinstances.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.gcp.kubedb.com - k8s.io/kind: SourceRepresentationInstance - k8s.io/resource: sourcerepresentationinstances - k8s.io/version: v1alpha1 - name: sql.gcp.kubedb.com-v1alpha1-sourcerepresentationinstances -spec: - resource: - group: sql.gcp.kubedb.com - kind: SourceRepresentationInstance - name: sourcerepresentationinstances - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlgcpkubedbcom-sourcerepresentationinstance-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/sslcerts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/sslcerts.yaml deleted file mode 100644 index 46adab73..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/sslcerts.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.gcp.kubedb.com - k8s.io/kind: SSLCert - k8s.io/resource: sslcerts - k8s.io/version: v1alpha1 - name: sql.gcp.kubedb.com-v1alpha1-sslcerts -spec: - resource: - group: sql.gcp.kubedb.com - kind: SSLCert - name: sslcerts - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlgcpkubedbcom-sslcert-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/users.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/users.yaml deleted file mode 100644 index a7a54598..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/sql.gcp.kubedb.com/v1alpha1/users.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: sql.gcp.kubedb.com - k8s.io/kind: User - k8s.io/resource: users - k8s.io/version: v1alpha1 - name: sql.gcp.kubedb.com-v1alpha1-users -spec: - resource: - group: sql.gcp.kubedb.com - kind: User - name: users - scope: Cluster - version: v1alpha1 - ui: - editor: - name: sqlgcpkubedbcom-user-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/recoveries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/recoveries.yaml deleted file mode 100644 index 09912952..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/recoveries.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: Recovery - k8s.io/resource: recoveries - k8s.io/version: v1alpha1 - name: stash.appscode.com-v1alpha1-recoveries -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/recoveries.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/recoveries.png - type: image/png - resource: - group: stash.appscode.com - kind: Recovery - name: recoveries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: stashappscodecom-recovery-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/repositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/repositories.yaml deleted file mode 100644 index 3af9a18a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/repositories.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: Repository - k8s.io/resource: repositories - k8s.io/version: v1alpha1 - name: stash.appscode.com-v1alpha1-repositories -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/repositories.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/repositories.png - type: image/png - resource: - group: stash.appscode.com - kind: Repository - name: repositories - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: stashappscodecom-repository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - options: - name: stashappscodecom-repository-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/restics.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/restics.yaml deleted file mode 100644 index a4eba56f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1alpha1/restics.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: Restic - k8s.io/resource: restics - k8s.io/version: v1alpha1 - name: stash.appscode.com-v1alpha1-restics -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/restics.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/restics.png - type: image/png - resource: - group: stash.appscode.com - kind: Restic - name: restics - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: stashappscodecom-restic-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupbatches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupbatches.yaml deleted file mode 100644 index b5af5f44..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupbatches.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: BackupBatch - k8s.io/resource: backupbatches - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-backupbatches -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupbatches.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupbatches.png - type: image/png - resource: - group: stash.appscode.com - kind: BackupBatch - name: backupbatches - scope: Namespaced - version: v1beta1 - ui: - editor: - name: stashappscodecom-backupbatch-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupblueprints.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupblueprints.yaml deleted file mode 100644 index 01e08f5e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupblueprints.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: BackupBlueprint - k8s.io/resource: backupblueprints - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-backupblueprints -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupblueprints.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupblueprints.png - type: image/png - resource: - group: stash.appscode.com - kind: BackupBlueprint - name: backupblueprints - scope: Cluster - version: v1beta1 - ui: - editor: - name: stashappscodecom-backupblueprint-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupconfigurations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupconfigurations.yaml deleted file mode 100644 index 84687929..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupconfigurations.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: BackupConfiguration - k8s.io/resource: backupconfigurations - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-backupconfigurations -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupconfigurations.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupconfigurations.png - type: image/png - resource: - group: stash.appscode.com - kind: BackupConfiguration - name: backupconfigurations - scope: Namespaced - version: v1beta1 - ui: - editor: - name: stashappscodecom-backupconfiguration-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupsessions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupsessions.yaml deleted file mode 100644 index 781afac7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/backupsessions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: BackupSession - k8s.io/resource: backupsessions - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-backupsessions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupsessions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/backupsessions.png - type: image/png - resource: - group: stash.appscode.com - kind: BackupSession - name: backupsessions - scope: Namespaced - version: v1beta1 - ui: - editor: - name: stashappscodecom-backupsession-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/functions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/functions.yaml deleted file mode 100644 index 5c158fb9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/functions.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: Function - k8s.io/resource: functions - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-functions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/functions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/functions.png - type: image/png - resource: - group: stash.appscode.com - kind: Function - name: functions - scope: Cluster - version: v1beta1 - ui: - editor: - name: stashappscodecom-function-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/restorebatches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/restorebatches.yaml deleted file mode 100644 index 399de15e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/restorebatches.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: RestoreBatch - k8s.io/resource: restorebatches - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-restorebatches -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/restorebatches.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/restorebatches.png - type: image/png - resource: - group: stash.appscode.com - kind: RestoreBatch - name: restorebatches - scope: Namespaced - version: v1beta1 - ui: - editor: - name: stashappscodecom-restorebatch-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/restoresessions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/restoresessions.yaml deleted file mode 100644 index 80662e01..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/restoresessions.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: RestoreSession - k8s.io/resource: restoresessions - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-restoresessions -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/restoresessions.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/restoresessions.png - type: image/png - resource: - group: stash.appscode.com - kind: RestoreSession - name: restoresessions - scope: Namespaced - version: v1beta1 - ui: - editor: - name: stashappscodecom-restoresession-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false - options: - name: stashappscodecom-restoresession-editor-options - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/tasks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/tasks.yaml deleted file mode 100644 index 644a2ee9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/stash.appscode.com/v1beta1/tasks.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: stash.appscode.com - k8s.io/kind: Task - k8s.io/resource: tasks - k8s.io/version: v1beta1 - name: stash.appscode.com-v1beta1-tasks -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/tasks.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/stash.appscode.com/tasks.png - type: image/png - resource: - group: stash.appscode.com - kind: Task - name: tasks - scope: Cluster - version: v1beta1 - ui: - editor: - name: stashappscodecom-task-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/constraintpodstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/constraintpodstatuses.yaml deleted file mode 100644 index 74887933..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/constraintpodstatuses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: status.gatekeeper.sh - k8s.io/kind: ConstraintPodStatus - k8s.io/resource: constraintpodstatuses - k8s.io/version: v1beta1 - name: status.gatekeeper.sh-v1beta1-constraintpodstatuses -spec: - resource: - group: status.gatekeeper.sh - kind: ConstraintPodStatus - name: constraintpodstatuses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: statusgatekeepersh-constraintpodstatus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/constrainttemplatepodstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/constrainttemplatepodstatuses.yaml deleted file mode 100644 index f54232ba..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/constrainttemplatepodstatuses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: status.gatekeeper.sh - k8s.io/kind: ConstraintTemplatePodStatus - k8s.io/resource: constrainttemplatepodstatuses - k8s.io/version: v1beta1 - name: status.gatekeeper.sh-v1beta1-constrainttemplatepodstatuses -spec: - resource: - group: status.gatekeeper.sh - kind: ConstraintTemplatePodStatus - name: constrainttemplatepodstatuses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: statusgatekeepersh-constrainttemplatepodstatus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/expansiontemplatepodstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/expansiontemplatepodstatuses.yaml deleted file mode 100644 index 10d789f1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/expansiontemplatepodstatuses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: status.gatekeeper.sh - k8s.io/kind: ExpansionTemplatePodStatus - k8s.io/resource: expansiontemplatepodstatuses - k8s.io/version: v1beta1 - name: status.gatekeeper.sh-v1beta1-expansiontemplatepodstatuses -spec: - resource: - group: status.gatekeeper.sh - kind: ExpansionTemplatePodStatus - name: expansiontemplatepodstatuses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: statusgatekeepersh-expansiontemplatepodstatus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/mutatorpodstatuses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/mutatorpodstatuses.yaml deleted file mode 100644 index f2fd69d8..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/status.gatekeeper.sh/v1beta1/mutatorpodstatuses.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: status.gatekeeper.sh - k8s.io/kind: MutatorPodStatus - k8s.io/resource: mutatorpodstatuses - k8s.io/version: v1beta1 - name: status.gatekeeper.sh-v1beta1-mutatorpodstatuses -spec: - resource: - group: status.gatekeeper.sh - kind: MutatorPodStatus - name: mutatorpodstatuses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: statusgatekeepersh-mutatorpodstatus-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.azure.kubedb.com/v1alpha1/accounts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.azure.kubedb.com/v1alpha1/accounts.yaml deleted file mode 100644 index 668062cc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.azure.kubedb.com/v1alpha1/accounts.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.azure.kubedb.com - k8s.io/kind: Account - k8s.io/resource: accounts - k8s.io/version: v1alpha1 - name: storage.azure.kubedb.com-v1alpha1-accounts -spec: - resource: - group: storage.azure.kubedb.com - kind: Account - name: accounts - scope: Cluster - version: v1alpha1 - ui: - editor: - name: storageazurekubedbcom-account-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.azure.kubedb.com/v1alpha1/containers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.azure.kubedb.com/v1alpha1/containers.yaml deleted file mode 100644 index f480e1de..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.azure.kubedb.com/v1alpha1/containers.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.azure.kubedb.com - k8s.io/kind: Container - k8s.io/resource: containers - k8s.io/version: v1alpha1 - name: storage.azure.kubedb.com-v1alpha1-containers -spec: - resource: - group: storage.azure.kubedb.com - kind: Container - name: containers - scope: Cluster - version: v1alpha1 - ui: - editor: - name: storageazurekubedbcom-container-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/csidrivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/csidrivers.yaml deleted file mode 100644 index 04981672..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/csidrivers.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: CSIDriver - k8s.io/resource: csidrivers - k8s.io/version: v1 - name: storage.k8s.io-v1-csidrivers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csidrivers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csidrivers.png - type: image/png - resource: - group: storage.k8s.io - kind: CSIDriver - name: csidrivers - scope: Namespaced - version: v1 - ui: - editor: - name: storagek8sio-csidriver-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/csinodes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/csinodes.yaml deleted file mode 100644 index 1cb03210..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/csinodes.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: CSINode - k8s.io/resource: csinodes - k8s.io/version: v1 - name: storage.k8s.io-v1-csinodes -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csinodes.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csinodes.png - type: image/png - resource: - group: storage.k8s.io - kind: CSINode - name: csinodes - scope: Cluster - version: v1 - ui: - editor: - name: storagek8sio-csinode-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/storageclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/storageclasses.yaml deleted file mode 100644 index bb6c21e6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/storageclasses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: StorageClass - k8s.io/resource: storageclasses - k8s.io/version: v1 - name: storage.k8s.io-v1-storageclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/storageclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/storageclasses.png - type: image/png - resource: - group: storage.k8s.io - kind: StorageClass - name: storageclasses - scope: Cluster - version: v1 - ui: - editor: - name: storagek8sio-storageclass-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/volumeattachments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/volumeattachments.yaml deleted file mode 100644 index b179d26d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1/volumeattachments.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: VolumeAttachment - k8s.io/resource: volumeattachments - k8s.io/version: v1 - name: storage.k8s.io-v1-volumeattachments -spec: - resource: - group: storage.k8s.io - kind: VolumeAttachment - name: volumeattachments - scope: Cluster - version: v1 - ui: - editor: - name: storagek8sio-volumeattachment-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1alpha1/csistoragecapacities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1alpha1/csistoragecapacities.yaml deleted file mode 100644 index 329a54c6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1alpha1/csistoragecapacities.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: CSIStorageCapacity - k8s.io/resource: csistoragecapacities - k8s.io/version: v1alpha1 - name: storage.k8s.io-v1alpha1-csistoragecapacities -spec: - resource: - group: storage.k8s.io - kind: CSIStorageCapacity - name: csistoragecapacities - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1alpha1/volumeattachments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1alpha1/volumeattachments.yaml deleted file mode 100644 index dc74a6db..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1alpha1/volumeattachments.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: VolumeAttachment - k8s.io/resource: volumeattachments - k8s.io/version: v1alpha1 - name: storage.k8s.io-v1alpha1-volumeattachments -spec: - resource: - group: storage.k8s.io - kind: VolumeAttachment - name: volumeattachments - scope: Namespaced - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csidrivers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csidrivers.yaml deleted file mode 100644 index ca7f63e9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csidrivers.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: CSIDriver - k8s.io/resource: csidrivers - k8s.io/version: v1beta1 - name: storage.k8s.io-v1beta1-csidrivers -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csidrivers.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csidrivers.png - type: image/png - resource: - group: storage.k8s.io - kind: CSIDriver - name: csidrivers - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csinodes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csinodes.yaml deleted file mode 100644 index bbc61472..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csinodes.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: CSINode - k8s.io/resource: csinodes - k8s.io/version: v1beta1 - name: storage.k8s.io-v1beta1-csinodes -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csinodes.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/csinodes.png - type: image/png - resource: - group: storage.k8s.io - kind: CSINode - name: csinodes - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csistoragecapacities.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csistoragecapacities.yaml deleted file mode 100644 index 7bc076a5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/csistoragecapacities.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: CSIStorageCapacity - k8s.io/resource: csistoragecapacities - k8s.io/version: v1beta1 - name: storage.k8s.io-v1beta1-csistoragecapacities -spec: - resource: - group: storage.k8s.io - kind: CSIStorageCapacity - name: csistoragecapacities - scope: Namespaced - version: v1beta1 - ui: - editor: - name: storagek8sio-csistoragecapacity-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/storageclasses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/storageclasses.yaml deleted file mode 100644 index c50e3913..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/storageclasses.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: StorageClass - k8s.io/resource: storageclasses - k8s.io/version: v1beta1 - name: storage.k8s.io-v1beta1-storageclasses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/storageclasses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/storage.k8s.io/storageclasses.png - type: image/png - resource: - group: storage.k8s.io - kind: StorageClass - name: storageclasses - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/volumeattachments.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/volumeattachments.yaml deleted file mode 100644 index 3cd284d7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.k8s.io/v1beta1/volumeattachments.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.k8s.io - k8s.io/kind: VolumeAttachment - k8s.io/resource: volumeattachments - k8s.io/version: v1beta1 - name: storage.k8s.io-v1beta1-volumeattachments -spec: - resource: - group: storage.k8s.io - kind: VolumeAttachment - name: volumeattachments - scope: Cluster - version: v1beta1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/backupstorages.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/backupstorages.yaml deleted file mode 100644 index 2155285a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/backupstorages.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.kubestash.com - k8s.io/kind: BackupStorage - k8s.io/resource: backupstorages - k8s.io/version: v1alpha1 - name: storage.kubestash.com-v1alpha1-backupstorages -spec: - resource: - group: storage.kubestash.com - kind: BackupStorage - name: backupstorages - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: storagekubestashcom-backupstorage-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/repositories.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/repositories.yaml deleted file mode 100644 index 3a2977c0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/repositories.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.kubestash.com - k8s.io/kind: Repository - k8s.io/resource: repositories - k8s.io/version: v1alpha1 - name: storage.kubestash.com-v1alpha1-repositories -spec: - resource: - group: storage.kubestash.com - kind: Repository - name: repositories - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: storagekubestashcom-repository-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/retentionpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/retentionpolicies.yaml deleted file mode 100644 index d44696f9..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/retentionpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.kubestash.com - k8s.io/kind: RetentionPolicy - k8s.io/resource: retentionpolicies - k8s.io/version: v1alpha1 - name: storage.kubestash.com-v1alpha1-retentionpolicies -spec: - resource: - group: storage.kubestash.com - kind: RetentionPolicy - name: retentionpolicies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: storagekubestashcom-retentionpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/snapshots.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/snapshots.yaml deleted file mode 100644 index f787e7d0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/storage.kubestash.com/v1alpha1/snapshots.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: storage.kubestash.com - k8s.io/kind: Snapshot - k8s.io/resource: snapshots - k8s.io/version: v1alpha1 - name: storage.kubestash.com-v1alpha1-snapshots -spec: - resource: - group: storage.kubestash.com - kind: Snapshot - name: snapshots - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: storagekubestashcom-snapshot-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/approvalpolicies.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/approvalpolicies.yaml deleted file mode 100644 index e0cdbc37..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/approvalpolicies.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: supervisor.appscode.com - k8s.io/kind: ApprovalPolicy - k8s.io/resource: approvalpolicies - k8s.io/version: v1alpha1 - name: supervisor.appscode.com-v1alpha1-approvalpolicies -spec: - resource: - group: supervisor.appscode.com - kind: ApprovalPolicy - name: approvalpolicies - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: supervisorappscodecom-approvalpolicy-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/clustermaintenancewindows.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/clustermaintenancewindows.yaml deleted file mode 100644 index 8769c80e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/clustermaintenancewindows.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: supervisor.appscode.com - k8s.io/kind: ClusterMaintenanceWindow - k8s.io/resource: clustermaintenancewindows - k8s.io/version: v1alpha1 - name: supervisor.appscode.com-v1alpha1-clustermaintenancewindows -spec: - resource: - group: supervisor.appscode.com - kind: ClusterMaintenanceWindow - name: clustermaintenancewindows - scope: Cluster - version: v1alpha1 - ui: - editor: - name: supervisorappscodecom-clustermaintenancewindow-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/maintenancewindows.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/maintenancewindows.yaml deleted file mode 100644 index a625b51d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/maintenancewindows.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: supervisor.appscode.com - k8s.io/kind: MaintenanceWindow - k8s.io/resource: maintenancewindows - k8s.io/version: v1alpha1 - name: supervisor.appscode.com-v1alpha1-maintenancewindows -spec: - resource: - group: supervisor.appscode.com - kind: MaintenanceWindow - name: maintenancewindows - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: supervisorappscodecom-maintenancewindow-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/recommendations.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/recommendations.yaml deleted file mode 100644 index bfa3bb50..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/supervisor.appscode.com/v1alpha1/recommendations.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: supervisor.appscode.com - k8s.io/kind: Recommendation - k8s.io/resource: recommendations - k8s.io/version: v1alpha1 - name: supervisor.appscode.com-v1alpha1-recommendations -spec: - resource: - group: supervisor.appscode.com - kind: Recommendation - name: recommendations - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: supervisorappscodecom-recommendation-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/trigger b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/trigger deleted file mode 100644 index 4389836d..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/trigger +++ /dev/null @@ -1 +0,0 @@ -load diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/features.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/features.yaml deleted file mode 100644 index 2eb52fda..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/features.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.k8s.appscode.com - k8s.io/kind: Feature - k8s.io/resource: features - k8s.io/version: v1alpha1 - name: ui.k8s.appscode.com-v1alpha1-features -spec: - resource: - group: ui.k8s.appscode.com - kind: Feature - name: features - scope: Cluster - version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/featuresets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/featuresets.yaml deleted file mode 100644 index 11121509..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/featuresets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.k8s.appscode.com - k8s.io/kind: FeatureSet - k8s.io/resource: featuresets - k8s.io/version: v1alpha1 - name: ui.k8s.appscode.com-v1alpha1-featuresets -spec: - resource: - group: ui.k8s.appscode.com - kind: FeatureSet - name: featuresets - scope: Cluster - version: v1alpha1 - ui: - editor: - name: uik8sappscodecom-featureset-{.metadata.release.name}-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/resourcedashboards.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/resourcedashboards.yaml deleted file mode 100644 index 7f30a8b7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/resourcedashboards.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.k8s.appscode.com - k8s.io/kind: ResourceDashboard - k8s.io/resource: resourcedashboards - k8s.io/version: v1alpha1 - name: ui.k8s.appscode.com-v1alpha1-resourcedashboards -spec: - resource: - group: ui.k8s.appscode.com - kind: ResourceDashboard - name: resourcedashboards - scope: Cluster - version: v1alpha1 - ui: - editor: - name: uik8sappscodecom-resourcedashboard-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/resourceeditors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/resourceeditors.yaml deleted file mode 100644 index 61e36823..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.k8s.appscode.com/v1alpha1/resourceeditors.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.k8s.appscode.com - k8s.io/kind: ResourceEditor - k8s.io/resource: resourceeditors - k8s.io/version: v1alpha1 - name: ui.k8s.appscode.com-v1alpha1-resourceeditors -spec: - resource: - group: ui.k8s.appscode.com - kind: ResourceEditor - name: resourceeditors - scope: Cluster - version: v1alpha1 - ui: - editor: - name: uik8sappscodecom-resourceeditor-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchinsights.yaml deleted file mode 100644 index ce456390..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: ElasticsearchInsight - k8s.io/resource: elasticsearchinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-elasticsearchinsights -spec: - resource: - group: ui.kubedb.com - kind: ElasticsearchInsight - name: elasticsearchinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-elasticsearchinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchnodesstats.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchnodesstats.yaml deleted file mode 100644 index 30875cbd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchnodesstats.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: ElasticsearchNodesStats - k8s.io/resource: elasticsearchnodesstats - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-elasticsearchnodesstats -spec: - resource: - group: ui.kubedb.com - kind: ElasticsearchNodesStats - name: elasticsearchnodesstats - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-elasticsearchnodesstats-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchschemaoverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchschemaoverviews.yaml deleted file mode 100644 index fd59ef2e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/elasticsearchschemaoverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: ElasticsearchSchemaOverview - k8s.io/resource: elasticsearchschemaoverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-elasticsearchschemaoverviews -spec: - resource: - group: ui.kubedb.com - kind: ElasticsearchSchemaOverview - name: elasticsearchschemaoverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-elasticsearchschemaoverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbinsights.yaml deleted file mode 100644 index eab8ffa1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MariaDBInsight - k8s.io/resource: mariadbinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mariadbinsights -spec: - resource: - group: ui.kubedb.com - kind: MariaDBInsight - name: mariadbinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mariadbinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbqueries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbqueries.yaml deleted file mode 100644 index 6d5d868f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbqueries.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MariaDBQueries - k8s.io/resource: mariadbqueries - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mariadbqueries -spec: - resource: - group: ui.kubedb.com - kind: MariaDBQueries - name: mariadbqueries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mariadbqueries-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbschemaoverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbschemaoverviews.yaml deleted file mode 100644 index 07570c0f..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mariadbschemaoverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MariaDBSchemaOverview - k8s.io/resource: mariadbschemaoverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mariadbschemaoverviews -spec: - resource: - group: ui.kubedb.com - kind: MariaDBSchemaOverview - name: mariadbschemaoverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mariadbschemaoverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbinsights.yaml deleted file mode 100644 index e3d053cd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MongoDBInsight - k8s.io/resource: mongodbinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mongodbinsights -spec: - resource: - group: ui.kubedb.com - kind: MongoDBInsight - name: mongodbinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mongodbinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbqueries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbqueries.yaml deleted file mode 100644 index 58686ec2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbqueries.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MongoDBQueries - k8s.io/resource: mongodbqueries - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mongodbqueries -spec: - resource: - group: ui.kubedb.com - kind: MongoDBQueries - name: mongodbqueries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mongodbqueries-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbschemaoverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbschemaoverviews.yaml deleted file mode 100644 index 6248430a..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mongodbschemaoverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MongoDBSchemaOverview - k8s.io/resource: mongodbschemaoverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mongodbschemaoverviews -spec: - resource: - group: ui.kubedb.com - kind: MongoDBSchemaOverview - name: mongodbschemaoverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mongodbschemaoverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlinsights.yaml deleted file mode 100644 index 809b83b1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MySQLInsight - k8s.io/resource: mysqlinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mysqlinsights -spec: - resource: - group: ui.kubedb.com - kind: MySQLInsight - name: mysqlinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mysqlinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlqueries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlqueries.yaml deleted file mode 100644 index 0fe1bbee..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlqueries.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MySQLQueries - k8s.io/resource: mysqlqueries - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mysqlqueries -spec: - resource: - group: ui.kubedb.com - kind: MySQLQueries - name: mysqlqueries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mysqlqueries-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlschemaoverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlschemaoverviews.yaml deleted file mode 100644 index 1187e805..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/mysqlschemaoverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: MySQLSchemaOverview - k8s.io/resource: mysqlschemaoverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-mysqlschemaoverviews -spec: - resource: - group: ui.kubedb.com - kind: MySQLSchemaOverview - name: mysqlschemaoverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-mysqlschemaoverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerinsights.yaml deleted file mode 100644 index ccb10ecc..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PgBouncerInsight - k8s.io/resource: pgbouncerinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-pgbouncerinsights -spec: - resource: - group: ui.kubedb.com - kind: PgBouncerInsight - name: pgbouncerinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-pgbouncerinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerpooloverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerpooloverviews.yaml deleted file mode 100644 index 8e6c9ea0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerpooloverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PgBouncerPoolOverview - k8s.io/resource: pgbouncerpooloverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-pgbouncerpooloverviews -spec: - resource: - group: ui.kubedb.com - kind: PgBouncerPoolOverview - name: pgbouncerpooloverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-pgbouncerpooloverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerpools.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerpools.yaml deleted file mode 100644 index 7b2e26ae..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerpools.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PgBouncerPools - k8s.io/resource: pgbouncerpools - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-pgbouncerpools -spec: - resource: - group: ui.kubedb.com - kind: PgBouncerPools - name: pgbouncerpools - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-pgbouncerpools-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerserveroverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerserveroverviews.yaml deleted file mode 100644 index 221f3665..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncerserveroverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PgBouncerServerOverview - k8s.io/resource: pgbouncerserveroverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-pgbouncerserveroverviews -spec: - resource: - group: ui.kubedb.com - kind: PgBouncerServerOverview - name: pgbouncerserveroverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-pgbouncerserveroverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncersettings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncersettings.yaml deleted file mode 100644 index 5ea5928b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/pgbouncersettings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PgBouncerSettings - k8s.io/resource: pgbouncersettings - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-pgbouncersettings -spec: - resource: - group: ui.kubedb.com - kind: PgBouncerSettings - name: pgbouncersettings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-pgbouncersettings-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresinsights.yaml deleted file mode 100644 index a4628131..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PostgresInsight - k8s.io/resource: postgresinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-postgresinsights -spec: - resource: - group: ui.kubedb.com - kind: PostgresInsight - name: postgresinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-postgresinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresqueries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresqueries.yaml deleted file mode 100644 index bd30bdbd..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresqueries.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PostgresQueries - k8s.io/resource: postgresqueries - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-postgresqueries -spec: - resource: - group: ui.kubedb.com - kind: PostgresQueries - name: postgresqueries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-postgresqueries-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresschemaoverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresschemaoverviews.yaml deleted file mode 100644 index 46a580e3..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgresschemaoverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PostgresSchemaOverview - k8s.io/resource: postgresschemaoverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-postgresschemaoverviews -spec: - resource: - group: ui.kubedb.com - kind: PostgresSchemaOverview - name: postgresschemaoverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-postgresschemaoverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgressettings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgressettings.yaml deleted file mode 100644 index 58845d7e..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/postgressettings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: PostgresSettings - k8s.io/resource: postgressettings - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-postgressettings -spec: - resource: - group: ui.kubedb.com - kind: PostgresSettings - name: postgressettings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-postgressettings-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlinsights.yaml deleted file mode 100644 index 5906041b..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: ProxySQLInsight - k8s.io/resource: proxysqlinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-proxysqlinsights -spec: - resource: - group: ui.kubedb.com - kind: ProxySQLInsight - name: proxysqlinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-proxysqlinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlqueries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlqueries.yaml deleted file mode 100644 index 66bc8b01..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlqueries.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: ProxySQLQueries - k8s.io/resource: proxysqlqueries - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-proxysqlqueries -spec: - resource: - group: ui.kubedb.com - kind: ProxySQLQueries - name: proxysqlqueries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-proxysqlqueries-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlsettings.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlsettings.yaml deleted file mode 100644 index f11710f6..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/proxysqlsettings.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: ProxySQLSettings - k8s.io/resource: proxysqlsettings - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-proxysqlsettings -spec: - resource: - group: ui.kubedb.com - kind: ProxySQLSettings - name: proxysqlsettings - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-proxysqlsettings-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisinsights.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisinsights.yaml deleted file mode 100644 index cb60ada0..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisinsights.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: RedisInsight - k8s.io/resource: redisinsights - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-redisinsights -spec: - resource: - group: ui.kubedb.com - kind: RedisInsight - name: redisinsights - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-redisinsight-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisqueries.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisqueries.yaml deleted file mode 100644 index 3f5df2f2..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisqueries.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: RedisQueries - k8s.io/resource: redisqueries - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-redisqueries -spec: - resource: - group: ui.kubedb.com - kind: RedisQueries - name: redisqueries - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-redisqueries-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisschemaoverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisschemaoverviews.yaml deleted file mode 100644 index a062c66c..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.kubedb.com/v1alpha1/redisschemaoverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.kubedb.com - k8s.io/kind: RedisSchemaOverview - k8s.io/resource: redisschemaoverviews - k8s.io/version: v1alpha1 - name: ui.kubedb.com-v1alpha1-redisschemaoverviews -spec: - resource: - group: ui.kubedb.com - kind: RedisSchemaOverview - name: redisschemaoverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uikubedbcom-redisschemaoverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.stash.appscode.com/v1alpha1/backupoverviews.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.stash.appscode.com/v1alpha1/backupoverviews.yaml deleted file mode 100644 index d384e677..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/ui.stash.appscode.com/v1alpha1/backupoverviews.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: ui.stash.appscode.com - k8s.io/kind: BackupOverview - k8s.io/resource: backupoverviews - k8s.io/version: v1alpha1 - name: ui.stash.appscode.com-v1alpha1-backupoverviews -spec: - resource: - group: ui.stash.appscode.com - kind: BackupOverview - name: backupoverviews - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: uistashappscodecom-backupoverview-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/voyager.appscode.com/v1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/voyager.appscode.com/v1/ingresses.yaml deleted file mode 100644 index 9c5bc565..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/voyager.appscode.com/v1/ingresses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: voyager.appscode.com - k8s.io/kind: Ingress - k8s.io/resource: ingresses - k8s.io/version: v1 - name: voyager.appscode.com-v1-ingresses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/voyager.appscode.com/ingresses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/voyager.appscode.com/ingresses.png - type: image/png - resource: - group: voyager.appscode.com - kind: Ingress - name: ingresses - scope: Namespaced - version: v1 - ui: - editor: - name: voyagerappscodecom-ingress-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/voyager.appscode.com/v1beta1/ingresses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/voyager.appscode.com/v1beta1/ingresses.yaml deleted file mode 100644 index 15abddb1..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/voyager.appscode.com/v1beta1/ingresses.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: voyager.appscode.com - k8s.io/kind: Ingress - k8s.io/resource: ingresses - k8s.io/version: v1beta1 - name: voyager.appscode.com-v1beta1-ingresses -spec: - icons: - - src: https://cdn.appscode.com/k8s/icons/voyager.appscode.com/ingresses.svg - type: image/svg+xml - - src: https://cdn.appscode.com/k8s/icons/voyager.appscode.com/ingresses.png - type: image/png - resource: - group: voyager.appscode.com - kind: Ingress - name: ingresses - scope: Namespaced - version: v1beta1 - ui: - editor: - name: voyagerappscodecom-ingress-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1/appliedmanifestworks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1/appliedmanifestworks.yaml deleted file mode 100644 index 88fdffed..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1/appliedmanifestworks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: work.open-cluster-management.io - k8s.io/kind: AppliedManifestWork - k8s.io/resource: appliedmanifestworks - k8s.io/version: v1 - name: work.open-cluster-management.io-v1-appliedmanifestworks -spec: - resource: - group: work.open-cluster-management.io - kind: AppliedManifestWork - name: appliedmanifestworks - scope: Cluster - version: v1 - ui: - editor: - name: workopenclustermanagementio-appliedmanifestwork-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1/manifestworks.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1/manifestworks.yaml deleted file mode 100644 index e916d4a7..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1/manifestworks.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: work.open-cluster-management.io - k8s.io/kind: ManifestWork - k8s.io/resource: manifestworks - k8s.io/version: v1 - name: work.open-cluster-management.io-v1-manifestworks -spec: - resource: - group: work.open-cluster-management.io - kind: ManifestWork - name: manifestworks - scope: Namespaced - version: v1 - ui: - editor: - name: workopenclustermanagementio-manifestwork-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml deleted file mode 100644 index 6e22beb5..00000000 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/work.open-cluster-management.io/v1alpha1/manifestworkreplicasets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: ui.k8s.appscode.com/v1alpha1 -kind: ResourceEditor -metadata: - creationTimestamp: null - labels: - k8s.io/group: work.open-cluster-management.io - k8s.io/kind: ManifestWorkReplicaSet - k8s.io/resource: manifestworkreplicasets - k8s.io/version: v1alpha1 - name: work.open-cluster-management.io-v1alpha1-manifestworkreplicasets -spec: - resource: - group: work.open-cluster-management.io - kind: ManifestWorkReplicaSet - name: manifestworkreplicasets - scope: Namespaced - version: v1alpha1 - ui: - editor: - name: workopenclustermanagementio-manifestworkreplicaset-editor - sourceRef: - apiGroup: source.toolkit.fluxcd.io - kind: HelmRepository - name: appscode-charts-oci - version: v0.4.18 - enforceQuota: false diff --git a/vendor/kubepack.dev/lib-helm/LICENSE b/vendor/kubepack.dev/lib-helm/LICENSE deleted file mode 100644 index 261eeb9e..00000000 --- a/vendor/kubepack.dev/lib-helm/LICENSE +++ /dev/null @@ -1,201 +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/kubepack.dev/lib-helm/pkg/values/diff.go b/vendor/kubepack.dev/lib-helm/pkg/values/diff.go deleted file mode 100644 index 0a5d74d8..00000000 --- a/vendor/kubepack.dev/lib-helm/pkg/values/diff.go +++ /dev/null @@ -1,276 +0,0 @@ -package values - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "sort" - "strings" - - "github.com/alessio/shellescape" - kj "gomodules.xyz/encoding/json" - "sigs.k8s.io/yaml" -) - -func GetValuesMapDiff(original, modified map[string]any) (map[string]any, error) { - return getValuesDiff(original, modified, "", nil) -} - -func getValuesDiff(original, modified map[string]any, prefix string, diff map[string]any) (map[string]any, error) { - if diff == nil { - diff = map[string]any{} - } - - for k, v := range modified { - curKey := "" - if prefix == "" { - curKey = escapeKey(k) - } else { - curKey = prefix + "." + escapeKey(k) - } - - switch val := v.(type) { - case map[string]any: - oVal, ok := original[k].(map[string]any) - if !ok { - oVal = map[string]any{} - } - - d2, err := getValuesDiff(oVal, val, curKey, nil) - if err != nil { - return nil, err - } - if len(d2) > 0 { - diff[k] = d2 - } - case []any, string, int8, uint8, int16, uint16, int32, uint32, int64, uint64, int, uint, float32, float64, bool, json.Number, nil: - if !reflect.DeepEqual(original[k], val) { - diff[k] = val - } - default: - return nil, fmt.Errorf("unknown type %v with value %v", reflect.TypeOf(v), v) - } - } - - // https://github.com/kubepack/lib-helm/blob/32de2acacbfb84f57d4a66c6d896360eb664399c/pkg/values/options.go#L133 - for k, v := range original { - if _, found := modified[k]; !found { - curKey := "" - if prefix == "" { - curKey = escapeKey(k) - } else { - curKey = prefix + "." + escapeKey(k) - } - - // TODO: how does Helm merge --values remove keys? - // diff[k] = nil - return nil, fmt.Errorf("key %s is missing in the modified values, original values %v", curKey, v) - } - } - return diff, nil -} - -func GetValuesDiff(orig, od any) (map[string]any, error) { - origMap, err := toJson(orig) - if err != nil { - return nil, err - } - modMap, err := toJson(od) - if err != nil { - return nil, err - } - - return GetValuesMapDiff(origMap, modMap) -} - -func GetValuesDiffYAML(orig, od any) ([]byte, error) { - origMap, err := toJson(orig) - if err != nil { - return nil, err - } - modMap, err := toJson(od) - if err != nil { - return nil, err - } - - diff, err := GetValuesMapDiff(origMap, modMap) - if err != nil { - return nil, err - } - return yaml.Marshal(diff) -} - -func GetValuesDiffJson(orig, od any) ([]byte, error) { - origMap, err := toJson(orig) - if err != nil { - return nil, err - } - modMap, err := toJson(od) - if err != nil { - return nil, err - } - - diff, err := GetValuesMapDiff(origMap, modMap) - if err != nil { - return nil, err - } - return json.Marshal(diff) -} - -func toJson(v any) (map[string]any, error) { - data, err := kj.Marshal(v) - if err != nil { - return nil, err - } - var out map[string]any - err = kj.Unmarshal(data, &out) - if err != nil { - return nil, err - } - return out, nil -} - -func GetChangedValues(original, modified map[string]any) ([]string, error) { - cmds, err := getChangedValues(original, modified, "", nil) - if err != nil { - return nil, err - } - sort.Strings(cmds) - return cmds, nil -} - -func getChangedValues(original, modified map[string]any, prefix string, cmds []string) ([]string, error) { - for k, v := range modified { - curKey := "" - if prefix == "" { - curKey = escapeKey(k) - } else { - curKey = prefix + "." + escapeKey(k) - } - - switch val := v.(type) { - case map[string]any: - oVal, ok := original[k].(map[string]any) - if !ok { - oVal = map[string]any{} - } - next, err := getChangedValues(oVal, val, curKey, nil) - if err != nil { - return nil, err - } - cmds = append(cmds, next...) - case []any: - if !reflect.DeepEqual(v, original[k]) { - if len(val) == 0 { - cmds = append(cmds, fmt.Sprintf("%s=null", curKey)) - continue - } - - if isSimpleArray(val) { - s, err := PrintArray(val) - if err != nil { - return nil, fmt.Errorf("failed to print simple array %v, reason: %v", v, err) - } - cmds = append(cmds, fmt.Sprintf("%s=%s", curKey, s)) - continue - } - - for i, element := range val { - em, ok := element.(map[string]any) - if !ok { - return nil, fmt.Errorf("%s[%d] element is not a map", curKey, i) - } - next, err := getChangedValues(map[string]any{}, em, fmt.Sprintf("%s[%d]", curKey, i), nil) - if err != nil { - return nil, err - } - cmds = append(cmds, next...) - } - } - case string: - if !reflect.DeepEqual(original[k], val) { - cmds = append(cmds, fmt.Sprintf("%s=%v", curKey, escapeValue(val))) - } - case int8, uint8, int16, uint16, int32, uint32, int64, uint64, int, uint, float32, float64, bool, json.Number: - if !reflect.DeepEqual(original[k], val) { - cmds = append(cmds, fmt.Sprintf("%s=%v", curKey, val)) - } - case nil: - if !reflect.DeepEqual(original[k], val) { - cmds = append(cmds, fmt.Sprintf("%s=null", curKey)) - } - default: - return nil, fmt.Errorf("unknown type %v with value %v", reflect.TypeOf(v), v) - } - } - - for k := range original { - if _, found := modified[k]; !found { - curKey := "" - if prefix == "" { - curKey = escapeKey(k) - } else { - curKey = prefix + "." + escapeKey(k) - } - - cmds = append(cmds, fmt.Sprintf("%s=null", curKey)) - } - } - return cmds, nil -} - -// kubernetes.io/role becomes "kubernetes\.io/role" -func escapeKey(s string) string { - return shellescape.Quote(strings.ReplaceAll(strings.ReplaceAll(s, `\`, `\\`), `.`, `\.`)) -} - -// "value1,value2" becomes value1\,value2 -func escapeValue(s string) string { - return shellescape.Quote(strings.ReplaceAll(strings.ReplaceAll(s, `\`, `\\`), `,`, `\,`)) -} - -func isSimpleArray(a []any) bool { - for i := range a { - switch a[i].(type) { - case string, int8, uint8, int16, uint16, int32, uint32, int64, uint64, int, uint, float32, float64, bool, nil, json.Number: - default: - return false - } - } - return true -} - -func PrintArray(a []any) (string, error) { - var buf bytes.Buffer - buf.WriteRune('{') - for i := range a { - switch v := a[i].(type) { - case string: - if i > 0 { - buf.WriteString(", ") - } - _, err := fmt.Fprint(&buf, escapeValue(v)) - if err != nil { - return "", err - } - case int8, uint8, int16, uint16, int32, uint32, int64, uint64, int, uint, float32, float64, bool, json.Number: - if i > 0 { - buf.WriteString(", ") - } - _, err := fmt.Fprint(&buf, v) - if err != nil { - return "", err - } - case nil: - if i > 0 { - buf.WriteString(", ") - } - buf.WriteString("null") - default: - return "", fmt.Errorf("[%d] holds a complex type %v", i, reflect.TypeOf(a[i])) - } - } - buf.WriteRune('}') - return buf.String(), nil -} diff --git a/vendor/kubepack.dev/lib-helm/pkg/values/options.go b/vendor/kubepack.dev/lib-helm/pkg/values/options.go deleted file mode 100644 index 1db35497..00000000 --- a/vendor/kubepack.dev/lib-helm/pkg/values/options.go +++ /dev/null @@ -1,150 +0,0 @@ -package values - -import ( - "encoding/json" - "fmt" - "strings" - - jsonpatch "github.com/evanphx/json-patch" - "github.com/pkg/errors" - "helm.sh/helm/v3/pkg/chart" - "helm.sh/helm/v3/pkg/chartutil" - "helm.sh/helm/v3/pkg/strvals" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/yaml" -) - -/* -- If ReplaceValues != nil, then just use that values as=is -- else -- if ValuesPatch != nil, then apply patch to the ValuesFile and use the generated values -- else coalesce the StringValues and Values into ValuesFile and use those as the final values. - -See also: https://github.com/helm/helm/blob/v3.5.4/pkg/cli/values/options.go#L39-L86 -*/ -type Options struct { - ReplaceValues map[string]interface{} `json:"replaceValues"` - ValuesFile string `json:"valuesFile"` - ValuesPatch *runtime.RawExtension `json:"valuesPatch"` - ValueBytes [][]byte `json:"valueBytes"` - StringValues []string `json:"stringValues"` - Values []string `json:"values"` - KVPairs []KV `json:"kv_pairs"` -} - -type KV struct { - K string - V interface{} -} - -// MergeValues merges values from files specified via -f/--values and directly -// via --set, --set-string, or --set-file, marshaling them to YAML -func (opts *Options) MergeValues(chrt *chart.Chart) (map[string]interface{}, error) { - // Note that len(opts.ReplaceValues) == 0 will be considered a valid replacement - if opts.ReplaceValues != nil { - return opts.ReplaceValues, nil - } - - if opts.ValuesFile == "" { - opts.ValuesFile = chartutil.ValuesfileName - } - - var baseFile *chart.File - for _, f := range chrt.Raw { - if f.Name == opts.ValuesFile { - baseFile = f - break - } - } - if baseFile == nil { - return nil, fmt.Errorf("can't find values file %s", opts.ValuesFile) - } - - if opts.ValuesPatch != nil { - patchData, err := json.Marshal(opts.ValuesPatch) - if err != nil { - return nil, err - } - patch, err := jsonpatch.DecodePatch(patchData) - if err != nil { - return nil, err - } - - baseBytes, err := yaml.YAMLToJSON(baseFile.Data) - if err != nil { - return nil, fmt.Errorf("failed to convert values file %s to json, reason %v", opts.ValuesFile, err) - } - valuesBytes, err := patch.Apply(baseBytes) - if err != nil { - return nil, err - } - - vals := map[string]interface{}{} - err = json.Unmarshal(valuesBytes, &vals) - if err != nil { - return nil, err - } - - return vals, nil - } - - // Use StringValues, Values flags - base := map[string]interface{}{} - if err := yaml.Unmarshal(baseFile.Data, &base); err != nil { - return nil, errors.Wrapf(err, "failed to parse %s", opts.ValuesFile) - } - - // User specified a values files via -f/--values - for _, bytes := range opts.ValueBytes { - currentMap := map[string]interface{}{} - - if err := yaml.Unmarshal(bytes, ¤tMap); err != nil { - return nil, errors.Wrapf(err, "failed to parse %s", bytes) - } - // Merge with the previous map - base = mergeMaps(base, currentMap) - } - - // User specified a value via --set - for _, value := range opts.Values { - if err := strvals.ParseInto(value, base); err != nil { - return nil, errors.Wrap(err, "failed parsing --set data") - } - } - - // User specified a value via --set-string - for _, value := range opts.StringValues { - if err := strvals.ParseIntoString(value, base); err != nil { - return nil, errors.Wrap(err, "failed parsing --set-string data") - } - } - - for _, kv := range opts.KVPairs { - err := unstructured.SetNestedField(base, kv.V, strings.Split(kv.K, ".")...) - if err != nil { - return nil, err - } - } - - return base, nil -} - -func mergeMaps(a, b map[string]interface{}) map[string]interface{} { - out := make(map[string]interface{}, len(a)) - for k, v := range a { - out[k] = v - } - for k, v := range b { - if v, ok := v.(map[string]interface{}); ok { - if bv, ok := out[k]; ok { - if bv, ok := bv.(map[string]interface{}); ok { - out[k] = mergeMaps(bv, v) - continue - } - } - } - out[k] = v - } - return out -} diff --git a/vendor/kubepack.dev/lib-helm/pkg/values/preset.go b/vendor/kubepack.dev/lib-helm/pkg/values/preset.go deleted file mode 100644 index 1f1b1948..00000000 --- a/vendor/kubepack.dev/lib-helm/pkg/values/preset.go +++ /dev/null @@ -1,209 +0,0 @@ -package values - -import ( - "context" - "sort" - - "github.com/pkg/errors" - "helm.sh/helm/v3/pkg/chart" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - kmapi "kmodules.xyz/client-go/api/v1" - clustermeta "kmodules.xyz/client-go/cluster" - uiapi "kmodules.xyz/resource-metadata/apis/ui/v1alpha1" - "kmodules.xyz/resource-metadata/hub/resourceeditors" - "sigs.k8s.io/controller-runtime/pkg/client" - chartsapi "x-helm.dev/apimachinery/apis/charts/v1alpha1" -) - -func LoadPresetValues(kc client.Client, ref chartsapi.ChartPresetFlatRef) ([]chartsapi.ChartPresetValues, error) { - if ref.Variant == "" { - // required for editor charts - return nil, nil - } - - rid := &kmapi.ResourceID{ - Group: ref.Group, - Name: ref.Resource, - Kind: ref.Kind, - } - rid, err := kmapi.ExtractResourceID(kc.RESTMapper(), *rid) - if err != nil { - return nil, errors.Wrapf(err, "failed to detect resource ID for %#v", *rid) - } - ed, ok := resourceeditors.LoadByGVR(kc, rid.GroupVersionResource()) - if !ok { - return nil, errors.Errorf("failed to detect ResourceEditor for %#v", rid.GroupVersionResource()) - } - - var variant *uiapi.VariantRef - for i := range ed.Spec.Variants { - if ed.Spec.Variants[i].Name == ref.Variant { - variant = &ed.Spec.Variants[i] - break - } - } - if variant == nil { - return nil, errors.Errorf("No variant with name %s found for %+v", ref.Variant, *rid) - } - - if variant.Selector == nil { - return nil, nil - } - sel, err := metav1.LabelSelectorAsSelector(variant.Selector) - if err != nil { - return nil, err - } - - if ref.Namespace == "" { - return bundleClusterChartPresets(kc, sel, nil) - } - - values, err := bundleChartPresets(kc, ref.Namespace, sel, nil) - if err != nil { - return nil, err - } - knownPresets := map[string]bool{} // true => cp, false => ccp - for _, v := range values { - knownPresets[v.Source.Ref.Name] = true - } - - if clustermeta.IsRancherManaged(kc.RESTMapper()) { - projectId, found, err := clustermeta.GetProjectId(kc, ref.Namespace) - if err != nil { - return nil, err - } - if !found { - // NS not in a project. So, just add the extra CCPs - ccps, err := bundleClusterChartPresets(kc, sel, knownPresets) - if err != nil { - return nil, err - } - values = append(ccps, values...) - return values, nil - } - - nsList, err := clustermeta.ListProjectNamespaces(kc, projectId) - if err != nil { - return nil, err - } - projectPresets := map[string]bool{} // true => cp, false => ccp - namespaces := clustermeta.Names(nsList) - for i := len(namespaces) - 1; i >= 0; i-- { - if namespaces[i] == ref.Namespace { - continue - } - - nsPresets, err := bundleChartPresets(kc, namespaces[i], sel, knownPresets) - if err != nil { - return nil, err - } - for _, v := range nsPresets { - projectPresets[v.Source.Ref.Name] = true - } - values = append(nsPresets, values...) - } - // mark project presets as known - for k, v := range projectPresets { - knownPresets[k] = v - } - - ccps, err := bundleClusterChartPresets(kc, sel, knownPresets) - if err != nil { - return nil, err - } - values = append(ccps, values...) - } else { - ccps, err := bundleClusterChartPresets(kc, sel, knownPresets) - if err != nil { - return nil, err - } - values = append(ccps, values...) - } - - return values, nil -} - -func bundleChartPresets(kc client.Client, ns string, sel labels.Selector, knownPresets map[string]bool) ([]chartsapi.ChartPresetValues, error) { - var list chartsapi.ChartPresetList - err := kc.List(context.TODO(), &list, client.InNamespace(ns), client.MatchingLabelsSelector{Selector: sel}) - if err != nil { - return nil, err - } - cps := list.Items - sort.Slice(cps, func(i, j int) bool { - return cps[i].Name < cps[j].Name - }) - - values := make([]chartsapi.ChartPresetValues, 0, len(cps)) - for _, cp := range cps { - if _, exists := knownPresets[cp.Name]; exists { - continue - } - - values = append(values, chartsapi.ChartPresetValues{ - Source: chartsapi.SourceLocator{ - Resource: kmapi.ResourceID{ - Group: chartsapi.GroupVersion.Group, - Version: chartsapi.GroupVersion.Version, - Kind: chartsapi.ResourceKindChartPreset, - }, - Ref: kmapi.ObjectReference{ - Namespace: cp.Namespace, - Name: cp.Namespace, - }, - }, - Values: cp.Spec.Values, - }) - } - return values, err -} - -func bundleClusterChartPresets(kc client.Client, sel labels.Selector, knownPresets map[string]bool) ([]chartsapi.ChartPresetValues, error) { - var list chartsapi.ClusterChartPresetList - err := kc.List(context.TODO(), &list, client.MatchingLabelsSelector{Selector: sel}) - if err != nil { - return nil, err - } - - ccps := list.Items - sort.Slice(ccps, func(i, j int) bool { - return ccps[i].Name < ccps[j].Name - }) - - values := make([]chartsapi.ChartPresetValues, 0, len(ccps)) - for _, ccp := range ccps { - if _, exists := knownPresets[ccp.Name]; exists { - continue - } - - values = append(values, chartsapi.ChartPresetValues{ - Source: chartsapi.SourceLocator{ - Resource: kmapi.ResourceID{ - Group: chartsapi.GroupVersion.Group, - Version: chartsapi.GroupVersion.Version, - Kind: chartsapi.ResourceKindClusterChartPreset, - }, - Ref: kmapi.ObjectReference{ - Namespace: ccp.Namespace, - Name: ccp.Namespace, - }, - }, - Values: ccp.Spec.Values, - }) - } - return values, nil -} - -func MergePresetValues(kc client.Client, chrt *chart.Chart, ref chartsapi.ChartPresetFlatRef) (map[string]interface{}, error) { - presets, err := LoadPresetValues(kc, ref) - if err != nil { - return nil, err - } - - var valOpts Options - for _, preset := range presets { - valOpts.ValueBytes = append(valOpts.ValueBytes, preset.Values.Raw) - } - return valOpts.MergeValues(chrt) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 8e891003..4576fd66 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -14,9 +14,6 @@ github.com/Masterminds/sprig/v3 # github.com/NYTimes/gziphandler v1.1.1 ## explicit; go 1.11 github.com/NYTimes/gziphandler -# github.com/alessio/shellescape v1.4.1 -## explicit; go 1.14 -github.com/alessio/shellescape # github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df ## explicit; go 1.18 github.com/antlr/antlr4/runtime/Go/antlr/v4 @@ -35,10 +32,6 @@ github.com/cenkalti/backoff/v4 # github.com/cespare/xxhash/v2 v2.2.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 -# github.com/containerd/stargz-snapshotter/estargz v0.14.3 -## explicit; go 1.19 -github.com/containerd/stargz-snapshotter/estargz -github.com/containerd/stargz-snapshotter/estargz/errorutil # github.com/coreos/go-semver v0.3.1 ## explicit; go 1.8 github.com/coreos/go-semver/semver @@ -52,22 +45,6 @@ github.com/cyphar/filepath-securejoin # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew -# github.com/docker/cli v24.0.7+incompatible -## explicit -github.com/docker/cli/cli/config -github.com/docker/cli/cli/config/configfile -github.com/docker/cli/cli/config/credentials -github.com/docker/cli/cli/config/types -# github.com/docker/distribution v2.8.3+incompatible -## explicit -github.com/docker/distribution/registry/client/auth/challenge -# github.com/docker/docker v24.0.7+incompatible -## explicit -github.com/docker/docker/pkg/homedir -# github.com/docker/docker-credential-helpers v0.8.0 -## explicit; go 1.19 -github.com/docker/docker-credential-helpers/client -github.com/docker/docker-credential-helpers/credentials # github.com/dustin/go-humanize v1.0.1 ## explicit; go 1.16 github.com/dustin/go-humanize @@ -139,6 +116,8 @@ github.com/golang/protobuf/ptypes github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp +# github.com/google/btree v1.1.2 +## explicit; go 1.18 # github.com/google/cel-go v0.17.7 ## explicit; go 1.18 github.com/google/cel-go/cel @@ -177,36 +156,6 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/go-containerregistry v0.17.0 -## explicit; go 1.18 -github.com/google/go-containerregistry/internal/and -github.com/google/go-containerregistry/internal/compression -github.com/google/go-containerregistry/internal/estargz -github.com/google/go-containerregistry/internal/gzip -github.com/google/go-containerregistry/internal/redact -github.com/google/go-containerregistry/internal/retry -github.com/google/go-containerregistry/internal/retry/wait -github.com/google/go-containerregistry/internal/verify -github.com/google/go-containerregistry/internal/windows -github.com/google/go-containerregistry/internal/zstd -github.com/google/go-containerregistry/pkg/authn -github.com/google/go-containerregistry/pkg/compression -github.com/google/go-containerregistry/pkg/crane -github.com/google/go-containerregistry/pkg/legacy -github.com/google/go-containerregistry/pkg/legacy/tarball -github.com/google/go-containerregistry/pkg/logs -github.com/google/go-containerregistry/pkg/name -github.com/google/go-containerregistry/pkg/v1 -github.com/google/go-containerregistry/pkg/v1/empty -github.com/google/go-containerregistry/pkg/v1/layout -github.com/google/go-containerregistry/pkg/v1/match -github.com/google/go-containerregistry/pkg/v1/mutate -github.com/google/go-containerregistry/pkg/v1/partial -github.com/google/go-containerregistry/pkg/v1/remote -github.com/google/go-containerregistry/pkg/v1/remote/transport -github.com/google/go-containerregistry/pkg/v1/stream -github.com/google/go-containerregistry/pkg/v1/tarball -github.com/google/go-containerregistry/pkg/v1/types # github.com/google/gofuzz v1.2.0 ## explicit; go 1.12 github.com/google/gofuzz @@ -241,15 +190,6 @@ github.com/josharian/intern # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/klauspost/compress v1.17.0 -## explicit; go 1.18 -github.com/klauspost/compress -github.com/klauspost/compress/fse -github.com/klauspost/compress/huff0 -github.com/klauspost/compress/internal/cpuinfo -github.com/klauspost/compress/internal/snapref -github.com/klauspost/compress/zstd -github.com/klauspost/compress/zstd/internal/xxhash # github.com/klauspost/cpuid/v2 v2.0.9 ## explicit; go 1.13 github.com/klauspost/cpuid/v2 @@ -266,9 +206,6 @@ github.com/matttproud/golang_protobuf_extensions/v2/pbutil # github.com/mitchellh/copystructure v1.2.0 ## explicit; go 1.15 github.com/mitchellh/copystructure -# github.com/mitchellh/go-homedir v1.1.0 -## explicit -github.com/mitchellh/go-homedir # github.com/mitchellh/mapstructure v1.5.0 ## explicit; go 1.14 github.com/mitchellh/mapstructure @@ -284,13 +221,8 @@ github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg -# github.com/opencontainers/go-digest v1.0.0 +# github.com/nxadm/tail v1.4.11 ## explicit; go 1.13 -github.com/opencontainers/go-digest -# github.com/opencontainers/image-spec v1.1.0-rc5 -## explicit; go 1.18 -github.com/opencontainers/image-spec/specs-go -github.com/opencontainers/image-spec/specs-go/v1 # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors @@ -326,9 +258,6 @@ github.com/sergi/go-diff/diffmatchpatch # github.com/shopspring/decimal v1.3.1 ## explicit; go 1.13 github.com/shopspring/decimal -# github.com/sirupsen/logrus v1.9.3 -## explicit; go 1.13 -github.com/sirupsen/logrus # github.com/spf13/cast v1.5.0 ## explicit; go 1.18 github.com/spf13/cast @@ -341,9 +270,6 @@ github.com/spf13/pflag # github.com/stoewer/go-strcase v1.2.0 ## explicit; go 1.11 github.com/stoewer/go-strcase -# github.com/vbatts/tar-split v0.11.5 -## explicit; go 1.17 -github.com/vbatts/tar-split/archive/tar # github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb ## explicit github.com/xeipuuv/gojsonpointer @@ -491,12 +417,10 @@ golang.org/x/oauth2 golang.org/x/oauth2/internal # golang.org/x/sync v0.5.0 ## explicit; go 1.18 -golang.org/x/sync/errgroup golang.org/x/sync/singleflight # golang.org/x/sys v0.16.0 ## explicit; go 1.18 golang.org/x/sys/cpu -golang.org/x/sys/execabs golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows @@ -539,12 +463,6 @@ gomodules.xyz/jsonpath/third_party/forked/golang/template # gomodules.xyz/mergo v0.3.13 ## explicit; go 1.13 gomodules.xyz/mergo -# gomodules.xyz/sets v0.2.1 -## explicit; go 1.14 -gomodules.xyz/sets -# gomodules.xyz/x v0.0.15 -## explicit; go 1.18 -gomodules.xyz/x/ioutil # google.golang.org/appengine v1.6.8 ## explicit; go 1.11 google.golang.org/appengine/internal @@ -683,7 +601,6 @@ helm.sh/helm/v3/pkg/engine helm.sh/helm/v3/pkg/ignore helm.sh/helm/v3/pkg/release helm.sh/helm/v3/pkg/releaseutil -helm.sh/helm/v3/pkg/strvals helm.sh/helm/v3/pkg/time # k8s.io/api v0.29.1 ## explicit; go 1.21 @@ -1288,31 +1205,16 @@ k8s.io/utils/pointer k8s.io/utils/ptr k8s.io/utils/strings/slices k8s.io/utils/trace -# kmodules.xyz/client-go v0.29.9 +# kmodules.xyz/client-go v0.29.12 ## explicit; go 1.21.5 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1 kmodules.xyz/client-go/apiextensions kmodules.xyz/client-go/apiextensions/v1 -kmodules.xyz/client-go/cluster kmodules.xyz/client-go/meta -kmodules.xyz/client-go/tools/clusterid -# kmodules.xyz/go-containerregistry v0.0.12 -## explicit; go 1.21.5 -kmodules.xyz/go-containerregistry/name -# kmodules.xyz/resource-metadata v0.18.2-0.20240205132124-d5898b9bd3c1 -## explicit; go 1.21.5 -kmodules.xyz/resource-metadata/apis/shared -kmodules.xyz/resource-metadata/apis/ui -kmodules.xyz/resource-metadata/apis/ui/v1alpha1 -kmodules.xyz/resource-metadata/crds -kmodules.xyz/resource-metadata/hub/resourceeditors # kmodules.xyz/schema-checker v0.4.1 ## explicit; go 1.17 kmodules.xyz/schema-checker -# kubepack.dev/lib-helm v0.29.6 -## explicit; go 1.21.5 -kubepack.dev/lib-helm/pkg/values # open-cluster-management.io/addon-framework v0.9.0 => github.com/kluster-manager/addon-framework v0.9.1-0.20240225065513-dbdc1604459c ## explicit; go 1.21 open-cluster-management.io/addon-framework/pkg/addonfactory @@ -1393,7 +1295,7 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client -# sigs.k8s.io/controller-runtime v0.17.0 => github.com/kmodules/controller-runtime v0.17.2-0.20240213085617-b6aac9684c00 +# sigs.k8s.io/controller-runtime v0.17.0 => github.com/kmodules/controller-runtime v0.17.3-0.20240301215359-aa29dfea56fd ## explicit; go 1.21 sigs.k8s.io/controller-runtime sigs.k8s.io/controller-runtime/pkg/builder @@ -1452,15 +1354,9 @@ sigs.k8s.io/structured-merge-diff/v4/value ## explicit; go 1.12 sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 -# x-helm.dev/apimachinery v0.0.16 -## explicit; go 1.21.5 -x-helm.dev/apimachinery/apis/charts/v1alpha1 -x-helm.dev/apimachinery/apis/releases/v1alpha1 -x-helm.dev/apimachinery/apis/shared -x-helm.dev/apimachinery/crds # open-cluster-management.io/addon-framework => github.com/kluster-manager/addon-framework v0.9.1-0.20240225065513-dbdc1604459c # github.com/Masterminds/sprig/v3 => github.com/gomodules/sprig/v3 v3.2.3-0.20220405051441-0a8a99bac1b8 -# sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime v0.17.2-0.20240213085617-b6aac9684c00 +# sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime v0.17.3-0.20240301215359-aa29dfea56fd # github.com/imdario/mergo => github.com/imdario/mergo v0.3.6 # k8s.io/apiserver => github.com/kmodules/apiserver v0.29.1-0.20240104121741-1fb217d4a573 # k8s.io/kubernetes => github.com/kmodules/kubernetes v1.30.0-alpha.0.0.20231224075822-3bd9a13c86db diff --git a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go index 24af330c..927be22b 100644 --- a/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go +++ b/vendor/sigs.k8s.io/controller-runtime/pkg/client/apiutil/restmapper.go @@ -53,7 +53,7 @@ func NewDynamicRESTMapper(cfg *rest.Config, httpClient *http.Client) (meta.RESTM // client for discovery information to do REST mappings. type mapper struct { mapper meta.RESTMapper - client *discovery.DiscoveryClient + client discovery.DiscoveryInterface knownGroups map[string]*restmapper.APIGroupResources apiGroups map[string]*metav1.APIGroup @@ -280,11 +280,15 @@ func (m *mapper) fetchGroupVersionResourcesLocked(groupName string, versions ... groupVersion := schema.GroupVersion{Group: groupName, Version: version} apiResourceList, err := m.client.ServerResourcesForGroupVersion(groupVersion.String()) - if apierrors.IsNotFound(err) && m.isGroupVersionCached(groupVersion) { + if apierrors.IsNotFound(err) { // If the version is not found, we remove the group from the cache // so it gets refreshed on the next call. - delete(m.apiGroups, groupName) - delete(m.knownGroups, groupName) + if m.isAPIGroupCached(groupVersion) { + delete(m.apiGroups, groupName) + } + if m.isGroupVersionCached(groupVersion) { + delete(m.knownGroups, groupName) + } continue } else if err != nil { failedGroups[groupVersion] = err @@ -313,3 +317,19 @@ func (m *mapper) isGroupVersionCached(gv schema.GroupVersion) bool { return false } + +// isAPIGroupCached checks if a version for a group is cached in the api groups cache. +func (m *mapper) isAPIGroupCached(gv schema.GroupVersion) bool { + cachedGroup, ok := m.apiGroups[gv.Group] + if !ok { + return false + } + + for _, version := range cachedGroup.Versions { + if version.Version == gv.Version { + return true + } + } + + return false +} diff --git a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/chartpreset_types.go b/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/chartpreset_types.go deleted file mode 100644 index 5281aa32..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/chartpreset_types.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2023. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "kmodules.xyz/client-go/apiextensions" - "x-helm.dev/apimachinery/crds" -) - -const ( - ResourceKindChartPreset = "ChartPreset" - ResourceChartPreset = "chartpreset" - ResourceChartPresets = "chartpresets" -) - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status - -// ChartPreset is the Schema for the chartpresets API -type ChartPreset struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ClusterChartPresetSpec `json:"spec,omitempty"` -} - -//+kubebuilder:object:root=true - -// ChartPresetList contains a list of ChartPreset -type ChartPresetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ChartPreset `json:"items"` -} - -func init() { - SchemeBuilder.Register(&ChartPreset{}, &ChartPresetList{}) -} - -func (_ ChartPreset) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(GroupVersion.WithResource(ResourceChartPresets)) -} diff --git a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/clusterchartpreset_types.go b/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/clusterchartpreset_types.go deleted file mode 100644 index 3be46ed5..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/clusterchartpreset_types.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2023. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "kmodules.xyz/client-go/apiextensions" - "x-helm.dev/apimachinery/crds" -) - -const ( - ResourceKindClusterChartPreset = "ClusterChartPreset" - ResourceClusterChartPreset = "clusterchartpreset" - ResourceClusterChartPresets = "clusterchartpresets" -) - -// ClusterChartPresetSpec defines the desired state of ClusterChartPreset -type ClusterChartPresetSpec struct { - // +optional - // +kubebuilder:pruning:PreserveUnknownFields - Values *runtime.RawExtension `json:"values,omitempty"` -} - -// TypedLocalObjectReference contains enough information to let you locate the -// typed referenced object inside the same namespace. -// +structType=atomic -type TypedLocalObjectReference struct { - // 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. - // +optional - APIGroup *string `json:"apiGroup"` - // Kind is the type of resource being referenced - Kind string `json:"kind"` - // Name is the name of resource being referenced - // +optional - Name string `json:"name,omitempty"` - // +optional - Selector *metav1.LabelSelector `json:"selector,omitempty"` -} - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:resource:scope=Cluster - -// ClusterChartPreset is the Schema for the clusterchartpresets API -type ClusterChartPreset struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ClusterChartPresetSpec `json:"spec,omitempty"` -} - -//+kubebuilder:object:root=true - -// ClusterChartPresetList contains a list of ClusterChartPreset -type ClusterChartPresetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ClusterChartPreset `json:"items"` -} - -func init() { - SchemeBuilder.Register(&ClusterChartPreset{}, &ClusterChartPresetList{}) -} - -func (_ ClusterChartPreset) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(GroupVersion.WithResource(ResourceClusterChartPresets)) -} diff --git a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/groupversion_info.go b/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/groupversion_info.go deleted file mode 100644 index b8b90763..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2023. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha1 contains API Schema definitions for the charts v1alpha1 API group -// +kubebuilder:object:generate=true -// +groupName=charts.x-helm.dev -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "charts.x-helm.dev", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/interface_types.go b/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/interface_types.go deleted file mode 100644 index 7920bb21..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/interface_types.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -Copyright 2023. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - kmapi "kmodules.xyz/client-go/api/v1" - releasesv1alpha1 "x-helm.dev/apimachinery/apis/releases/v1alpha1" -) - -// +kubebuilder:object:generate:=false -type Preset interface { - GetObjectKind() schema.ObjectKind - GetName() string - GetLabels() map[string]string - GetSpec() ClusterChartPresetSpec -} - -var _ Preset = &ClusterChartPreset{} - -func (in ClusterChartPreset) GetSpec() ClusterChartPresetSpec { - return in.Spec -} - -var _ Preset = &ChartPreset{} - -func (in ChartPreset) GetSpec() ClusterChartPresetSpec { - return in.Spec -} - -type ChartPresetFlatRef struct { - releasesv1alpha1.ChartSourceFlatRef `json:",inline"` - - // Editor GVR - Group string `json:"group,omitempty"` - Resource string `json:"resource,omitempty"` - Kind string `json:"kind,omitempty"` - Variant string `json:"variant,omitempty"` - Namespace string `json:"namespace,omitempty"` -} - -type ChartPresetValues struct { - Source SourceLocator `json:"source"` - Values *runtime.RawExtension `json:"values"` -} - -type SourceLocator struct { - // +optional - Resource kmapi.ResourceID `json:"resource"` - // +optional - Ref kmapi.ObjectReference `json:"ref"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/zz_generated.deepcopy.go b/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index d3137443..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/charts/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,241 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright 2023. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartPreset) DeepCopyInto(out *ChartPreset) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartPreset. -func (in *ChartPreset) DeepCopy() *ChartPreset { - if in == nil { - return nil - } - out := new(ChartPreset) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ChartPreset) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartPresetFlatRef) DeepCopyInto(out *ChartPresetFlatRef) { - *out = *in - out.ChartSourceFlatRef = in.ChartSourceFlatRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartPresetFlatRef. -func (in *ChartPresetFlatRef) DeepCopy() *ChartPresetFlatRef { - if in == nil { - return nil - } - out := new(ChartPresetFlatRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartPresetList) DeepCopyInto(out *ChartPresetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ChartPreset, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartPresetList. -func (in *ChartPresetList) DeepCopy() *ChartPresetList { - if in == nil { - return nil - } - out := new(ChartPresetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ChartPresetList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartPresetValues) DeepCopyInto(out *ChartPresetValues) { - *out = *in - out.Source = in.Source - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartPresetValues. -func (in *ChartPresetValues) DeepCopy() *ChartPresetValues { - if in == nil { - return nil - } - out := new(ChartPresetValues) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterChartPreset) DeepCopyInto(out *ClusterChartPreset) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterChartPreset. -func (in *ClusterChartPreset) DeepCopy() *ClusterChartPreset { - if in == nil { - return nil - } - out := new(ClusterChartPreset) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterChartPreset) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterChartPresetList) DeepCopyInto(out *ClusterChartPresetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterChartPreset, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterChartPresetList. -func (in *ClusterChartPresetList) DeepCopy() *ClusterChartPresetList { - if in == nil { - return nil - } - out := new(ClusterChartPresetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterChartPresetList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterChartPresetSpec) DeepCopyInto(out *ClusterChartPresetSpec) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterChartPresetSpec. -func (in *ClusterChartPresetSpec) DeepCopy() *ClusterChartPresetSpec { - if in == nil { - return nil - } - out := new(ClusterChartPresetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceLocator) DeepCopyInto(out *SourceLocator) { - *out = *in - out.Resource = in.Resource - out.Ref = in.Ref -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceLocator. -func (in *SourceLocator) DeepCopy() *SourceLocator { - if in == nil { - return nil - } - out := new(SourceLocator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) { - *out = *in - if in.APIGroup != nil { - in, out := &in.APIGroup, &out.APIGroup - *out = new(string) - **out = **in - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedLocalObjectReference. -func (in *TypedLocalObjectReference) DeepCopy() *TypedLocalObjectReference { - if in == nil { - return nil - } - out := new(TypedLocalObjectReference) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/application_types.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/application_types.go deleted file mode 100644 index 187482ae..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/application_types.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -type ApplicationPackage struct { - metav1.TypeMeta `json:",inline"` - Bundle *ChartSourceRef `json:"bundle,omitempty"` - Chart ChartSourceRef `json:"chart"` - Channel ChannelType `json:"channel"` -} - -type ChannelType string - -const ( - RapidChannel ChannelType = "Rapid" - RegularChannel ChannelType = "Regular" - StableChannel ChannelType = "Stable" -) diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_helpers.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_helpers.go deleted file mode 100644 index 15fd7fd4..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_helpers.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "x-helm.dev/apimachinery/crds" - - "kmodules.xyz/client-go/apiextensions" -) - -func (_ Bundle) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(GroupVersion.WithResource(ResourceBundles)) -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_types.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_types.go deleted file mode 100644 index 03c3b34d..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_types.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - kmapi "kmodules.xyz/client-go/api/v1" -) - -const ( - ResourceKindBundle = "Bundle" - ResourceBundle = "bundle" - ResourceBundles = "bundles" -) - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:resource:scope=Cluster - -// Bundle is the Schema for the bundles API -type Bundle struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec BundleSpec `json:"spec,omitempty"` - Status BundleStatus `json:"status,omitempty"` -} - -type BundleSpec struct { - PackageDescriptor `json:",inline"` - DisplayName string `json:"displayName,omitempty"` - Features []Feature `json:"features,omitempty"` - Namespace string `json:"namespace"` - Packages []PackageRef `json:"packages"` -} - -type PackageRef struct { - Chart *ChartOption `json:"chart,omitempty"` - Bundle *BundleOption `json:"bundle,omitempty"` - OneOf *OneOfBundleOption `json:"oneOf,omitempty"` -} - -type OneOfBundleOption struct { - Description string `json:"description"` - Bundles []*BundleOption `json:"bundles,omitempty"` -} - -type ChartRef struct { - Name string `json:"name"` - SourceRef kmapi.TypedObjectReference `json:"sourceRef"` -} - -type SelectionMode string - -type ChartOption struct { - ChartRef `json:",inline"` - Features []string `json:"features,omitempty"` - Namespace string `json:"namespace,omitempty"` - Versions []VersionDetail `json:"versions"` - MultiSelect bool `json:"multiSelect,omitempty"` - Required bool `json:"required,omitempty"` -} - -type BundleRef struct { - Name string `json:"name"` - SourceRef kmapi.TypedObjectReference `json:"sourceRef"` -} - -type BundleOption struct { - BundleRef `json:",inline"` - Version string `json:"version"` -} - -type VersionOption struct { - Version string `json:"version"` - Selected bool `json:"selected,omitempty"` - ValuesFile string `json:"valuesFile,omitempty"` - // RFC 6902 compatible json patch. ref: http://jsonpatch.com - // +optional - // +kubebuilder:pruning:PreserveUnknownFields - ValuesPatch *runtime.RawExtension `json:"valuesPatch,omitempty"` -} - -type VersionDetail struct { - VersionOption `json:",inline"` - Resources *ResourceDefinitions `json:"resources,omitempty"` - WaitFors []WaitFlags `json:"waitFors,omitempty"` - // jsonpatch path in Values where the license key will be set using replace operation, if defined. - // See: http://jsonpatch.com - LicenseKeyPath string `json:"licenseKeyPath,omitempty"` -} - -//+kubebuilder:object:root=true - -// BundleList contains a list of Bundle -type BundleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Bundle `json:"items"` -} - -func init() { - SchemeBuilder.Register(&Bundle{}, &BundleList{}) -} - -type BundleStatus struct { - // ObservedGeneration is the most recent generation observed for this resource. It corresponds to the - // resource's generation, which is updated on mutation by the API Server. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -type InstallOptions struct { - ChartRef `json:",inline"` - Version string `json:"version"` - ReleaseName string `json:"releaseName"` - Namespace string `json:"namespace"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_ui_types.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_ui_types.go deleted file mode 100644 index 12326e10..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/bundle_ui_types.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type BundleView struct { - metav1.TypeMeta `json:",inline"` - BundleOptionView `json:",inline"` - LicenseKey string `json:"licenseKey,omitempty"` -} - -type BundleOptionView struct { - PackageMeta `json:",inline"` - DisplayName string `json:"displayName"` - Features []Feature `json:"features,omitempty"` - Packages []PackageCard `json:"packages"` -} - -type PackageCard struct { - Chart *ChartCard `json:"chart,omitempty"` - Bundle *BundleOptionView `json:"bundle,omitempty"` - OneOf *OneOfBundleOptionView `json:"oneOf,omitempty"` -} - -type OneOfBundleOptionView struct { - Description string `json:"description"` - Bundles []*BundleOptionView `json:"bundles,omitempty"` -} - -type ChartCard struct { - ChartRef `json:",inline"` - PackageDescriptor `json:",inline"` - Features []string `json:"features,omitempty"` - Namespace string `json:"namespace,omitempty"` - Versions []VersionOption `json:"versions"` - MultiSelect bool `json:"multiSelect,omitempty"` - Required bool `json:"required,omitempty"` - Selected bool `json:"selected,omitempty"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/editor_types.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/editor_types.go deleted file mode 100644 index 1569922e..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/editor_types.go +++ /dev/null @@ -1,159 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - kmapi "kmodules.xyz/client-go/api/v1" -) - -type Metadata struct { - Resource kmapi.ResourceID `json:"resource"` - Release ObjectMeta `json:"release"` -} - -type MetadataFlat struct { - kmapi.ResourceID `json:",inline"` - ReleaseName string `json:"releaseName"` - Namespace string `json:"namespace"` -} - -type ObjectMeta struct { - Name string `json:"name"` - Namespace string `json:"namespace"` -} - -type ModelMetadata struct { - Metadata `json:"metadata,omitempty"` -} - -type Model struct { - Metadata `json:"metadata,omitempty"` - Resources *unstructured.Unstructured `json:"resources,omitempty"` -} - -type ChartOrder struct { - ChartSourceFlatRef `json:",inline"` - - ReleaseName string `json:"releaseName,omitempty"` - Namespace string `json:"namespace,omitempty"` - Values *unstructured.Unstructured `json:"values,omitempty"` -} - -type EditorParameters struct { - ValuesFile string `json:"valuesFile,omitempty"` - // RFC 6902 compatible json patch. ref: http://jsonpatch.com - // +optional - // +kubebuilder:pruning:PreserveUnknownFields - ValuesPatch *runtime.RawExtension `json:"valuesPatch,omitempty"` -} - -type EditResourceOrder struct { - Group string `json:"group,omitempty"` - Version string `json:"version,omitempty"` - Resource string `json:"resource,omitempty"` - - ReleaseName string `json:"releaseName,omitempty"` - Namespace string `json:"namespace,omitempty"` - Values string `json:"values,omitempty"` -} - -type BucketFile struct { - // URL of the file in bucket - URL string `json:"url"` - // Bucket key for this file - Key string `json:"key"` - Filename string `json:"filename"` - Data []byte `json:"data"` -} - -type BucketObject struct { - // URL of the file in bucket - URL string `json:"url,omitempty"` - // Bucket key for this file - Key string `json:"key,omitempty"` - ResourceObject `json:",inline"` -} - -type BucketFileRef struct { - // URL of the file in bucket - URL string `json:"url"` - // Bucket key for this file - Key string `json:"key"` -} - -type ChartTemplate struct { - ChartSourceRef `json:",inline"` - ReleaseName string `json:"releaseName,omitempty"` - Namespace string `json:"namespace,omitempty"` - CRDs []BucketObject `json:"crds,omitempty"` - Manifest *BucketFileRef `json:"manifest,omitempty"` - Resources []ResourceObject `json:"resources,omitempty"` -} - -type BucketFileOutput struct { - // URL of the file in bucket - URL string `json:"url,omitempty"` - // Bucket key for this file - Key string `json:"key,omitempty"` - Filename string `json:"filename,omitempty"` - Data string `json:"data,omitempty"` -} - -type ChartTemplateOutput struct { - ChartSourceRef `json:",inline"` - ReleaseName string `json:"releaseName,omitempty"` - Namespace string `json:"namespace,omitempty"` - CRDs []BucketFileOutput `json:"crds,omitempty"` - Manifest *BucketFileRef `json:"manifest,omitempty"` - Resources []ResourceFile `json:"resources,omitempty"` -} - -type EditorTemplate struct { - Manifest []byte `json:"manifest,omitempty"` - Values *unstructured.Unstructured `json:"values,omitempty"` - Resources []ResourceObject `json:"resources,omitempty"` -} - -type ResourceOutput struct { - CRDs []ResourceFile `json:"crds,omitempty"` - Resources []ResourceFile `json:"resources,omitempty"` -} - -type ObjectModel struct { - Key string `json:"key"` - Object *unstructured.Unstructured `json:"object"` -} - -type ResourceObject struct { - Filename string `json:"filename,omitempty"` - Key string `json:"key,omitempty"` - Data *unstructured.Unstructured `json:"data,omitempty"` -} - -type ResourceFile struct { - Filename string `json:"filename,omitempty"` - Key string `json:"key,omitempty"` - Data string `json:"data,omitempty"` -} - -type SimpleValue struct { - metav1.TypeMeta `json:",inline,omitempty"` - ObjectMeta ObjectMeta `json:"metadata,omitempty"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/groupversion_info.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/groupversion_info.go deleted file mode 100644 index c0388129..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2023. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package v1alpha1 contains API Schema definitions for the releases v1alpha1 API group -// +kubebuilder:object:generate=true -// +groupName=releases.x-helm.dev -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "releases.x-helm.dev", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/helpers.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/helpers.go deleted file mode 100644 index 50dcc237..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/helpers.go +++ /dev/null @@ -1,46 +0,0 @@ -package v1alpha1 - -import ( - kmapi "kmodules.xyz/client-go/api/v1" -) - -func (ref *ChartSourceRef) SetDefaults() *ChartSourceRef { - if ref.SourceRef.APIGroup == "" { - ref.SourceRef.APIGroup = SourceGroupHelmRepository - } - if ref.SourceRef.Kind == "" { - ref.SourceRef.Kind = SourceKindHelmRepository - } else if ref.SourceRef.Kind == SourceKindLegacy || - ref.SourceRef.Kind == SourceKindLocal || - ref.SourceRef.Kind == SourceKindEmbed { - ref.SourceRef.APIGroup = SourceGroupLegacy - } - return ref -} - -func (ref *ChartSourceFlatRef) FromAPIObject(obj ChartSourceRef) *ChartSourceFlatRef { - obj.SetDefaults() - - ref.Name = obj.Name - ref.Version = obj.Version - ref.SourceAPIGroup = obj.SourceRef.APIGroup - ref.SourceKind = obj.SourceRef.Kind - ref.SourceNamespace = obj.SourceRef.Namespace - ref.SourceName = obj.SourceRef.Name - return ref -} - -func (ref *ChartSourceFlatRef) ToAPIObject() ChartSourceRef { - obj := ChartSourceRef{ - Name: ref.Name, - Version: ref.Version, - SourceRef: kmapi.TypedObjectReference{ - APIGroup: ref.SourceAPIGroup, - Kind: ref.SourceKind, - Namespace: ref.SourceNamespace, - Name: ref.SourceName, - }, - } - obj.SetDefaults() - return obj -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/hub.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/hub.go deleted file mode 100644 index fd5a337e..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/hub.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import "x-helm.dev/apimachinery/apis/shared" - -type Hub struct { - Repositories []Repository `json:"repositories"` -} - -type Repository struct { - Name string `json:"name"` - URL string `json:"url"` - Maintainers []shared.ContactData `json:"maintainers,omitempty"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/order_helpers.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/order_helpers.go deleted file mode 100644 index 6d06e44f..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/order_helpers.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - "x-helm.dev/apimachinery/crds" - - "kmodules.xyz/client-go/apiextensions" -) - -func (_ Order) CustomResourceDefinition() *apiextensions.CustomResourceDefinition { - return crds.MustCustomResourceDefinition(GroupVersion.WithResource(ResourceOrders)) -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/order_types.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/order_types.go deleted file mode 100644 index c54bf8d8..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/order_types.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -const ( - ResourceKindOrder = "Order" - ResourceOrder = "order" - ResourceOrders = "orders" -) - -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status -//+kubebuilder:resource:scope=Cluster - -// Order is the Schema for the orders API -type Order struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec OrderSpec `json:"spec,omitempty"` - Status OrderStatus `json:"status,omitempty"` -} - -type OrderSpec struct { - Packages []PackageSelection `json:"items"` - // KubeVersion is a SemVer constraint specifying the version of Kubernetes required. - KubeVersion string `json:"kubeVersion,omitempty"` -} - -type PackageSelection struct { - Chart *ChartSelection `json:"chart,omitempty"` -} - -type ChartSelection struct { - ChartRef `json:",inline"` - Version string `json:"version"` - ReleaseName string `json:"releaseName"` - Namespace string `json:"namespace"` - - // Bundle points to the parent bundle which was used to install this, if any. - // If the chart was installed directly it will be unset. - Bundle *ChartSourceRef `json:"bundle,omitempty"` - - ValuesFile string `json:"valuesFile,omitempty"` - // RFC 6902 compatible json patch. ref: http://jsonpatch.com - // +optional - // +kubebuilder:pruning:PreserveUnknownFields - ValuesPatch *runtime.RawExtension `json:"valuesPatch,omitempty"` - Resources *ResourceDefinitions `json:"resources,omitempty"` - WaitFors []WaitFlags `json:"waitFors,omitempty"` -} - -//+kubebuilder:object:root=true - -// OrderList contains a list of Order -type OrderList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []Order `json:"items"` -} - -func init() { - SchemeBuilder.Register(&Order{}, &OrderList{}) -} - -type OrderStatus struct { - // ObservedGeneration is the most recent generation observed for this resource. It corresponds to the - // resource's generation, which is updated on mutation by the API Server. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/package_ui_types.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/package_ui_types.go deleted file mode 100644 index c9571c8f..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/package_ui_types.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - crdv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - "x-helm.dev/apimachinery/apis/shared" -) - -type PackageDescriptor struct { - // Type is the type of the application (e.g. WordPress, MySQL, Cassandra). - Type string `json:"type,omitempty"` - - // Description is a brief string description of the Application. - Description string `json:"description,omitempty"` - - // Icons is an optional list of icons for an application. Icon information includes the source, size, - // and mime type. - Icons []shared.ImageSpec `json:"icons,omitempty"` - - // Maintainers is an optional list of maintainers of the application. The maintainers in this list maintain the - // the source code, images, and package for the application. - Maintainers []shared.ContactData `json:"maintainers,omitempty"` - - // Keywords is an optional list of key words associated with the application (e.g. MySQL, RDBMS, database). - Keywords []string `json:"keywords,omitempty"` - - // Links are a list of descriptive URLs intended to be used to surface additional documentation, dashboards, etc. - Links []shared.Link `json:"links,omitempty"` - - // Notes contain a human readable snippets intended as a quick start for the users of the Application. - // CommonMark markdown syntax may be used for rich text representation. - Notes string `json:"notes,omitempty"` -} - -type PackageMeta struct { - PackageDescriptor `json:",inline"` - - ChartSourceRef `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type PackageView struct { - metav1.TypeMeta `json:",inline"` - PackageMeta `json:",inline"` - - // Chart value files - ValuesFiles []ValuesFile `json:"valuesFiles,omitempty"` - - // openAPIV3Schema describes the schema used for validation and pruning of the Values file. - // +optional - OpenAPIV3Schema *crdv1.JSONSchemaProps `json:"openAPIV3Schema,omitempty"` -} - -type ValuesFile struct { - Filename string `json:"filename"` - Values *runtime.RawExtension `json:"values,omitempty"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/types.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/types.go deleted file mode 100644 index ce910614..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/types.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kmapi "kmodules.xyz/client-go/api/v1" -) - -const ( - SourceGroupHelmRepository = "source.toolkit.fluxcd.io" - SourceKindHelmRepository = "HelmRepository" - - SourceGroupLegacy = "charts.x-helm.dev" - SourceKindLegacy = "Legacy" - SourceKindLocal = "Local" - SourceKindEmbed = "Embed" -) - -// ChartSourceRef references to a single version of a Chart -type ChartSourceRef struct { - Name string `json:"name"` - Version string `json:"version"` - SourceRef kmapi.TypedObjectReference `json:"sourceRef"` -} - -type ChartSourceFlatRef struct { - Name string `json:"name"` - // Version is an optional version indicator for the Application. - // +optional - Version string `json:"version,omitempty"` - SourceAPIGroup string `json:"sourceApiGroup,omitempty"` - SourceKind string `json:"sourceKind"` - SourceNamespace string `json:"sourceNamespace,omitempty"` - SourceName string `json:"sourceName"` -} - -type Feature struct { - Trait string `json:"trait"` - Value string `json:"value"` -} - -type ResourceDefinitions struct { - Owned []metav1.GroupVersionResource `json:"owned"` - Required []metav1.GroupVersionResource `json:"required"` -} - -// wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available] - -type WaitFlags struct { - Resource metav1.GroupResource `json:"resource"` - Labels *metav1.LabelSelector `json:"labels"` - All bool `json:"all"` - Timeout metav1.Duration `json:"timeout"` - ForCondition string `json:"for"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/zz_generated.deepcopy.go b/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 8d23f074..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/releases/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1287 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright 2023. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "x-helm.dev/apimachinery/apis/shared" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ApplicationPackage) DeepCopyInto(out *ApplicationPackage) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Bundle != nil { - in, out := &in.Bundle, &out.Bundle - *out = new(ChartSourceRef) - **out = **in - } - out.Chart = in.Chart -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationPackage. -func (in *ApplicationPackage) DeepCopy() *ApplicationPackage { - if in == nil { - return nil - } - out := new(ApplicationPackage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ApplicationPackage) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BucketFile) DeepCopyInto(out *BucketFile) { - *out = *in - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = make([]byte, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketFile. -func (in *BucketFile) DeepCopy() *BucketFile { - if in == nil { - return nil - } - out := new(BucketFile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BucketFileOutput) DeepCopyInto(out *BucketFileOutput) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketFileOutput. -func (in *BucketFileOutput) DeepCopy() *BucketFileOutput { - if in == nil { - return nil - } - out := new(BucketFileOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BucketFileRef) DeepCopyInto(out *BucketFileRef) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketFileRef. -func (in *BucketFileRef) DeepCopy() *BucketFileRef { - if in == nil { - return nil - } - out := new(BucketFileRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BucketObject) DeepCopyInto(out *BucketObject) { - *out = *in - in.ResourceObject.DeepCopyInto(&out.ResourceObject) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BucketObject. -func (in *BucketObject) DeepCopy() *BucketObject { - if in == nil { - return nil - } - out := new(BucketObject) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Bundle) DeepCopyInto(out *Bundle) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bundle. -func (in *Bundle) DeepCopy() *Bundle { - if in == nil { - return nil - } - out := new(Bundle) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Bundle) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BundleList) DeepCopyInto(out *BundleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Bundle, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleList. -func (in *BundleList) DeepCopy() *BundleList { - if in == nil { - return nil - } - out := new(BundleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BundleList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BundleOption) DeepCopyInto(out *BundleOption) { - *out = *in - out.BundleRef = in.BundleRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleOption. -func (in *BundleOption) DeepCopy() *BundleOption { - if in == nil { - return nil - } - out := new(BundleOption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BundleOptionView) DeepCopyInto(out *BundleOptionView) { - *out = *in - in.PackageMeta.DeepCopyInto(&out.PackageMeta) - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]Feature, len(*in)) - copy(*out, *in) - } - if in.Packages != nil { - in, out := &in.Packages, &out.Packages - *out = make([]PackageCard, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleOptionView. -func (in *BundleOptionView) DeepCopy() *BundleOptionView { - if in == nil { - return nil - } - out := new(BundleOptionView) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BundleRef) DeepCopyInto(out *BundleRef) { - *out = *in - out.SourceRef = in.SourceRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleRef. -func (in *BundleRef) DeepCopy() *BundleRef { - if in == nil { - return nil - } - out := new(BundleRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BundleSpec) DeepCopyInto(out *BundleSpec) { - *out = *in - in.PackageDescriptor.DeepCopyInto(&out.PackageDescriptor) - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]Feature, len(*in)) - copy(*out, *in) - } - if in.Packages != nil { - in, out := &in.Packages, &out.Packages - *out = make([]PackageRef, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleSpec. -func (in *BundleSpec) DeepCopy() *BundleSpec { - if in == nil { - return nil - } - out := new(BundleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BundleStatus) DeepCopyInto(out *BundleStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleStatus. -func (in *BundleStatus) DeepCopy() *BundleStatus { - if in == nil { - return nil - } - out := new(BundleStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BundleView) DeepCopyInto(out *BundleView) { - *out = *in - out.TypeMeta = in.TypeMeta - in.BundleOptionView.DeepCopyInto(&out.BundleOptionView) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BundleView. -func (in *BundleView) DeepCopy() *BundleView { - if in == nil { - return nil - } - out := new(BundleView) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BundleView) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartCard) DeepCopyInto(out *ChartCard) { - *out = *in - out.ChartRef = in.ChartRef - in.PackageDescriptor.DeepCopyInto(&out.PackageDescriptor) - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]VersionOption, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartCard. -func (in *ChartCard) DeepCopy() *ChartCard { - if in == nil { - return nil - } - out := new(ChartCard) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartOption) DeepCopyInto(out *ChartOption) { - *out = *in - out.ChartRef = in.ChartRef - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]VersionDetail, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartOption. -func (in *ChartOption) DeepCopy() *ChartOption { - if in == nil { - return nil - } - out := new(ChartOption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartOrder) DeepCopyInto(out *ChartOrder) { - *out = *in - out.ChartSourceFlatRef = in.ChartSourceFlatRef - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartOrder. -func (in *ChartOrder) DeepCopy() *ChartOrder { - if in == nil { - return nil - } - out := new(ChartOrder) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartRef) DeepCopyInto(out *ChartRef) { - *out = *in - out.SourceRef = in.SourceRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartRef. -func (in *ChartRef) DeepCopy() *ChartRef { - if in == nil { - return nil - } - out := new(ChartRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartSelection) DeepCopyInto(out *ChartSelection) { - *out = *in - out.ChartRef = in.ChartRef - if in.Bundle != nil { - in, out := &in.Bundle, &out.Bundle - *out = new(ChartSourceRef) - **out = **in - } - if in.ValuesPatch != nil { - in, out := &in.ValuesPatch, &out.ValuesPatch - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(ResourceDefinitions) - (*in).DeepCopyInto(*out) - } - if in.WaitFors != nil { - in, out := &in.WaitFors, &out.WaitFors - *out = make([]WaitFlags, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartSelection. -func (in *ChartSelection) DeepCopy() *ChartSelection { - if in == nil { - return nil - } - out := new(ChartSelection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartSourceFlatRef) DeepCopyInto(out *ChartSourceFlatRef) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartSourceFlatRef. -func (in *ChartSourceFlatRef) DeepCopy() *ChartSourceFlatRef { - if in == nil { - return nil - } - out := new(ChartSourceFlatRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartSourceRef) DeepCopyInto(out *ChartSourceRef) { - *out = *in - out.SourceRef = in.SourceRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartSourceRef. -func (in *ChartSourceRef) DeepCopy() *ChartSourceRef { - if in == nil { - return nil - } - out := new(ChartSourceRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartTemplate) DeepCopyInto(out *ChartTemplate) { - *out = *in - out.ChartSourceRef = in.ChartSourceRef - if in.CRDs != nil { - in, out := &in.CRDs, &out.CRDs - *out = make([]BucketObject, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Manifest != nil { - in, out := &in.Manifest, &out.Manifest - *out = new(BucketFileRef) - **out = **in - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ResourceObject, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartTemplate. -func (in *ChartTemplate) DeepCopy() *ChartTemplate { - if in == nil { - return nil - } - out := new(ChartTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ChartTemplateOutput) DeepCopyInto(out *ChartTemplateOutput) { - *out = *in - out.ChartSourceRef = in.ChartSourceRef - if in.CRDs != nil { - in, out := &in.CRDs, &out.CRDs - *out = make([]BucketFileOutput, len(*in)) - copy(*out, *in) - } - if in.Manifest != nil { - in, out := &in.Manifest, &out.Manifest - *out = new(BucketFileRef) - **out = **in - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ResourceFile, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartTemplateOutput. -func (in *ChartTemplateOutput) DeepCopy() *ChartTemplateOutput { - if in == nil { - return nil - } - out := new(ChartTemplateOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EditResourceOrder) DeepCopyInto(out *EditResourceOrder) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EditResourceOrder. -func (in *EditResourceOrder) DeepCopy() *EditResourceOrder { - if in == nil { - return nil - } - out := new(EditResourceOrder) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EditorParameters) DeepCopyInto(out *EditorParameters) { - *out = *in - if in.ValuesPatch != nil { - in, out := &in.ValuesPatch, &out.ValuesPatch - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EditorParameters. -func (in *EditorParameters) DeepCopy() *EditorParameters { - if in == nil { - return nil - } - out := new(EditorParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EditorTemplate) DeepCopyInto(out *EditorTemplate) { - *out = *in - if in.Manifest != nil { - in, out := &in.Manifest, &out.Manifest - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = (*in).DeepCopy() - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ResourceObject, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EditorTemplate. -func (in *EditorTemplate) DeepCopy() *EditorTemplate { - if in == nil { - return nil - } - out := new(EditorTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Feature) DeepCopyInto(out *Feature) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature. -func (in *Feature) DeepCopy() *Feature { - if in == nil { - return nil - } - out := new(Feature) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Hub) DeepCopyInto(out *Hub) { - *out = *in - if in.Repositories != nil { - in, out := &in.Repositories, &out.Repositories - *out = make([]Repository, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hub. -func (in *Hub) DeepCopy() *Hub { - if in == nil { - return nil - } - out := new(Hub) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InstallOptions) DeepCopyInto(out *InstallOptions) { - *out = *in - out.ChartRef = in.ChartRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InstallOptions. -func (in *InstallOptions) DeepCopy() *InstallOptions { - if in == nil { - return nil - } - out := new(InstallOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Metadata) DeepCopyInto(out *Metadata) { - *out = *in - out.Resource = in.Resource - out.Release = in.Release -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata. -func (in *Metadata) DeepCopy() *Metadata { - if in == nil { - return nil - } - out := new(Metadata) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetadataFlat) DeepCopyInto(out *MetadataFlat) { - *out = *in - out.ResourceID = in.ResourceID -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataFlat. -func (in *MetadataFlat) DeepCopy() *MetadataFlat { - if in == nil { - return nil - } - out := new(MetadataFlat) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Model) DeepCopyInto(out *Model) { - *out = *in - out.Metadata = in.Metadata - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Model. -func (in *Model) DeepCopy() *Model { - if in == nil { - return nil - } - out := new(Model) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ModelMetadata) DeepCopyInto(out *ModelMetadata) { - *out = *in - out.Metadata = in.Metadata -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelMetadata. -func (in *ModelMetadata) DeepCopy() *ModelMetadata { - if in == nil { - return nil - } - out := new(ModelMetadata) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta. -func (in *ObjectMeta) DeepCopy() *ObjectMeta { - if in == nil { - return nil - } - out := new(ObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectModel) DeepCopyInto(out *ObjectModel) { - *out = *in - if in.Object != nil { - in, out := &in.Object, &out.Object - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectModel. -func (in *ObjectModel) DeepCopy() *ObjectModel { - if in == nil { - return nil - } - out := new(ObjectModel) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OneOfBundleOption) DeepCopyInto(out *OneOfBundleOption) { - *out = *in - if in.Bundles != nil { - in, out := &in.Bundles, &out.Bundles - *out = make([]*BundleOption, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(BundleOption) - **out = **in - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OneOfBundleOption. -func (in *OneOfBundleOption) DeepCopy() *OneOfBundleOption { - if in == nil { - return nil - } - out := new(OneOfBundleOption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OneOfBundleOptionView) DeepCopyInto(out *OneOfBundleOptionView) { - *out = *in - if in.Bundles != nil { - in, out := &in.Bundles, &out.Bundles - *out = make([]*BundleOptionView, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(BundleOptionView) - (*in).DeepCopyInto(*out) - } - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OneOfBundleOptionView. -func (in *OneOfBundleOptionView) DeepCopy() *OneOfBundleOptionView { - if in == nil { - return nil - } - out := new(OneOfBundleOptionView) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Order) DeepCopyInto(out *Order) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Order. -func (in *Order) DeepCopy() *Order { - if in == nil { - return nil - } - out := new(Order) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Order) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderList) DeepCopyInto(out *OrderList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Order, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderList. -func (in *OrderList) DeepCopy() *OrderList { - if in == nil { - return nil - } - out := new(OrderList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrderList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderSpec) DeepCopyInto(out *OrderSpec) { - *out = *in - if in.Packages != nil { - in, out := &in.Packages, &out.Packages - *out = make([]PackageSelection, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderSpec. -func (in *OrderSpec) DeepCopy() *OrderSpec { - if in == nil { - return nil - } - out := new(OrderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrderStatus) DeepCopyInto(out *OrderStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrderStatus. -func (in *OrderStatus) DeepCopy() *OrderStatus { - if in == nil { - return nil - } - out := new(OrderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PackageCard) DeepCopyInto(out *PackageCard) { - *out = *in - if in.Chart != nil { - in, out := &in.Chart, &out.Chart - *out = new(ChartCard) - (*in).DeepCopyInto(*out) - } - if in.Bundle != nil { - in, out := &in.Bundle, &out.Bundle - *out = new(BundleOptionView) - (*in).DeepCopyInto(*out) - } - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = new(OneOfBundleOptionView) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackageCard. -func (in *PackageCard) DeepCopy() *PackageCard { - if in == nil { - return nil - } - out := new(PackageCard) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PackageDescriptor) DeepCopyInto(out *PackageDescriptor) { - *out = *in - if in.Icons != nil { - in, out := &in.Icons, &out.Icons - *out = make([]shared.ImageSpec, len(*in)) - copy(*out, *in) - } - if in.Maintainers != nil { - in, out := &in.Maintainers, &out.Maintainers - *out = make([]shared.ContactData, len(*in)) - copy(*out, *in) - } - if in.Keywords != nil { - in, out := &in.Keywords, &out.Keywords - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Links != nil { - in, out := &in.Links, &out.Links - *out = make([]shared.Link, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackageDescriptor. -func (in *PackageDescriptor) DeepCopy() *PackageDescriptor { - if in == nil { - return nil - } - out := new(PackageDescriptor) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PackageMeta) DeepCopyInto(out *PackageMeta) { - *out = *in - in.PackageDescriptor.DeepCopyInto(&out.PackageDescriptor) - out.ChartSourceRef = in.ChartSourceRef -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackageMeta. -func (in *PackageMeta) DeepCopy() *PackageMeta { - if in == nil { - return nil - } - out := new(PackageMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PackageRef) DeepCopyInto(out *PackageRef) { - *out = *in - if in.Chart != nil { - in, out := &in.Chart, &out.Chart - *out = new(ChartOption) - (*in).DeepCopyInto(*out) - } - if in.Bundle != nil { - in, out := &in.Bundle, &out.Bundle - *out = new(BundleOption) - **out = **in - } - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = new(OneOfBundleOption) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackageRef. -func (in *PackageRef) DeepCopy() *PackageRef { - if in == nil { - return nil - } - out := new(PackageRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PackageSelection) DeepCopyInto(out *PackageSelection) { - *out = *in - if in.Chart != nil { - in, out := &in.Chart, &out.Chart - *out = new(ChartSelection) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackageSelection. -func (in *PackageSelection) DeepCopy() *PackageSelection { - if in == nil { - return nil - } - out := new(PackageSelection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PackageView) DeepCopyInto(out *PackageView) { - *out = *in - out.TypeMeta = in.TypeMeta - in.PackageMeta.DeepCopyInto(&out.PackageMeta) - if in.ValuesFiles != nil { - in, out := &in.ValuesFiles, &out.ValuesFiles - *out = make([]ValuesFile, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackageView. -func (in *PackageView) DeepCopy() *PackageView { - if in == nil { - return nil - } - out := new(PackageView) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PackageView) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Repository) DeepCopyInto(out *Repository) { - *out = *in - if in.Maintainers != nil { - in, out := &in.Maintainers, &out.Maintainers - *out = make([]shared.ContactData, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Repository. -func (in *Repository) DeepCopy() *Repository { - if in == nil { - return nil - } - out := new(Repository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceDefinitions) DeepCopyInto(out *ResourceDefinitions) { - *out = *in - if in.Owned != nil { - in, out := &in.Owned, &out.Owned - *out = make([]v1.GroupVersionResource, len(*in)) - copy(*out, *in) - } - if in.Required != nil { - in, out := &in.Required, &out.Required - *out = make([]v1.GroupVersionResource, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDefinitions. -func (in *ResourceDefinitions) DeepCopy() *ResourceDefinitions { - if in == nil { - return nil - } - out := new(ResourceDefinitions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceFile) DeepCopyInto(out *ResourceFile) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceFile. -func (in *ResourceFile) DeepCopy() *ResourceFile { - if in == nil { - return nil - } - out := new(ResourceFile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceObject) DeepCopyInto(out *ResourceObject) { - *out = *in - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = (*in).DeepCopy() - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceObject. -func (in *ResourceObject) DeepCopy() *ResourceObject { - if in == nil { - return nil - } - out := new(ResourceObject) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceOutput) DeepCopyInto(out *ResourceOutput) { - *out = *in - if in.CRDs != nil { - in, out := &in.CRDs, &out.CRDs - *out = make([]ResourceFile, len(*in)) - copy(*out, *in) - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ResourceFile, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceOutput. -func (in *ResourceOutput) DeepCopy() *ResourceOutput { - if in == nil { - return nil - } - out := new(ResourceOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SimpleValue) DeepCopyInto(out *SimpleValue) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ObjectMeta = in.ObjectMeta -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleValue. -func (in *SimpleValue) DeepCopy() *SimpleValue { - if in == nil { - return nil - } - out := new(SimpleValue) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValuesFile) DeepCopyInto(out *ValuesFile) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValuesFile. -func (in *ValuesFile) DeepCopy() *ValuesFile { - if in == nil { - return nil - } - out := new(ValuesFile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VersionDetail) DeepCopyInto(out *VersionDetail) { - *out = *in - in.VersionOption.DeepCopyInto(&out.VersionOption) - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(ResourceDefinitions) - (*in).DeepCopyInto(*out) - } - if in.WaitFors != nil { - in, out := &in.WaitFors, &out.WaitFors - *out = make([]WaitFlags, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionDetail. -func (in *VersionDetail) DeepCopy() *VersionDetail { - if in == nil { - return nil - } - out := new(VersionDetail) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VersionOption) DeepCopyInto(out *VersionOption) { - *out = *in - if in.ValuesPatch != nil { - in, out := &in.ValuesPatch, &out.ValuesPatch - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionOption. -func (in *VersionOption) DeepCopy() *VersionOption { - if in == nil { - return nil - } - out := new(VersionOption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WaitFlags) DeepCopyInto(out *WaitFlags) { - *out = *in - out.Resource = in.Resource - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = new(v1.LabelSelector) - (*in).DeepCopyInto(*out) - } - out.Timeout = in.Timeout -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WaitFlags. -func (in *WaitFlags) DeepCopy() *WaitFlags { - if in == nil { - return nil - } - out := new(WaitFlags) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/x-helm.dev/apimachinery/apis/shared/types.go b/vendor/x-helm.dev/apimachinery/apis/shared/types.go deleted file mode 100644 index 3efd7cff..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/shared/types.go +++ /dev/null @@ -1,71 +0,0 @@ -// +kubebuilder:object:generate=true -package shared - -type MediaType string - -const ( - MediaLogo MediaType = "logo" - MediaLogoWhite MediaType = "logo_white" - MediaIcon MediaType = "icon" - MediaIcon192_192 MediaType = "icon_192x192" - MediaHeroImage MediaType = "hero_image" - MediaIntroVideo MediaType = "intro_video" -) - -type LinkType string - -const ( - LinkWebsite LinkType = "website" - LinkSupportDesk LinkType = "support_desk" - LinkFacebook LinkType = "facebook" - LinkLinkedIn LinkType = "linkedin" - LinkTwitter LinkType = "twitter" - LinkTwitterID LinkType = "twitter_id" - LinkYouTube LinkType = "youtube" - LinkSourceRepo LinkType = "src_repo" - LinkStarRepo LinkType = "star_repo" - LinkDocsRepo LinkType = "docs_repo" - LinkDatasheetFormID LinkType = "datasheet_form_id" -) - -// ImageSpec contains information about an image used as an icon. -type ImageSpec struct { - // The source for image represented as either an absolute URL to the image or a Data URL containing - // the image. Data URLs are defined in RFC 2397. - Source string `json:"src"` - - // (optional) The size of the image in pixels (e.g., 25x25). - Size string `json:"size,omitempty"` - - // (optional) The mine type of the image (e.g., "image/png"). - Type string `json:"type,omitempty"` -} - -// MediaSpec contains information about an image/video. -type MediaSpec struct { - // Description is human readable content explaining the purpose of the link. - Description MediaType `json:"description,omitempty"` - - ImageSpec `json:",inline"` -} - -// ContactData contains information about an individual or organization. -type ContactData struct { - // Name is the descriptive name. - Name string `json:"name,omitempty"` - - // Url could typically be a website address. - URL string `json:"url,omitempty"` - - // Email is the email address. - Email string `json:"email,omitempty"` -} - -// Link contains information about an URL to surface documentation, dashboards, etc. -type Link struct { - // Description is human readable content explaining the purpose of the link. - Description string `json:"description,omitempty"` - - // Url typically points at a website address. - URL string `json:"url,omitempty"` -} diff --git a/vendor/x-helm.dev/apimachinery/apis/shared/zz_generated.deepcopy.go b/vendor/x-helm.dev/apimachinery/apis/shared/zz_generated.deepcopy.go deleted file mode 100644 index 0a71c2d0..00000000 --- a/vendor/x-helm.dev/apimachinery/apis/shared/zz_generated.deepcopy.go +++ /dev/null @@ -1,84 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright 2023. - -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. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package shared - -import () - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContactData) DeepCopyInto(out *ContactData) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContactData. -func (in *ContactData) DeepCopy() *ContactData { - if in == nil { - return nil - } - out := new(ContactData) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageSpec) DeepCopyInto(out *ImageSpec) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec. -func (in *ImageSpec) DeepCopy() *ImageSpec { - if in == nil { - return nil - } - out := new(ImageSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Link) DeepCopyInto(out *Link) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link. -func (in *Link) DeepCopy() *Link { - if in == nil { - return nil - } - out := new(Link) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MediaSpec) DeepCopyInto(out *MediaSpec) { - *out = *in - out.ImageSpec = in.ImageSpec -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MediaSpec. -func (in *MediaSpec) DeepCopy() *MediaSpec { - if in == nil { - return nil - } - out := new(MediaSpec) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/x-helm.dev/apimachinery/crds/charts.x-helm.dev_chartpresets.yaml b/vendor/x-helm.dev/apimachinery/crds/charts.x-helm.dev_chartpresets.yaml deleted file mode 100644 index 880ef68d..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/charts.x-helm.dev_chartpresets.yaml +++ /dev/null @@ -1,45 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: chartpresets.charts.x-helm.dev -spec: - group: charts.x-helm.dev - names: - kind: ChartPreset - listKind: ChartPresetList - plural: chartpresets - singular: chartpreset - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ChartPreset is the Schema for the chartpresets API - 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: - type: object - spec: - description: ClusterChartPresetSpec defines the desired state of ClusterChartPreset - properties: - values: - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/x-helm.dev/apimachinery/crds/charts.x-helm.dev_clusterchartpresets.yaml b/vendor/x-helm.dev/apimachinery/crds/charts.x-helm.dev_clusterchartpresets.yaml deleted file mode 100644 index 1bcd8570..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/charts.x-helm.dev_clusterchartpresets.yaml +++ /dev/null @@ -1,46 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: clusterchartpresets.charts.x-helm.dev -spec: - group: charts.x-helm.dev - names: - kind: ClusterChartPreset - listKind: ClusterChartPresetList - plural: clusterchartpresets - singular: clusterchartpreset - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: ClusterChartPreset is the Schema for the clusterchartpresets - API - 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: - type: object - spec: - description: ClusterChartPresetSpec defines the desired state of ClusterChartPreset - properties: - values: - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/x-helm.dev/apimachinery/crds/drivers.x-helm.dev_appreleases.yaml b/vendor/x-helm.dev/apimachinery/crds/drivers.x-helm.dev_appreleases.yaml deleted file mode 100644 index 1dd9eb33..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/drivers.x-helm.dev_appreleases.yaml +++ /dev/null @@ -1,386 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: appreleases.drivers.x-helm.dev -spec: - group: drivers.x-helm.dev - names: - kind: AppRelease - listKind: AppReleaseList - plural: appreleases - singular: apprelease - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: The type of the appRelease - jsonPath: .spec.descriptor.type - name: Type - type: string - - description: The creation date - jsonPath: .spec.descriptor.version - name: Version - type: string - - description: The creation date - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: AppRelease is the Schema for the appReleases API - 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: - type: object - spec: - description: AppReleaseSpec defines the specification for an AppRelease. - properties: - components: - description: Components is a list of Kinds for AppRelease's components - (e.g. Deployments, Pods, Services, CRDs). It can be used in conjunction - with the AppRelease's Selector to list or watch the AppReleases - components. - items: - description: GroupVersionKind unambiguously identifies a kind. It - doesn't anonymously include GroupVersion to avoid automatic coercion. It - doesn't use a GroupVersion to avoid custom marshalling - properties: - group: - type: string - kind: - type: string - version: - type: string - required: - - group - - kind - - version - type: object - type: array - descriptor: - description: Descriptor regroups information and metadata about an - appRelease. - properties: - description: - description: Description is a brief string description of the - AppRelease. - type: string - icons: - description: Icons is an optional list of icons for an appRelease. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels - (e.g., 25x25). - type: string - src: - description: The source for image represented as either - an absolute URL to the image or a Data URL containing - the image. Data URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., - "image/png"). - type: string - required: - - src - type: object - type: array - keywords: - description: Keywords is an optional list of key words associated - with the appRelease (e.g. MySQL, RDBMS, database). - items: - type: string - type: array - links: - description: Links are a list of descriptive URLs intended to - be used to surface additional documentation, dashboards, etc. - items: - description: Link contains information about an URL to surface - documentation, dashboards, etc. - properties: - description: - description: Description is human readable content explaining - the purpose of the link. - type: string - url: - description: Url typically points at a website address. - type: string - type: object - type: array - maintainers: - description: Maintainers is an optional list of maintainers of - the appRelease. The maintainers in this list maintain the the - source code, images, and package for the appRelease. - items: - description: ContactData contains information about an individual - or organization. - properties: - email: - description: Email is the email address. - type: string - name: - description: Name is the descriptive name. - type: string - url: - description: Url could typically be a website address. - type: string - type: object - type: array - notes: - description: Notes contain a human readable snippets intended - as a quick start for the users of the AppRelease. CommonMark - markdown syntax may be used for rich text representation. - type: string - owners: - description: Owners is an optional list of the owners of the installed - appRelease. The owners of the appRelease should be contacted - in the event of a planned or unplanned disruption affecting - the appRelease. - items: - description: ContactData contains information about an individual - or organization. - properties: - email: - description: Email is the email address. - type: string - name: - description: Name is the descriptive name. - type: string - url: - description: Url could typically be a website address. - type: string - type: object - type: array - type: - description: Type is the type of the appRelease (e.g. WordPress, - MySQL, Cassandra). - type: string - version: - description: Version is an optional version indicator for the - AppRelease. - type: string - type: object - editor: - description: GroupVersionResource unambiguously identifies a resource. It - doesn't anonymously include GroupVersion to avoid automatic coercion. It - doesn't use a GroupVersion to avoid custom marshalling - properties: - group: - type: string - resource: - type: string - version: - type: string - required: - - group - - resource - - version - type: object - formKeys: - items: - type: string - type: array - release: - description: Release regroups information and metadata about a Helm - release. - properties: - firstDeployed: - format: date-time - type: string - form: - type: object - x-kubernetes-preserve-unknown-fields: true - lastDeployed: - format: date-time - type: string - modified-at: - format: date-time - type: string - name: - type: string - status: - type: string - version: - type: string - required: - - name - type: object - resourceKeys: - items: - type: string - type: array - selector: - description: 'Selector is a label query over kinds that created by - the appRelease. It must match the component objects'' labels. More - info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors' - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: A label selector requirement is a selector that - contains values, a key, and an operator that relates the key - and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: operator represents a key's relationship to - a set of values. Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of string values. If the - operator is In or NotIn, the values array must be non-empty. - If the operator is Exists or DoesNotExist, the values - array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single - {key,value} in the matchLabels map is equivalent to an element - of matchExpressions, whose key field is "key", the operator - is "In", and the values array contains only "value". The requirements - are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - type: object - status: - description: AppReleaseStatus defines controller's the observed state - of AppRelease - properties: - components: - description: Object status array for all matching objects - items: - description: ObjectStatus is a generic status holder for objects - properties: - group: - description: Object group - type: string - kind: - description: Kind of object - type: string - link: - description: Link to object - type: string - name: - description: Name of object - type: string - status: - description: 'Status. Values: InProgress, Ready, Unknown' - type: string - type: object - type: array - componentsReady: - description: 'ComponentsReady: status of the components in the format - ready/total' - type: string - conditions: - description: Conditions represents the latest state of the object - items: - description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n type FooStatus struct{ // Represents the observations of a - foo's current state. // Known .status.conditions.type are: \"Available\", - \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge - // +listType=map // +listMapKey=type Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" - 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. - format: date-time - type: string - message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. - maxLength: 32768 - 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. - format: int64 - minimum: 0 - type: integer - 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. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - type: array - observedGeneration: - description: ObservedGeneration is the most recent generation observed. - It corresponds to the Object's generation, which is updated on mutation - by the API Server. - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/x-helm.dev/apimachinery/crds/lib.go b/vendor/x-helm.dev/apimachinery/crds/lib.go deleted file mode 100644 index 2871fe15..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/lib.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package crds - -import ( - "embed" - "fmt" - - "k8s.io/apimachinery/pkg/runtime/schema" - "kmodules.xyz/client-go/apiextensions" - "sigs.k8s.io/yaml" -) - -//go:embed *.yaml -var fs embed.FS - -func load(filename string, o interface{}) error { - data, err := fs.ReadFile(filename) - if err != nil { - return err - } - return yaml.Unmarshal(data, o) -} - -func CustomResourceDefinition(gvr schema.GroupVersionResource) (*apiextensions.CustomResourceDefinition, error) { - var out apiextensions.CustomResourceDefinition - - v1file := fmt.Sprintf("%s_%s.yaml", gvr.Group, gvr.Resource) - if err := load(v1file, &out.V1); err != nil { - return nil, err - } - - if out.V1 == nil { - return nil, fmt.Errorf("missing crd yamls for gvr: %s", gvr) - } - - return &out, nil -} - -func MustCustomResourceDefinition(gvr schema.GroupVersionResource) *apiextensions.CustomResourceDefinition { - out, err := CustomResourceDefinition(gvr) - if err != nil { - panic(err) - } - return out -} diff --git a/vendor/x-helm.dev/apimachinery/crds/products.x-helm.dev_plans.yaml b/vendor/x-helm.dev/apimachinery/crds/products.x-helm.dev_plans.yaml deleted file mode 100644 index dd9719bb..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/products.x-helm.dev_plans.yaml +++ /dev/null @@ -1,179 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: plans.products.x-helm.dev -spec: - group: products.x-helm.dev - names: - kind: Plan - listKind: PlanList - plural: plans - singular: plan - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - aggregateUsage: - type: string - amount: - format: int64 - type: integer - amountDecimal: - format: double - type: number - billingScheme: - type: string - bundle: - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - required: - - name - - sourceRef - type: object - currency: - type: string - description: - type: string - displayName: - type: string - id: - type: string - includedPlans: - items: - type: string - type: array - interval: - type: string - intervalCount: - format: int64 - type: integer - name: - type: string - phase: - type: string - pricingPattern: - additionalProperties: - properties: - expression: - type: string - sizedPrices: - items: - properties: - cpu: - type: string - memory: - type: string - price: - format: double - type: number - required: - - cpu - - memory - - price - type: object - type: array - type: object - type: object - productID: - type: string - tiers: - items: - description: PlanTier configures tiered pricing - properties: - flatAmount: - format: int64 - type: integer - flatAmountDecimal: - format: double - type: number - unitAmount: - format: int64 - type: integer - unitAmountDecimal: - format: double - type: number - upTo: - format: int64 - type: integer - type: object - type: array - tiersMode: - type: string - transformUsage: - description: PlanTransformUsage represents the bucket billing configuration. - properties: - divideBy: - format: int64 - type: integer - round: - type: string - type: object - trialPeriodDays: - format: int64 - type: integer - usageType: - type: string - weight: - description: Plans for sorted by weight before displaying to users - format: int32 - type: integer - required: - - description - - displayName - - id - - name - - phase - - productID - - weight - type: object - status: - properties: - observedGeneration: - description: ObservedGeneration is the most recent generation observed - for this resource. It corresponds to the resource's generation, - which is updated on mutation by the API Server. - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/x-helm.dev/apimachinery/crds/products.x-helm.dev_products.yaml b/vendor/x-helm.dev/apimachinery/crds/products.x-helm.dev_products.yaml deleted file mode 100644 index 790fa65c..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/products.x-helm.dev_products.yaml +++ /dev/null @@ -1,167 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: products.products.x-helm.dev -spec: - group: products.x-helm.dev - names: - kind: Product - listKind: ProductList - plural: products - singular: product - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - badges: - items: - properties: - alt: - type: string - logo: - type: string - url: - type: string - required: - - alt - - logo - - url - type: object - type: array - description: - type: string - icons: - items: - description: MediaSpec contains information about an image/video. - properties: - description: - description: Description is human readable content explaining - the purpose of the link. - type: string - size: - description: (optional) The size of the image in pixels (e.g., - 25x25). - type: string - src: - description: The source for image represented as either an absolute - URL to the image or a Data URL containing the image. Data - URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - id: - type: string - key: - type: string - keywords: - items: - type: string - type: array - latestVersion: - type: string - links: - items: - description: Link contains information about an URL to surface documentation, - dashboards, etc. - properties: - description: - description: Description is human readable content explaining - the purpose of the link. - type: string - url: - description: Url typically points at a website address. - type: string - type: object - type: array - maintainers: - items: - description: ContactData contains information about an individual - or organization. - properties: - email: - description: Email is the email address. - type: string - name: - description: Name is the descriptive name. - type: string - url: - description: Url could typically be a website address. - type: string - type: object - type: array - name: - type: string - owner: - format: int64 - type: integer - ownerName: - type: string - phase: - type: string - shortName: - type: string - summary: - type: string - tagline: - type: string - unitLabel: - type: string - versions: - items: - properties: - releaseDate: - format: date-time - type: string - version: - type: string - required: - - version - type: object - type: array - required: - - id - - key - - name - - owner - - phase - - shortName - - tagline - type: object - status: - properties: - observedGeneration: - description: ObservedGeneration is the most recent generation observed - for this resource. It corresponds to the resource's generation, - which is updated on mutation by the API Server. - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/x-helm.dev/apimachinery/crds/releases.x-helm.dev_bundles.yaml b/vendor/x-helm.dev/apimachinery/crds/releases.x-helm.dev_bundles.yaml deleted file mode 100644 index 4335c331..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/releases.x-helm.dev_bundles.yaml +++ /dev/null @@ -1,412 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: bundles.releases.x-helm.dev -spec: - group: releases.x-helm.dev - names: - kind: Bundle - listKind: BundleList - plural: bundles - singular: bundle - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Bundle is the Schema for the bundles API - 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: - type: object - spec: - properties: - description: - description: Description is a brief string description of the Application. - type: string - displayName: - type: string - features: - items: - properties: - trait: - type: string - value: - type: string - required: - - trait - - value - type: object - type: array - icons: - description: Icons is an optional list of icons for an application. - Icon information includes the source, size, and mime type. - items: - description: ImageSpec contains information about an image used - as an icon. - properties: - size: - description: (optional) The size of the image in pixels (e.g., - 25x25). - type: string - src: - description: The source for image represented as either an absolute - URL to the image or a Data URL containing the image. Data - URLs are defined in RFC 2397. - type: string - type: - description: (optional) The mine type of the image (e.g., "image/png"). - type: string - required: - - src - type: object - type: array - keywords: - description: Keywords is an optional list of key words associated - with the application (e.g. MySQL, RDBMS, database). - items: - type: string - type: array - links: - description: Links are a list of descriptive URLs intended to be used - to surface additional documentation, dashboards, etc. - items: - description: Link contains information about an URL to surface documentation, - dashboards, etc. - properties: - description: - description: Description is human readable content explaining - the purpose of the link. - type: string - url: - description: Url typically points at a website address. - type: string - type: object - type: array - maintainers: - description: Maintainers is an optional list of maintainers of the - application. The maintainers in this list maintain the the source - code, images, and package for the application. - items: - description: ContactData contains information about an individual - or organization. - properties: - email: - description: Email is the email address. - type: string - name: - description: Name is the descriptive name. - type: string - url: - description: Url could typically be a website address. - type: string - type: object - type: array - namespace: - type: string - notes: - description: Notes contain a human readable snippets intended as a - quick start for the users of the Application. CommonMark markdown - syntax may be used for rich text representation. - type: string - packages: - items: - properties: - bundle: - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - chart: - properties: - features: - items: - type: string - type: array - multiSelect: - type: boolean - name: - type: string - namespace: - type: string - required: - type: boolean - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - versions: - items: - properties: - licenseKeyPath: - description: 'jsonpatch path in Values where the license - key will be set using replace operation, if defined. - See: http://jsonpatch.com' - type: string - resources: - properties: - owned: - items: - description: GroupVersionResource unambiguously - identifies a resource. It doesn't anonymously - include GroupVersion to avoid automatic coercion. It - doesn't use a GroupVersion to avoid custom - marshalling - properties: - group: - type: string - resource: - type: string - version: - type: string - required: - - group - - resource - - version - type: object - type: array - required: - items: - description: GroupVersionResource unambiguously - identifies a resource. It doesn't anonymously - include GroupVersion to avoid automatic coercion. It - doesn't use a GroupVersion to avoid custom - marshalling - properties: - group: - type: string - resource: - type: string - version: - type: string - required: - - group - - resource - - version - type: object - type: array - required: - - owned - - required - type: object - selected: - type: boolean - valuesFile: - type: string - valuesPatch: - description: 'RFC 6902 compatible json patch. ref: - http://jsonpatch.com' - type: object - x-kubernetes-preserve-unknown-fields: true - version: - type: string - waitFors: - items: - properties: - all: - type: boolean - for: - type: string - labels: - 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. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: A label selector requirement - is a selector that contains values, - a key, and an operator that relates - the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: operator represents a - key's relationship to a set of values. - Valid operators are In, NotIn, Exists - and DoesNotExist. - type: string - values: - description: values is an array of - string values. If the operator is - In or NotIn, the values array must - be non-empty. If the operator is - Exists or DoesNotExist, the values - array must be empty. This array - is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator - is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - resource: - description: GroupResource specifies a Group - and a Resource, but does not force a version. This - is useful for identifying concepts during - lookup stages without having partially valid - types - properties: - group: - type: string - resource: - type: string - required: - - group - - resource - type: object - timeout: - type: string - required: - - all - - for - - labels - - resource - - timeout - type: object - type: array - required: - - version - type: object - type: array - required: - - name - - sourceRef - - versions - type: object - oneOf: - properties: - bundles: - items: - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed - namespaced object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - type: array - description: - type: string - required: - - description - type: object - type: object - type: array - type: - description: Type is the type of the application (e.g. WordPress, - MySQL, Cassandra). - type: string - required: - - namespace - - packages - type: object - status: - properties: - observedGeneration: - description: ObservedGeneration is the most recent generation observed - for this resource. It corresponds to the resource's generation, - which is updated on mutation by the API Server. - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {} diff --git a/vendor/x-helm.dev/apimachinery/crds/releases.x-helm.dev_orders.yaml b/vendor/x-helm.dev/apimachinery/crds/releases.x-helm.dev_orders.yaml deleted file mode 100644 index e7618434..00000000 --- a/vendor/x-helm.dev/apimachinery/crds/releases.x-helm.dev_orders.yaml +++ /dev/null @@ -1,261 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - name: orders.releases.x-helm.dev -spec: - group: releases.x-helm.dev - names: - kind: Order - listKind: OrderList - plural: orders - singular: order - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: Order is the Schema for the orders API - 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: - type: object - spec: - properties: - items: - items: - properties: - chart: - properties: - bundle: - description: Bundle points to the parent bundle which was - used to install this, if any. If the chart was installed - directly it will be unset. - properties: - name: - type: string - sourceRef: - description: TypedObjectReference represents an typed - namespaced object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - version: - type: string - required: - - name - - sourceRef - - version - type: object - name: - type: string - namespace: - type: string - releaseName: - type: string - resources: - properties: - owned: - items: - description: GroupVersionResource unambiguously identifies - a resource. It doesn't anonymously include GroupVersion - to avoid automatic coercion. It doesn't use a GroupVersion - to avoid custom marshalling - properties: - group: - type: string - resource: - type: string - version: - type: string - required: - - group - - resource - - version - type: object - type: array - required: - items: - description: GroupVersionResource unambiguously identifies - a resource. It doesn't anonymously include GroupVersion - to avoid automatic coercion. It doesn't use a GroupVersion - to avoid custom marshalling - properties: - group: - type: string - resource: - type: string - version: - type: string - required: - - group - - resource - - version - type: object - type: array - required: - - owned - - required - type: object - sourceRef: - description: TypedObjectReference represents an typed namespaced - object. - properties: - apiGroup: - type: string - kind: - 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 - required: - - name - type: object - valuesFile: - type: string - valuesPatch: - description: 'RFC 6902 compatible json patch. ref: http://jsonpatch.com' - type: object - x-kubernetes-preserve-unknown-fields: true - version: - type: string - waitFors: - items: - properties: - all: - type: boolean - for: - type: string - labels: - 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. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: A label selector requirement is - a selector that contains values, a key, and - an operator that relates the key and values. - properties: - key: - description: key is the label key that the - selector applies to. - type: string - operator: - description: operator represents a key's - relationship to a set of values. Valid - operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string - values. If the operator is In or NotIn, - the values array must be non-empty. If - the operator is Exists or DoesNotExist, - the values array must be empty. This array - is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} - pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, - whose key field is "key", the operator is "In", - and the values array contains only "value". - The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - resource: - description: GroupResource specifies a Group and a - Resource, but does not force a version. This is - useful for identifying concepts during lookup stages - without having partially valid types - properties: - group: - type: string - resource: - type: string - required: - - group - - resource - type: object - timeout: - type: string - required: - - all - - for - - labels - - resource - - timeout - type: object - type: array - required: - - name - - namespace - - releaseName - - sourceRef - - version - type: object - type: object - type: array - kubeVersion: - description: KubeVersion is a SemVer constraint specifying the version - of Kubernetes required. - type: string - required: - - items - type: object - status: - properties: - observedGeneration: - description: ObservedGeneration is the most recent generation observed - for this resource. It corresponds to the resource's generation, - which is updated on mutation by the API Server. - format: int64 - type: integer - type: object - type: object - served: true - storage: true - subresources: - status: {}