From f81a1a2a0dca2b73b999c0bf1d2aaed76cda3067 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Sun, 8 Dec 2024 11:36:55 +0000 Subject: [PATCH 01/20] chore: update go.mod & go mod tidy. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- cmd/db-manager/v1beta1/main.go | 2 +- .../v1beta1/file-metricscollector/main.go | 2 +- cmd/suggestion/goptuna/v1beta1/main.go | 2 +- go.mod | 81 ++++---- go.sum | 184 ++++++++---------- hack/swagger/main.go | 2 +- hack/tools.go | 2 +- pkg/db/v1beta1/common/connection.go | 2 +- pkg/db/v1beta1/db.go | 2 +- pkg/db/v1beta1/mysql/init.go | 2 +- pkg/db/v1beta1/mysql/mysql.go | 2 +- pkg/db/v1beta1/postgres/init.go | 2 +- pkg/db/v1beta1/postgres/postgres.go | 2 +- pkg/metricscollector/v1beta1/common/pns.go | 2 +- .../file-metricscollector.go | 2 +- pkg/suggestion/v1beta1/goptuna/service.go | 2 +- 16 files changed, 137 insertions(+), 156 deletions(-) diff --git a/cmd/db-manager/v1beta1/main.go b/cmd/db-manager/v1beta1/main.go index 17f949f0690..d219ff8bd06 100644 --- a/cmd/db-manager/v1beta1/main.go +++ b/cmd/db-manager/v1beta1/main.go @@ -28,7 +28,7 @@ import ( api_pb "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" db "github.com/kubeflow/katib/pkg/db/v1beta1" "github.com/kubeflow/katib/pkg/db/v1beta1/common" - "k8s.io/klog" + "k8s.io/klog/v2" "google.golang.org/grpc" "google.golang.org/grpc/reflection" diff --git a/cmd/metricscollector/v1beta1/file-metricscollector/main.go b/cmd/metricscollector/v1beta1/file-metricscollector/main.go index c91a18060bc..07898ec781f 100644 --- a/cmd/metricscollector/v1beta1/file-metricscollector/main.go +++ b/cmd/metricscollector/v1beta1/file-metricscollector/main.go @@ -53,7 +53,7 @@ import ( psutil "github.com/shirou/gopsutil/v3/process" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "k8s.io/klog" + "k8s.io/klog/v2" commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" api "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" diff --git a/cmd/suggestion/goptuna/v1beta1/main.go b/cmd/suggestion/goptuna/v1beta1/main.go index 719405d54cc..b76156660cf 100644 --- a/cmd/suggestion/goptuna/v1beta1/main.go +++ b/cmd/suggestion/goptuna/v1beta1/main.go @@ -24,7 +24,7 @@ import ( api_v1_beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" suggestion "github.com/kubeflow/katib/pkg/suggestion/v1beta1/goptuna" "google.golang.org/grpc" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( diff --git a/go.mod b/go.mod index 3219346c9f4..6e88a207935 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/kubeflow/katib -go 1.22 +go 1.22.0 + +toolchain go1.23.2 require ( github.com/DATA-DOG/go-sqlmock v1.5.0 @@ -14,29 +16,28 @@ require ( github.com/lib/pq v1.10.6 github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a github.com/nxadm/tail v1.4.11 - github.com/onsi/gomega v1.30.0 - github.com/open-policy-agent/cert-controller v0.10.1 - github.com/prometheus/client_golang v1.18.0 + github.com/onsi/gomega v1.34.1 + github.com/open-policy-agent/cert-controller v0.11.0 + github.com/prometheus/client_golang v1.19.1 github.com/shirou/gopsutil/v3 v3.22.5 github.com/spf13/viper v1.9.0 github.com/tidwall/gjson v1.14.1 go.uber.org/mock v0.4.0 google.golang.org/grpc v1.58.3 - google.golang.org/protobuf v1.33.0 - k8s.io/api v0.29.3 - k8s.io/apimachinery v0.29.3 - k8s.io/client-go v0.29.3 - k8s.io/code-generator v0.29.3 - k8s.io/klog v1.0.0 - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 - sigs.k8s.io/controller-runtime v0.17.3 + google.golang.org/protobuf v1.34.1 + k8s.io/api v0.30.7 + k8s.io/apimachinery v0.30.7 + k8s.io/client-go v0.30.7 + k8s.io/code-generator v0.30.7 + k8s.io/klog/v2 v2.130.1 + k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f + sigs.k8s.io/controller-runtime v0.18.5 sigs.k8s.io/structured-merge-diff/v4 v4.4.1 sigs.k8s.io/yaml v1.4.0 ) require ( - cloud.google.com/go/compute v1.21.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.29 // indirect @@ -62,7 +63,7 @@ require ( github.com/aws/smithy-go v1.13.5 // indirect github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230510185313-f5e39e5f34c7 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect @@ -71,16 +72,16 @@ require ( github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker v26.1.5+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.0 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.8.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -88,7 +89,7 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20230516205744-dbecb1de8cfa // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -98,7 +99,6 @@ require ( github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.5 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.4.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -109,9 +109,9 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.53.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect github.com/sirupsen/logrus v1.9.1 // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/cast v1.4.1 // indirect @@ -127,30 +127,27 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.16.1 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect + golang.org/x/mod v0.19.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/oauth2 v0.20.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.23.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect gonum.org/v1/gonum v0.8.2 // indirect - google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.63.2 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.29.2 // indirect - k8s.io/component-base v0.29.2 // indirect - k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect - k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + k8s.io/apiextensions-apiserver v0.30.3 // indirect + k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect ) diff --git a/go.sum b/go.sum index d8ee4e246b7..fa553f56afc 100644 --- a/go.sum +++ b/go.sum @@ -29,10 +29,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= -cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -132,8 +130,8 @@ github.com/c-bata/goptuna v0.8.0 h1:LKIgHVIU73KF5MWAS+mjIZA3b3NMhHVJJhlwfAE3TcA= github.com/c-bata/goptuna v0.8.0/go.mod h1:YXwrUpiw4bkBma0YEL8etW6CTAxKox2m6cWRJDs3F1U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chewxy/hm v1.0.0/go.mod h1:qg9YI4q6Fkj/whwHR1D+bOGeF7SniIP40VweVepLjg0= github.com/chewxy/math32 v1.0.0/go.mod h1:Miac6hA1ohdDUTagnvJy/q+aNnEk16qWUdb8ZVhvCN0= github.com/chewxy/math32 v1.0.6/go.mod h1:dOB2rcuFrCn6UHrze36WSLVPKtzPMRAQvBvUwkSsLqs= @@ -161,7 +159,6 @@ github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfc github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cznic/cc v0.0.0-20181122101902-d673e9b70d4d/go.mod h1:m3fD/V+XTB35Kh9zw6dzjMY+We0Q7PMf6LLIC4vuG9k= github.com/cznic/golex v0.0.0-20181122101858-9c343928389c/go.mod h1:+bmmJDNmKlhWNG+gwWCkaBoTy39Fs+bzRxVBzoTQbIc= github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= @@ -184,8 +181,8 @@ github.com/docker/docker v26.1.5+incompatible h1:NEAxTwEjxV6VbBMBoGG3zPqbiJosIAp github.com/docker/docker v26.1.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= +github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -197,8 +194,8 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= -github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg= +github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -216,26 +213,24 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -318,7 +313,6 @@ github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20230517160804- github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20230516205744-dbecb1de8cfa h1:+MG+Q2Q7mtW6kCIbUPZ9ZMrj7xOWDKI1hhy1qp0ygI0= github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20230516205744-dbecb1de8cfa/go.mod h1:KdL98/Va8Dy1irB6lTxIRIQ7bQj4lbrlvqUzKEQ+ZBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.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= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -338,13 +332,14 @@ github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -465,7 +460,6 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -508,8 +502,6 @@ github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -537,12 +529,12 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -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/open-policy-agent/cert-controller v0.10.1 h1:RXSYoyn8FdCenWecRP//UV5nbVfmstNpj4kHQFkvPK4= -github.com/open-policy-agent/cert-controller v0.10.1/go.mod h1:4uRbBLY5DsPOog+a9pqk3JLxuuhrWsbUedQW65HcLTI= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/open-policy-agent/cert-controller v0.11.0 h1:zXaXeaS4eRAZXhUH5SxWqky681Y2KWjQv/z3X8iMcaQ= +github.com/open-policy-agent/cert-controller v0.11.0/go.mod h1:456gr2XKHzxDOjxJZUST5rLIX8olrHkBUymy49FZzps= github.com/open-policy-agent/frameworks/constraint v0.0.0-20230822235116-f0b62fe1e4c4 h1:5dum5SLEz+95JDLkMls7Z7IDPjvSq3UhJSFe4f5einQ= github.com/open-policy-agent/frameworks/constraint v0.0.0-20230822235116-f0b62fe1e4c4/go.mod h1:54/KzLMvA5ndBVpm7B1OjLeV0cUtTLTz2bZ2OtydLpU= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -567,29 +559,29 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= +github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= @@ -647,8 +639,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/gjson v1.14.1 h1:iymTbGkQBhveq21bEvAQ81I0LEBork8BFe1CUZXdyuo= @@ -729,8 +721,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -745,8 +737,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -774,8 +766,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -823,8 +815,8 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -840,8 +832,8 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= -golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -854,8 +846,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -931,13 +923,13 @@ golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -948,13 +940,13 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1000,7 +992,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1021,8 +1012,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1075,7 +1066,6 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -1177,8 +1167,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1237,31 +1227,26 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= -k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= -k8s.io/apiextensions-apiserver v0.29.2 h1:UK3xB5lOWSnhaCk0RFZ0LUacPZz9RY4wi/yt2Iu+btg= -k8s.io/apiextensions-apiserver v0.29.2/go.mod h1:aLfYjpA5p3OwtqNXQFkhJ56TB+spV8Gc4wfMhUA3/b8= -k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= -k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= -k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= -k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= -k8s.io/code-generator v0.29.3 h1:m7E25/t9R9NvejspO2zBdyu+/Gl0Z5m7dCRc680KS14= -k8s.io/code-generator v0.29.3/go.mod h1:x47ofBhN4gxYFcxeKA1PYXeaPreAGaDN85Y/lNUsPoM= -k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8= -k8s.io/component-base v0.29.2/go.mod h1:BfB3SLrefbZXiBfbM+2H1dlat21Uewg/5qtKOl8degM= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks= -k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-aggregator v0.28.1 h1:rvG4llYnQKHjj6YjjoBPEJxfD1uH0DJwkrJTNKGAaCs= -k8s.io/kube-aggregator v0.28.1/go.mod h1:JaLizMe+AECSpO2OmrWVsvnG0V3dX1RpW+Wq/QHbu18= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.30.7 h1:wB2eHI+IptVYsz5WsAQpI6+Dqi3+11wEWBqIh4fh980= +k8s.io/api v0.30.7/go.mod h1:bR0EwbmhYmJvUoeza7ZzBUmYCrVXccQ9JOdfv0BxhH0= +k8s.io/apiextensions-apiserver v0.30.3 h1:oChu5li2vsZHx2IvnGP3ah8Nj3KyqG3kRSaKmijhB9U= +k8s.io/apiextensions-apiserver v0.30.3/go.mod h1:uhXxYDkMAvl6CJw4lrDN4CPbONkF3+XL9cacCT44kV4= +k8s.io/apimachinery v0.30.7 h1:CoQFxvzPFKwU1eJGN/8LgM3ZJBC3hKgvwGqRrL43uIY= +k8s.io/apimachinery v0.30.7/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/client-go v0.30.7 h1:DQRfuGWxDzxPEyyiTE/fxzAsZcj2p9sbc5671njR52w= +k8s.io/client-go v0.30.7/go.mod h1:oED9+njB91ExCc4BNPAotniB7WH1ig7CmiBx5pVA1yw= +k8s.io/code-generator v0.30.7 h1:Vw8991AoEjwW3qjkJhsTJosrlCN+6+VA3KR7wU28Sc0= +k8s.io/code-generator v0.30.7/go.mod h1:kMe4cE9rGqC9SoXwHqV7VaD4F8G7UL0BQF6NbRqxOdo= +k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= +k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-aggregator v0.30.3 h1:hy5zfQ7p6BuJgc/XtGp3GBh2MPfOj6b1n3raKKMHOQE= +k8s.io/kube-aggregator v0.30.3/go.mod h1:2SP0IckvQoOwwZN8lmtWUnTZTgIpwOWvidWtxyqLwuk= +k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= +k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f/go.mod h1:S9tOR0FxgyusSNR+MboCuiDpVWkAifZvaYI1Q2ubgro= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= @@ -1271,12 +1256,11 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.17.3 h1:65QmN7r3FWgTxDMz9fvGnO1kbf2nu+acg9p2R9oYYYk= -sigs.k8s.io/controller-runtime v0.17.3/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= +sigs.k8s.io/controller-runtime v0.18.5 h1:nTHio/W+Q4aBlQMgbnC5hZb4IjIidyrizMai9P6n4Rk= +sigs.k8s.io/controller-runtime v0.18.5/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/hack/swagger/main.go b/hack/swagger/main.go index eda8a9689bb..5e69bc39051 100644 --- a/hack/swagger/main.go +++ b/hack/swagger/main.go @@ -23,7 +23,7 @@ import ( "strings" "github.com/kubeflow/katib/pkg/apis/v1beta1" - "k8s.io/klog" + "k8s.io/klog/v2" "k8s.io/kube-openapi/pkg/common" "k8s.io/kube-openapi/pkg/validation/spec" ) diff --git a/hack/tools.go b/hack/tools.go index d4ae070e257..4accf08943f 100644 --- a/hack/tools.go +++ b/hack/tools.go @@ -26,5 +26,5 @@ import ( _ "k8s.io/code-generator/cmd/defaulter-gen" _ "k8s.io/code-generator/cmd/informer-gen" _ "k8s.io/code-generator/cmd/lister-gen" - _ "k8s.io/code-generator/cmd/openapi-gen" + _ "k8s.io/kube-openapi/cmd/openapi-gen" ) diff --git a/pkg/db/v1beta1/common/connection.go b/pkg/db/v1beta1/common/connection.go index 2f65e19ce96..5709d0594a2 100644 --- a/pkg/db/v1beta1/common/connection.go +++ b/pkg/db/v1beta1/common/connection.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "k8s.io/klog" + "k8s.io/klog/v2" ) func OpenSQLConn(driverName string, dataSourceName string, interval time.Duration, diff --git a/pkg/db/v1beta1/db.go b/pkg/db/v1beta1/db.go index d5834711023..19a16aad78e 100644 --- a/pkg/db/v1beta1/db.go +++ b/pkg/db/v1beta1/db.go @@ -23,7 +23,7 @@ import ( "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/db/v1beta1/mysql" "github.com/kubeflow/katib/pkg/db/v1beta1/postgres" - "k8s.io/klog" + "k8s.io/klog/v2" ) func NewKatibDBInterface(dbName string, connectTimeout time.Duration) (common.KatibDBInterface, error) { diff --git a/pkg/db/v1beta1/mysql/init.go b/pkg/db/v1beta1/mysql/init.go index fe2a2987f0b..48587d2d449 100644 --- a/pkg/db/v1beta1/mysql/init.go +++ b/pkg/db/v1beta1/mysql/init.go @@ -19,7 +19,7 @@ package mysql import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/util/v1beta1/env" diff --git a/pkg/db/v1beta1/mysql/mysql.go b/pkg/db/v1beta1/mysql/mysql.go index b17aee8705f..4c25a188bed 100644 --- a/pkg/db/v1beta1/mysql/mysql.go +++ b/pkg/db/v1beta1/mysql/mysql.go @@ -23,7 +23,7 @@ import ( "time" _ "github.com/go-sql-driver/mysql" - "k8s.io/klog" + "k8s.io/klog/v2" v1beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" "github.com/kubeflow/katib/pkg/db/v1beta1/common" diff --git a/pkg/db/v1beta1/postgres/init.go b/pkg/db/v1beta1/postgres/init.go index 71c573128c2..6318d0eb983 100644 --- a/pkg/db/v1beta1/postgres/init.go +++ b/pkg/db/v1beta1/postgres/init.go @@ -19,7 +19,7 @@ package postgres import ( "fmt" - "k8s.io/klog" + "k8s.io/klog/v2" "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/util/v1beta1/env" diff --git a/pkg/db/v1beta1/postgres/postgres.go b/pkg/db/v1beta1/postgres/postgres.go index af60d0b0efc..808af5ad93c 100644 --- a/pkg/db/v1beta1/postgres/postgres.go +++ b/pkg/db/v1beta1/postgres/postgres.go @@ -27,7 +27,7 @@ import ( v1beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/util/v1beta1/env" - "k8s.io/klog" + "k8s.io/klog/v2" ) const dbDriver = "postgres" diff --git a/pkg/metricscollector/v1beta1/common/pns.go b/pkg/metricscollector/v1beta1/common/pns.go index 66a5a3f0bb5..08a657d6235 100644 --- a/pkg/metricscollector/v1beta1/common/pns.go +++ b/pkg/metricscollector/v1beta1/common/pns.go @@ -25,7 +25,7 @@ import ( "time" psutil "github.com/shirou/gopsutil/v3/process" - "k8s.io/klog" + "k8s.io/klog/v2" ) // WaitPidsOpts is the input options for metrics collector diff --git a/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go b/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go index 27b4520c4cb..a9ddc9ba2cd 100644 --- a/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go +++ b/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go @@ -27,7 +27,7 @@ import ( "strings" "time" - "k8s.io/klog" + "k8s.io/klog/v2" commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" v1beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" diff --git a/pkg/suggestion/v1beta1/goptuna/service.go b/pkg/suggestion/v1beta1/goptuna/service.go index f9f17486b6f..10cea4b3814 100644 --- a/pkg/suggestion/v1beta1/goptuna/service.go +++ b/pkg/suggestion/v1beta1/goptuna/service.go @@ -24,7 +24,7 @@ import ( api_v1_beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "k8s.io/klog" + "k8s.io/klog/v2" ) const ( From b608ee0a4f2cfadac91cf567f8858f35601e3ee8 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Sun, 8 Dec 2024 15:24:50 +0000 Subject: [PATCH 02/20] chore: replace source.Kind and EnqueueRequestForXxx with typed func call. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- .../experiment/experiment_controller.go | 20 +++++++++++--- .../suggestion/suggestion_controller.go | 27 +++++++++++++++---- .../trial/trial_controller.go | 13 ++++++--- 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/pkg/controller.v1beta1/experiment/experiment_controller.go b/pkg/controller.v1beta1/experiment/experiment_controller.go index 8e7fea16a87..06b3fa6395d 100644 --- a/pkg/controller.v1beta1/experiment/experiment_controller.go +++ b/pkg/controller.v1beta1/experiment/experiment_controller.go @@ -114,19 +114,31 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { // addWatch adds a new Controller to mgr with r as the reconcile.Reconciler func addWatch(mgr manager.Manager, c controller.Controller) error { // Watch for changes to Experiment - err := c.Watch(source.Kind(mgr.GetCache(), &experimentsv1beta1.Experiment{}), &handler.EnqueueRequestForObject{}) + err := c.Watch(source.Kind[*experimentsv1beta1.Experiment]( + mgr.GetCache(), &experimentsv1beta1.Experiment{}, + &handler.TypedEnqueueRequestForObject[*experimentsv1beta1.Experiment]{}, + )) if err != nil { log.Error(err, "Experiment watch failed") return err } // Watch for trials for the experiments - eventHandler := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &experimentsv1beta1.Experiment{}, handler.OnlyControllerOwner()) - if err = c.Watch(source.Kind(mgr.GetCache(), &trialsv1beta1.Trial{}), eventHandler); err != nil { + if err = c.Watch(source.Kind[*trialsv1beta1.Trial]( + mgr.GetCache(), &trialsv1beta1.Trial{}, + handler.TypedEnqueueRequestForOwner[*trialsv1beta1.Trial]( + mgr.GetScheme(), mgr.GetRESTMapper(), &experimentsv1beta1.Experiment{}, handler.OnlyControllerOwner(), + ), + )); err != nil { log.Error(err, "Trial watch failed") return err } - if err = c.Watch(source.Kind(mgr.GetCache(), &suggestionsv1beta1.Suggestion{}), eventHandler); err != nil { + if err = c.Watch(source.Kind[*suggestionsv1beta1.Suggestion]( + mgr.GetCache(), &suggestionsv1beta1.Suggestion{}, + handler.TypedEnqueueRequestForOwner[*suggestionsv1beta1.Suggestion]( + mgr.GetScheme(), mgr.GetRESTMapper(), &experimentsv1beta1.Experiment{}, handler.OnlyControllerOwner(), + ), + )); err != nil { log.Error(err, "Suggestion watch failed") return err } diff --git a/pkg/controller.v1beta1/suggestion/suggestion_controller.go b/pkg/controller.v1beta1/suggestion/suggestion_controller.go index dce70104d30..ef77ae62a03 100644 --- a/pkg/controller.v1beta1/suggestion/suggestion_controller.go +++ b/pkg/controller.v1beta1/suggestion/suggestion_controller.go @@ -75,18 +75,35 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { return err } - if err = c.Watch(source.Kind(mgr.GetCache(), &suggestionsv1beta1.Suggestion{}), &handler.EnqueueRequestForObject{}); err != nil { + if err = c.Watch(source.Kind[*suggestionsv1beta1.Suggestion]( + mgr.GetCache(), &suggestionsv1beta1.Suggestion{}, + &handler.TypedEnqueueRequestForObject[*suggestionsv1beta1.Suggestion]{}, + )); err != nil { return err } - eventHandler := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &suggestionsv1beta1.Suggestion{}, handler.OnlyControllerOwner()) - if err = c.Watch(source.Kind(mgr.GetCache(), &appsv1.Deployment{}), eventHandler); err != nil { + if err = c.Watch(source.Kind[*appsv1.Deployment]( + mgr.GetCache(), &appsv1.Deployment{}, + handler.TypedEnqueueRequestForOwner[*appsv1.Deployment]( + mgr.GetScheme(), mgr.GetRESTMapper(), &suggestionsv1beta1.Suggestion{}, handler.OnlyControllerOwner(), + ), + )); err != nil { return err } - if err = c.Watch(source.Kind(mgr.GetCache(), &corev1.Service{}), eventHandler); err != nil { + if err = c.Watch(source.Kind[*corev1.Service]( + mgr.GetCache(), &corev1.Service{}, + handler.TypedEnqueueRequestForOwner[*corev1.Service]( + mgr.GetScheme(), mgr.GetRESTMapper(), &suggestionsv1beta1.Suggestion{}, handler.OnlyControllerOwner(), + ), + )); err != nil { return err } - if err = c.Watch(source.Kind(mgr.GetCache(), &corev1.PersistentVolumeClaim{}), eventHandler); err != nil { + if err = c.Watch(source.Kind[*corev1.PersistentVolumeClaim]( + mgr.GetCache(), &corev1.PersistentVolumeClaim{}, + handler.TypedEnqueueRequestForOwner[*corev1.PersistentVolumeClaim]( + mgr.GetScheme(), mgr.GetRESTMapper(), &suggestionsv1beta1.Suggestion{}, handler.OnlyControllerOwner(), + ), + )); err != nil { return err } diff --git a/pkg/controller.v1beta1/trial/trial_controller.go b/pkg/controller.v1beta1/trial/trial_controller.go index 1a8b5084dcf..637a7a4468c 100644 --- a/pkg/controller.v1beta1/trial/trial_controller.go +++ b/pkg/controller.v1beta1/trial/trial_controller.go @@ -92,7 +92,10 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch for changes in Trial - if err = c.Watch(source.Kind(mgr.GetCache(), &trialsv1beta1.Trial{}), &handler.EnqueueRequestForObject{}); err != nil { + if err = c.Watch(source.Kind[*trialsv1beta1.Trial]( + mgr.GetCache(), &trialsv1beta1.Trial{}, + &handler.TypedEnqueueRequestForObject[*trialsv1beta1.Trial]{}, + )); err != nil { log.Error(err, "Trial watch error") return err } @@ -117,8 +120,12 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { // Watch for the CRD changes. unstructuredJob := &unstructured.Unstructured{} unstructuredJob.SetGroupVersionKind(gvk) - eventHandler := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &trialsv1beta1.Trial{}, handler.OnlyControllerOwner()) - if err = c.Watch(source.Kind(mgr.GetCache(), unstructuredJob), eventHandler); err != nil { + if err = c.Watch(source.Kind[*unstructured.Unstructured]( + mgr.GetCache(), unstructuredJob, + handler.TypedEnqueueRequestForOwner[*unstructured.Unstructured]( + mgr.GetScheme(), mgr.GetRESTMapper(), &trialsv1beta1.Trial{}, handler.OnlyControllerOwner(), + ), + )); err != nil { return err } log.Info("Job watch added successfully", From bc49242c79e1e4a4a9d0c38935135bea94a63ffc Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Sun, 8 Dec 2024 15:29:45 +0000 Subject: [PATCH 03/20] chore: update admission.Decoder in webhook. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- pkg/webhook/v1beta1/experiment/mutate_webhook.go | 4 ++-- pkg/webhook/v1beta1/experiment/validation_webhook.go | 4 ++-- pkg/webhook/v1beta1/pod/inject_webhook.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/webhook/v1beta1/experiment/mutate_webhook.go b/pkg/webhook/v1beta1/experiment/mutate_webhook.go index 85dd00a4a95..63d9d41591a 100644 --- a/pkg/webhook/v1beta1/experiment/mutate_webhook.go +++ b/pkg/webhook/v1beta1/experiment/mutate_webhook.go @@ -30,11 +30,11 @@ import ( // ExperimentDefaulter sets the Experiment default values. type ExperimentDefaulter struct { client client.Client - decoder *admission.Decoder + decoder admission.Decoder } // NewExperimentDefaulter returns a new Experiment defaulter with the given client. -func NewExperimentDefaulter(c client.Client, d *admission.Decoder) *ExperimentDefaulter { +func NewExperimentDefaulter(c client.Client, d admission.Decoder) *ExperimentDefaulter { return &ExperimentDefaulter{ client: c, decoder: d, diff --git a/pkg/webhook/v1beta1/experiment/validation_webhook.go b/pkg/webhook/v1beta1/experiment/validation_webhook.go index e8ea920f9b5..fd84b214620 100644 --- a/pkg/webhook/v1beta1/experiment/validation_webhook.go +++ b/pkg/webhook/v1beta1/experiment/validation_webhook.go @@ -42,12 +42,12 @@ import ( // ExperimentValidator validates Experiments. type ExperimentValidator struct { client client.Client - decoder *admission.Decoder + decoder admission.Decoder validator.Validator } // NewExperimentValidator returns a new Experiment validator with the given client. -func NewExperimentValidator(c client.Client, d *admission.Decoder) *ExperimentValidator { +func NewExperimentValidator(c client.Client, d admission.Decoder) *ExperimentValidator { p := manifest.New(c) return &ExperimentValidator{ client: c, diff --git a/pkg/webhook/v1beta1/pod/inject_webhook.go b/pkg/webhook/v1beta1/pod/inject_webhook.go index 96deaf23c1d..cb93d07fb8d 100644 --- a/pkg/webhook/v1beta1/pod/inject_webhook.go +++ b/pkg/webhook/v1beta1/pod/inject_webhook.go @@ -58,7 +58,7 @@ var ( // SidecarInjector injects metrics collect sidecar to the primary pod. type SidecarInjector struct { client client.Client - decoder *admission.Decoder + decoder admission.Decoder // injectSecurityContext indicates if we should inject the security // context into the metrics collector sidecar. @@ -66,7 +66,7 @@ type SidecarInjector struct { } // NewSidecarInjector returns a new sidecar injector with the given client. -func NewSidecarInjector(c client.Client, d *admission.Decoder) *SidecarInjector { +func NewSidecarInjector(c client.Client, d admission.Decoder) *SidecarInjector { return &SidecarInjector{ injectSecurityContext: viper.GetBool(consts.ConfigInjectSecurityContext), client: c, From dc3625c2eada4085fd1946ce1a8320b0054a4eed Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Sun, 8 Dec 2024 15:51:13 +0000 Subject: [PATCH 04/20] chore: update Makefile. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a6708de7f5b..172116d525b 100755 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ HAS_MOCKGEN := $(shell command -v mockgen;) COMMIT := v1beta1-$(shell git rev-parse --short=7 HEAD) KATIB_REGISTRY := docker.io/kubeflowkatib CPU_ARCH ?= linux/amd64,linux/arm64 -ENVTEST_K8S_VERSION ?= 1.29 +ENVTEST_K8S_VERSION ?= 1.30 MOCKGEN_VERSION ?= $(shell grep 'go.uber.org/mock' go.mod | cut -d ' ' -f 2) GO_VERSION=$(shell grep '^go' go.mod | cut -d ' ' -f 2) GOPATH ?= $(shell go env GOPATH) @@ -21,7 +21,7 @@ test: envtest envtest: ifndef HAS_SETUP_ENVTEST - go install sigs.k8s.io/controller-runtime/tools/setup-envtest@bf15e44028f908c790721fc8fe67c7bf2d06a611 #v0.17.3 + go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.18 $(info "setup-envtest has been installed") endif $(info "setup-envtest has already installed") @@ -82,7 +82,7 @@ sync-go-mod: CONTROLLER_GEN = $(shell pwd)/bin/controller-gen .PHONY: controller-gen controller-gen: - @GOBIN=$(shell pwd)/bin GO111MODULE=on go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0 + @GOBIN=$(shell pwd)/bin GO111MODULE=on go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5 # Run this if you update any existing controller APIs. # 1. Generate deepcopy, clientset, listers, informers for the APIs (hack/update-codegen.sh) From 0a831832e498cbbd0830ff78b472c40895980fb0 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 08:06:55 +0000 Subject: [PATCH 05/20] fix: update codegen script. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-codegen.sh | 62 ++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index ae1925f6253..552a4b053d3 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -20,42 +20,26 @@ set -o pipefail echo "Generate deepcopy, clientset, listers, informers for the APIs" -if [[ -z "${GOPATH:-}" ]]; then - GOPATH=$(go env GOPATH) - export GOPATH -fi - -# Grab code-generator version from go.mod -CODEGEN_VERSION=$(cd ../.. && grep 'k8s.io/code-generator' go.mod | awk '{print $2}') -CODEGEN_PKG="$GOPATH/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}" - -if [[ ! -d "${CODEGEN_PKG}" ]]; then - echo "${CODEGEN_PKG} is missing. Please run 'go mod download'." - exit 0 -fi - -echo ">> Using ${CODEGEN_PKG} for the code generator" - -# Ensure we can execute. -chmod +x "${CODEGEN_PKG}/generate-groups.sh" -chmod +x "${CODEGEN_PKG}/generate-internal-groups.sh" - -PROJECT_ROOT=${GOPATH}/src/github.com/kubeflow/katib - -modules=(experiments suggestions trials common) -versions=(v1beta1) -versionStr=$(printf ",%s" "${versions[@]}") -GROUP_VERSIONS=$(printf "%s:${versionStr:1} " "${modules[@]}") - -echo "Generating clients for ${GROUP_VERSIONS} ..." -"${CODEGEN_PKG}/generate-groups.sh" \ - all \ - github.com/kubeflow/katib/pkg/client/controller \ - github.com/kubeflow/katib/pkg/apis/controller \ - "${GROUP_VERSIONS}" \ - --go-header-file "${PROJECT_ROOT}/hack/boilerplate/boilerplate.go.txt" - -echo "Generating deepcopy for config.kubeflow.org ..." -"${PROJECT_ROOT}/bin/controller-gen" \ - object:headerFile="${PROJECT_ROOT}/hack/boilerplate/boilerplate.go.txt" \ - paths="${PROJECT_ROOT}/pkg/apis/config/..." +CURRENT_DIR=$(dirname "${BASH_SOURCE[0]}") +KATIB_ROOT=$(realpath "${CURRENT_DIR}/..") +KATIB_PKG="github.com/kubeflow/katib" +CODEGEN_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/code-generator) + +cd "$CURRENT_DIR/.." + +# shellcheck source=/dev/null +source "${CODEGEN_PKG}/kube_codegen.sh" + +echo "Generating conversion and defaults functions for config.kubeflow.org ..." +kube::codegen::gen_helpers \ + --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ + "${KATIB_ROOT}/pkg/apis/config" + +echo "Generating clients for config.kubeflow.org ..." +kube::codegen::gen_client \ + --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ + --output-dir "${TRAINING_OPERATOR_ROOT}/pkg/client/controller" \ + --output-pkg "${KATIB_PKG}/pkg/client/controller" \ + --with-watch \ + --with-applyconfig \ + "${KATIB_ROOT}/pkg/apis/controller" From 538cec632dfbc18a46af992371f74d30d41433ce Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 08:09:41 +0000 Subject: [PATCH 06/20] chore: execute update-codegen.sh. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-codegen.sh | 2 +- .../common/v1beta1/algorithmsetting.go | 48 --------- .../common/v1beta1/algorithmspec.go | 53 --------- .../common/v1beta1/collectorspec.go | 53 --------- .../common/v1beta1/earlystoppingrule.go | 70 ------------ .../common/v1beta1/earlystoppingsetting.go | 48 --------- .../common/v1beta1/earlystoppingspec.go | 53 --------- .../common/v1beta1/filesystempath.go | 61 ----------- .../common/v1beta1/filterspec.go | 41 ------- .../common/v1beta1/metric.go | 66 ------------ .../common/v1beta1/metricscollectorspec.go | 48 --------- .../common/v1beta1/metricstrategy.go | 52 --------- .../common/v1beta1/objectivespec.go | 86 --------------- .../common/v1beta1/observation.go | 44 -------- .../common/v1beta1/parameterassignment.go | 48 --------- .../common/v1beta1/sourcespec.go | 61 ----------- .../experiments/v1beta1/experimentspec.go | 40 +++---- .../experiments/v1beta1/optimaltrial.go | 19 ++-- .../suggestions/v1beta1/suggestionspec.go | 18 ++-- .../suggestions/v1beta1/suggestionstatus.go | 23 ++-- .../suggestions/v1beta1/trialassignment.go | 24 ++--- .../trials/v1beta1/trialspec.go | 46 ++++---- .../trials/v1beta1/trialstatus.go | 16 +-- .../controller/applyconfiguration/utils.go | 96 ++++++----------- .../clientset/versioned/clientset.go | 13 --- .../versioned/fake/clientset_generated.go | 7 -- .../clientset/versioned/fake/register.go | 2 - .../clientset/versioned/scheme/register.go | 2 - .../typed/common/v1beta1/common_client.go | 102 ------------------ .../versioned/typed/common/v1beta1/doc.go | 20 ---- .../typed/common/v1beta1/fake/doc.go | 20 ---- .../common/v1beta1/fake/fake_common_client.go | 35 ------ .../common/v1beta1/generated_expansion.go | 19 ---- 33 files changed, 116 insertions(+), 1220 deletions(-) delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/algorithmspec.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/collectorspec.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingrule.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingsetting.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingspec.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/filesystempath.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/filterspec.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/metric.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/metricscollectorspec.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/metricstrategy.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/objectivespec.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/observation.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/parameterassignment.go delete mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/sourcespec.go delete mode 100644 pkg/client/controller/clientset/versioned/typed/common/v1beta1/common_client.go delete mode 100644 pkg/client/controller/clientset/versioned/typed/common/v1beta1/doc.go delete mode 100644 pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/doc.go delete mode 100644 pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/fake_common_client.go delete mode 100644 pkg/client/controller/clientset/versioned/typed/common/v1beta1/generated_expansion.go diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 552a4b053d3..39d7507c590 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -38,7 +38,7 @@ kube::codegen::gen_helpers \ echo "Generating clients for config.kubeflow.org ..." kube::codegen::gen_client \ --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ - --output-dir "${TRAINING_OPERATOR_ROOT}/pkg/client/controller" \ + --output-dir "${KATIB_ROOT}/pkg/client/controller" \ --output-pkg "${KATIB_PKG}/pkg/client/controller" \ --with-watch \ --with-applyconfig \ diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go b/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go deleted file mode 100644 index 4fba0d09e86..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// AlgorithmSettingApplyConfiguration represents an declarative configuration of the AlgorithmSetting type for use -// with apply. -type AlgorithmSettingApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} - -// AlgorithmSettingApplyConfiguration constructs an declarative configuration of the AlgorithmSetting type for use with -// apply. -func AlgorithmSetting() *AlgorithmSettingApplyConfiguration { - return &AlgorithmSettingApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AlgorithmSettingApplyConfiguration) WithName(value string) *AlgorithmSettingApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *AlgorithmSettingApplyConfiguration) WithValue(value string) *AlgorithmSettingApplyConfiguration { - b.Value = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmspec.go b/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmspec.go deleted file mode 100644 index 099f7bc4944..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmspec.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// AlgorithmSpecApplyConfiguration represents an declarative configuration of the AlgorithmSpec type for use -// with apply. -type AlgorithmSpecApplyConfiguration struct { - AlgorithmName *string `json:"algorithmName,omitempty"` - AlgorithmSettings []AlgorithmSettingApplyConfiguration `json:"algorithmSettings,omitempty"` -} - -// AlgorithmSpecApplyConfiguration constructs an declarative configuration of the AlgorithmSpec type for use with -// apply. -func AlgorithmSpec() *AlgorithmSpecApplyConfiguration { - return &AlgorithmSpecApplyConfiguration{} -} - -// WithAlgorithmName sets the AlgorithmName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AlgorithmName field is set to the value of the last call. -func (b *AlgorithmSpecApplyConfiguration) WithAlgorithmName(value string) *AlgorithmSpecApplyConfiguration { - b.AlgorithmName = &value - return b -} - -// WithAlgorithmSettings adds the given value to the AlgorithmSettings field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AlgorithmSettings field. -func (b *AlgorithmSpecApplyConfiguration) WithAlgorithmSettings(values ...*AlgorithmSettingApplyConfiguration) *AlgorithmSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAlgorithmSettings") - } - b.AlgorithmSettings = append(b.AlgorithmSettings, *values[i]) - } - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/collectorspec.go b/pkg/client/controller/applyconfiguration/common/v1beta1/collectorspec.go deleted file mode 100644 index 532caaa4eb1..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/collectorspec.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" - v1 "k8s.io/api/core/v1" -) - -// CollectorSpecApplyConfiguration represents an declarative configuration of the CollectorSpec type for use -// with apply. -type CollectorSpecApplyConfiguration struct { - Kind *v1beta1.CollectorKind `json:"kind,omitempty"` - CustomCollector *v1.Container `json:"customCollector,omitempty"` -} - -// CollectorSpecApplyConfiguration constructs an declarative configuration of the CollectorSpec type for use with -// apply. -func CollectorSpec() *CollectorSpecApplyConfiguration { - return &CollectorSpecApplyConfiguration{} -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CollectorSpecApplyConfiguration) WithKind(value v1beta1.CollectorKind) *CollectorSpecApplyConfiguration { - b.Kind = &value - return b -} - -// WithCustomCollector sets the CustomCollector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CustomCollector field is set to the value of the last call. -func (b *CollectorSpecApplyConfiguration) WithCustomCollector(value v1.Container) *CollectorSpecApplyConfiguration { - b.CustomCollector = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingrule.go b/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingrule.go deleted file mode 100644 index 6e5883f13fa..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingrule.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" -) - -// EarlyStoppingRuleApplyConfiguration represents an declarative configuration of the EarlyStoppingRule type for use -// with apply. -type EarlyStoppingRuleApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` - Comparison *v1beta1.ComparisonType `json:"comparison,omitempty"` - StartStep *int `json:"startStep,omitempty"` -} - -// EarlyStoppingRuleApplyConfiguration constructs an declarative configuration of the EarlyStoppingRule type for use with -// apply. -func EarlyStoppingRule() *EarlyStoppingRuleApplyConfiguration { - return &EarlyStoppingRuleApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *EarlyStoppingRuleApplyConfiguration) WithName(value string) *EarlyStoppingRuleApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *EarlyStoppingRuleApplyConfiguration) WithValue(value string) *EarlyStoppingRuleApplyConfiguration { - b.Value = &value - return b -} - -// WithComparison sets the Comparison field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Comparison field is set to the value of the last call. -func (b *EarlyStoppingRuleApplyConfiguration) WithComparison(value v1beta1.ComparisonType) *EarlyStoppingRuleApplyConfiguration { - b.Comparison = &value - return b -} - -// WithStartStep sets the StartStep field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StartStep field is set to the value of the last call. -func (b *EarlyStoppingRuleApplyConfiguration) WithStartStep(value int) *EarlyStoppingRuleApplyConfiguration { - b.StartStep = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingsetting.go b/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingsetting.go deleted file mode 100644 index cc529f10fe7..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingsetting.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// EarlyStoppingSettingApplyConfiguration represents an declarative configuration of the EarlyStoppingSetting type for use -// with apply. -type EarlyStoppingSettingApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} - -// EarlyStoppingSettingApplyConfiguration constructs an declarative configuration of the EarlyStoppingSetting type for use with -// apply. -func EarlyStoppingSetting() *EarlyStoppingSettingApplyConfiguration { - return &EarlyStoppingSettingApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *EarlyStoppingSettingApplyConfiguration) WithName(value string) *EarlyStoppingSettingApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *EarlyStoppingSettingApplyConfiguration) WithValue(value string) *EarlyStoppingSettingApplyConfiguration { - b.Value = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingspec.go b/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingspec.go deleted file mode 100644 index e8755a76b06..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingspec.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// EarlyStoppingSpecApplyConfiguration represents an declarative configuration of the EarlyStoppingSpec type for use -// with apply. -type EarlyStoppingSpecApplyConfiguration struct { - AlgorithmName *string `json:"algorithmName,omitempty"` - AlgorithmSettings []EarlyStoppingSettingApplyConfiguration `json:"algorithmSettings,omitempty"` -} - -// EarlyStoppingSpecApplyConfiguration constructs an declarative configuration of the EarlyStoppingSpec type for use with -// apply. -func EarlyStoppingSpec() *EarlyStoppingSpecApplyConfiguration { - return &EarlyStoppingSpecApplyConfiguration{} -} - -// WithAlgorithmName sets the AlgorithmName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AlgorithmName field is set to the value of the last call. -func (b *EarlyStoppingSpecApplyConfiguration) WithAlgorithmName(value string) *EarlyStoppingSpecApplyConfiguration { - b.AlgorithmName = &value - return b -} - -// WithAlgorithmSettings adds the given value to the AlgorithmSettings field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AlgorithmSettings field. -func (b *EarlyStoppingSpecApplyConfiguration) WithAlgorithmSettings(values ...*EarlyStoppingSettingApplyConfiguration) *EarlyStoppingSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAlgorithmSettings") - } - b.AlgorithmSettings = append(b.AlgorithmSettings, *values[i]) - } - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/filesystempath.go b/pkg/client/controller/applyconfiguration/common/v1beta1/filesystempath.go deleted file mode 100644 index 634943c1314..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/filesystempath.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" -) - -// FileSystemPathApplyConfiguration represents an declarative configuration of the FileSystemPath type for use -// with apply. -type FileSystemPathApplyConfiguration struct { - Path *string `json:"path,omitempty"` - Kind *v1beta1.FileSystemKind `json:"kind,omitempty"` - Format *v1beta1.FileFormat `json:"format,omitempty"` -} - -// FileSystemPathApplyConfiguration constructs an declarative configuration of the FileSystemPath type for use with -// apply. -func FileSystemPath() *FileSystemPathApplyConfiguration { - return &FileSystemPathApplyConfiguration{} -} - -// WithPath sets the Path field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Path field is set to the value of the last call. -func (b *FileSystemPathApplyConfiguration) WithPath(value string) *FileSystemPathApplyConfiguration { - b.Path = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *FileSystemPathApplyConfiguration) WithKind(value v1beta1.FileSystemKind) *FileSystemPathApplyConfiguration { - b.Kind = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *FileSystemPathApplyConfiguration) WithFormat(value v1beta1.FileFormat) *FileSystemPathApplyConfiguration { - b.Format = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/filterspec.go b/pkg/client/controller/applyconfiguration/common/v1beta1/filterspec.go deleted file mode 100644 index e5fa98c995b..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/filterspec.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// FilterSpecApplyConfiguration represents an declarative configuration of the FilterSpec type for use -// with apply. -type FilterSpecApplyConfiguration struct { - MetricsFormat []string `json:"metricsFormat,omitempty"` -} - -// FilterSpecApplyConfiguration constructs an declarative configuration of the FilterSpec type for use with -// apply. -func FilterSpec() *FilterSpecApplyConfiguration { - return &FilterSpecApplyConfiguration{} -} - -// WithMetricsFormat adds the given value to the MetricsFormat field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MetricsFormat field. -func (b *FilterSpecApplyConfiguration) WithMetricsFormat(values ...string) *FilterSpecApplyConfiguration { - for i := range values { - b.MetricsFormat = append(b.MetricsFormat, values[i]) - } - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/metric.go b/pkg/client/controller/applyconfiguration/common/v1beta1/metric.go deleted file mode 100644 index f8437349a62..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/metric.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// MetricApplyConfiguration represents an declarative configuration of the Metric type for use -// with apply. -type MetricApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Min *string `json:"min,omitempty"` - Max *string `json:"max,omitempty"` - Latest *string `json:"latest,omitempty"` -} - -// MetricApplyConfiguration constructs an declarative configuration of the Metric type for use with -// apply. -func Metric() *MetricApplyConfiguration { - return &MetricApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *MetricApplyConfiguration) WithName(value string) *MetricApplyConfiguration { - b.Name = &value - return b -} - -// WithMin sets the Min field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Min field is set to the value of the last call. -func (b *MetricApplyConfiguration) WithMin(value string) *MetricApplyConfiguration { - b.Min = &value - return b -} - -// WithMax sets the Max field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Max field is set to the value of the last call. -func (b *MetricApplyConfiguration) WithMax(value string) *MetricApplyConfiguration { - b.Max = &value - return b -} - -// WithLatest sets the Latest field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Latest field is set to the value of the last call. -func (b *MetricApplyConfiguration) WithLatest(value string) *MetricApplyConfiguration { - b.Latest = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/metricscollectorspec.go b/pkg/client/controller/applyconfiguration/common/v1beta1/metricscollectorspec.go deleted file mode 100644 index 74919f36f36..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/metricscollectorspec.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// MetricsCollectorSpecApplyConfiguration represents an declarative configuration of the MetricsCollectorSpec type for use -// with apply. -type MetricsCollectorSpecApplyConfiguration struct { - Source *SourceSpecApplyConfiguration `json:"source,omitempty"` - Collector *CollectorSpecApplyConfiguration `json:"collector,omitempty"` -} - -// MetricsCollectorSpecApplyConfiguration constructs an declarative configuration of the MetricsCollectorSpec type for use with -// apply. -func MetricsCollectorSpec() *MetricsCollectorSpecApplyConfiguration { - return &MetricsCollectorSpecApplyConfiguration{} -} - -// WithSource sets the Source field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Source field is set to the value of the last call. -func (b *MetricsCollectorSpecApplyConfiguration) WithSource(value *SourceSpecApplyConfiguration) *MetricsCollectorSpecApplyConfiguration { - b.Source = value - return b -} - -// WithCollector sets the Collector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Collector field is set to the value of the last call. -func (b *MetricsCollectorSpecApplyConfiguration) WithCollector(value *CollectorSpecApplyConfiguration) *MetricsCollectorSpecApplyConfiguration { - b.Collector = value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/metricstrategy.go b/pkg/client/controller/applyconfiguration/common/v1beta1/metricstrategy.go deleted file mode 100644 index 93e0a13358e..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/metricstrategy.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" -) - -// MetricStrategyApplyConfiguration represents an declarative configuration of the MetricStrategy type for use -// with apply. -type MetricStrategyApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Value *v1beta1.MetricStrategyType `json:"value,omitempty"` -} - -// MetricStrategyApplyConfiguration constructs an declarative configuration of the MetricStrategy type for use with -// apply. -func MetricStrategy() *MetricStrategyApplyConfiguration { - return &MetricStrategyApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *MetricStrategyApplyConfiguration) WithName(value string) *MetricStrategyApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *MetricStrategyApplyConfiguration) WithValue(value v1beta1.MetricStrategyType) *MetricStrategyApplyConfiguration { - b.Value = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/objectivespec.go b/pkg/client/controller/applyconfiguration/common/v1beta1/objectivespec.go deleted file mode 100644 index eff376e20ec..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/objectivespec.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" -) - -// ObjectiveSpecApplyConfiguration represents an declarative configuration of the ObjectiveSpec type for use -// with apply. -type ObjectiveSpecApplyConfiguration struct { - Type *v1beta1.ObjectiveType `json:"type,omitempty"` - Goal *float64 `json:"goal,omitempty"` - ObjectiveMetricName *string `json:"objectiveMetricName,omitempty"` - AdditionalMetricNames []string `json:"additionalMetricNames,omitempty"` - MetricStrategies []MetricStrategyApplyConfiguration `json:"metricStrategies,omitempty"` -} - -// ObjectiveSpecApplyConfiguration constructs an declarative configuration of the ObjectiveSpec type for use with -// apply. -func ObjectiveSpec() *ObjectiveSpecApplyConfiguration { - return &ObjectiveSpecApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *ObjectiveSpecApplyConfiguration) WithType(value v1beta1.ObjectiveType) *ObjectiveSpecApplyConfiguration { - b.Type = &value - return b -} - -// WithGoal sets the Goal field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Goal field is set to the value of the last call. -func (b *ObjectiveSpecApplyConfiguration) WithGoal(value float64) *ObjectiveSpecApplyConfiguration { - b.Goal = &value - return b -} - -// WithObjectiveMetricName sets the ObjectiveMetricName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObjectiveMetricName field is set to the value of the last call. -func (b *ObjectiveSpecApplyConfiguration) WithObjectiveMetricName(value string) *ObjectiveSpecApplyConfiguration { - b.ObjectiveMetricName = &value - return b -} - -// WithAdditionalMetricNames adds the given value to the AdditionalMetricNames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalMetricNames field. -func (b *ObjectiveSpecApplyConfiguration) WithAdditionalMetricNames(values ...string) *ObjectiveSpecApplyConfiguration { - for i := range values { - b.AdditionalMetricNames = append(b.AdditionalMetricNames, values[i]) - } - return b -} - -// WithMetricStrategies adds the given value to the MetricStrategies field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MetricStrategies field. -func (b *ObjectiveSpecApplyConfiguration) WithMetricStrategies(values ...*MetricStrategyApplyConfiguration) *ObjectiveSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithMetricStrategies") - } - b.MetricStrategies = append(b.MetricStrategies, *values[i]) - } - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/observation.go b/pkg/client/controller/applyconfiguration/common/v1beta1/observation.go deleted file mode 100644 index 0d40846837b..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/observation.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// ObservationApplyConfiguration represents an declarative configuration of the Observation type for use -// with apply. -type ObservationApplyConfiguration struct { - Metrics []MetricApplyConfiguration `json:"metrics,omitempty"` -} - -// ObservationApplyConfiguration constructs an declarative configuration of the Observation type for use with -// apply. -func Observation() *ObservationApplyConfiguration { - return &ObservationApplyConfiguration{} -} - -// WithMetrics adds the given value to the Metrics field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Metrics field. -func (b *ObservationApplyConfiguration) WithMetrics(values ...*MetricApplyConfiguration) *ObservationApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithMetrics") - } - b.Metrics = append(b.Metrics, *values[i]) - } - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/parameterassignment.go b/pkg/client/controller/applyconfiguration/common/v1beta1/parameterassignment.go deleted file mode 100644 index 2a49007c020..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/parameterassignment.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// ParameterAssignmentApplyConfiguration represents an declarative configuration of the ParameterAssignment type for use -// with apply. -type ParameterAssignmentApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} - -// ParameterAssignmentApplyConfiguration constructs an declarative configuration of the ParameterAssignment type for use with -// apply. -func ParameterAssignment() *ParameterAssignmentApplyConfiguration { - return &ParameterAssignmentApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ParameterAssignmentApplyConfiguration) WithName(value string) *ParameterAssignmentApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *ParameterAssignmentApplyConfiguration) WithValue(value string) *ParameterAssignmentApplyConfiguration { - b.Value = &value - return b -} diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/sourcespec.go b/pkg/client/controller/applyconfiguration/common/v1beta1/sourcespec.go deleted file mode 100644 index 792fd4220cd..00000000000 --- a/pkg/client/controller/applyconfiguration/common/v1beta1/sourcespec.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/api/core/v1" -) - -// SourceSpecApplyConfiguration represents an declarative configuration of the SourceSpec type for use -// with apply. -type SourceSpecApplyConfiguration struct { - HttpGet *v1.HTTPGetAction `json:"httpGet,omitempty"` - FileSystemPath *FileSystemPathApplyConfiguration `json:"fileSystemPath,omitempty"` - Filter *FilterSpecApplyConfiguration `json:"filter,omitempty"` -} - -// SourceSpecApplyConfiguration constructs an declarative configuration of the SourceSpec type for use with -// apply. -func SourceSpec() *SourceSpecApplyConfiguration { - return &SourceSpecApplyConfiguration{} -} - -// WithHttpGet sets the HttpGet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HttpGet field is set to the value of the last call. -func (b *SourceSpecApplyConfiguration) WithHttpGet(value v1.HTTPGetAction) *SourceSpecApplyConfiguration { - b.HttpGet = &value - return b -} - -// WithFileSystemPath sets the FileSystemPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FileSystemPath field is set to the value of the last call. -func (b *SourceSpecApplyConfiguration) WithFileSystemPath(value *FileSystemPathApplyConfiguration) *SourceSpecApplyConfiguration { - b.FileSystemPath = value - return b -} - -// WithFilter sets the Filter field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Filter field is set to the value of the last call. -func (b *SourceSpecApplyConfiguration) WithFilter(value *FilterSpecApplyConfiguration) *SourceSpecApplyConfiguration { - b.Filter = value - return b -} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go index 95f11e62882..5070044bbb9 100644 --- a/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go @@ -19,24 +19,24 @@ limitations under the License. package v1beta1 import ( + commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" experimentsv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" - commonv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" ) // ExperimentSpecApplyConfiguration represents an declarative configuration of the ExperimentSpec type for use // with apply. type ExperimentSpecApplyConfiguration struct { - Parameters []ParameterSpecApplyConfiguration `json:"parameters,omitempty"` - Objective *commonv1beta1.ObjectiveSpecApplyConfiguration `json:"objective,omitempty"` - Algorithm *commonv1beta1.AlgorithmSpecApplyConfiguration `json:"algorithm,omitempty"` - EarlyStopping *commonv1beta1.EarlyStoppingSpecApplyConfiguration `json:"earlyStopping,omitempty"` - TrialTemplate *TrialTemplateApplyConfiguration `json:"trialTemplate,omitempty"` - ParallelTrialCount *int32 `json:"parallelTrialCount,omitempty"` - MaxTrialCount *int32 `json:"maxTrialCount,omitempty"` - MaxFailedTrialCount *int32 `json:"maxFailedTrialCount,omitempty"` - MetricsCollectorSpec *commonv1beta1.MetricsCollectorSpecApplyConfiguration `json:"metricsCollectorSpec,omitempty"` - NasConfig *NasConfigApplyConfiguration `json:"nasConfig,omitempty"` - ResumePolicy *experimentsv1beta1.ResumePolicyType `json:"resumePolicy,omitempty"` + Parameters []ParameterSpecApplyConfiguration `json:"parameters,omitempty"` + Objective *commonv1beta1.ObjectiveSpec `json:"objective,omitempty"` + Algorithm *commonv1beta1.AlgorithmSpec `json:"algorithm,omitempty"` + EarlyStopping *commonv1beta1.EarlyStoppingSpec `json:"earlyStopping,omitempty"` + TrialTemplate *TrialTemplateApplyConfiguration `json:"trialTemplate,omitempty"` + ParallelTrialCount *int32 `json:"parallelTrialCount,omitempty"` + MaxTrialCount *int32 `json:"maxTrialCount,omitempty"` + MaxFailedTrialCount *int32 `json:"maxFailedTrialCount,omitempty"` + MetricsCollectorSpec *commonv1beta1.MetricsCollectorSpec `json:"metricsCollectorSpec,omitempty"` + NasConfig *NasConfigApplyConfiguration `json:"nasConfig,omitempty"` + ResumePolicy *experimentsv1beta1.ResumePolicyType `json:"resumePolicy,omitempty"` } // ExperimentSpecApplyConfiguration constructs an declarative configuration of the ExperimentSpec type for use with @@ -61,24 +61,24 @@ func (b *ExperimentSpecApplyConfiguration) WithParameters(values ...*ParameterSp // WithObjective sets the Objective field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Objective field is set to the value of the last call. -func (b *ExperimentSpecApplyConfiguration) WithObjective(value *commonv1beta1.ObjectiveSpecApplyConfiguration) *ExperimentSpecApplyConfiguration { - b.Objective = value +func (b *ExperimentSpecApplyConfiguration) WithObjective(value commonv1beta1.ObjectiveSpec) *ExperimentSpecApplyConfiguration { + b.Objective = &value return b } // WithAlgorithm sets the Algorithm field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Algorithm field is set to the value of the last call. -func (b *ExperimentSpecApplyConfiguration) WithAlgorithm(value *commonv1beta1.AlgorithmSpecApplyConfiguration) *ExperimentSpecApplyConfiguration { - b.Algorithm = value +func (b *ExperimentSpecApplyConfiguration) WithAlgorithm(value commonv1beta1.AlgorithmSpec) *ExperimentSpecApplyConfiguration { + b.Algorithm = &value return b } // WithEarlyStopping sets the EarlyStopping field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the EarlyStopping field is set to the value of the last call. -func (b *ExperimentSpecApplyConfiguration) WithEarlyStopping(value *commonv1beta1.EarlyStoppingSpecApplyConfiguration) *ExperimentSpecApplyConfiguration { - b.EarlyStopping = value +func (b *ExperimentSpecApplyConfiguration) WithEarlyStopping(value commonv1beta1.EarlyStoppingSpec) *ExperimentSpecApplyConfiguration { + b.EarlyStopping = &value return b } @@ -117,8 +117,8 @@ func (b *ExperimentSpecApplyConfiguration) WithMaxFailedTrialCount(value int32) // WithMetricsCollectorSpec sets the MetricsCollectorSpec field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MetricsCollectorSpec field is set to the value of the last call. -func (b *ExperimentSpecApplyConfiguration) WithMetricsCollectorSpec(value *commonv1beta1.MetricsCollectorSpecApplyConfiguration) *ExperimentSpecApplyConfiguration { - b.MetricsCollectorSpec = value +func (b *ExperimentSpecApplyConfiguration) WithMetricsCollectorSpec(value commonv1beta1.MetricsCollectorSpec) *ExperimentSpecApplyConfiguration { + b.MetricsCollectorSpec = &value return b } diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go index 43b8f7714a1..b02f5bdf245 100644 --- a/pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go @@ -19,15 +19,15 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" + v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" ) // OptimalTrialApplyConfiguration represents an declarative configuration of the OptimalTrial type for use // with apply. type OptimalTrialApplyConfiguration struct { - BestTrialName *string `json:"bestTrialName,omitempty"` - ParameterAssignments []v1beta1.ParameterAssignmentApplyConfiguration `json:"parameterAssignments,omitempty"` - Observation *v1beta1.ObservationApplyConfiguration `json:"observation,omitempty"` + BestTrialName *string `json:"bestTrialName,omitempty"` + ParameterAssignments []v1beta1.ParameterAssignment `json:"parameterAssignments,omitempty"` + Observation *v1beta1.Observation `json:"observation,omitempty"` } // OptimalTrialApplyConfiguration constructs an declarative configuration of the OptimalTrial type for use with @@ -47,12 +47,9 @@ func (b *OptimalTrialApplyConfiguration) WithBestTrialName(value string) *Optima // WithParameterAssignments adds the given value to the ParameterAssignments field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ParameterAssignments field. -func (b *OptimalTrialApplyConfiguration) WithParameterAssignments(values ...*v1beta1.ParameterAssignmentApplyConfiguration) *OptimalTrialApplyConfiguration { +func (b *OptimalTrialApplyConfiguration) WithParameterAssignments(values ...v1beta1.ParameterAssignment) *OptimalTrialApplyConfiguration { for i := range values { - if values[i] == nil { - panic("nil value passed to WithParameterAssignments") - } - b.ParameterAssignments = append(b.ParameterAssignments, *values[i]) + b.ParameterAssignments = append(b.ParameterAssignments, values[i]) } return b } @@ -60,7 +57,7 @@ func (b *OptimalTrialApplyConfiguration) WithParameterAssignments(values ...*v1b // WithObservation sets the Observation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Observation field is set to the value of the last call. -func (b *OptimalTrialApplyConfiguration) WithObservation(value *v1beta1.ObservationApplyConfiguration) *OptimalTrialApplyConfiguration { - b.Observation = value +func (b *OptimalTrialApplyConfiguration) WithObservation(value v1beta1.Observation) *OptimalTrialApplyConfiguration { + b.Observation = &value return b } diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go index fbe7bfd67e4..b56ca1a9f3d 100644 --- a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go @@ -19,17 +19,17 @@ limitations under the License. package v1beta1 import ( + v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" experimentsv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" - v1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" ) // SuggestionSpecApplyConfiguration represents an declarative configuration of the SuggestionSpec type for use // with apply. type SuggestionSpecApplyConfiguration struct { - Algorithm *v1beta1.AlgorithmSpecApplyConfiguration `json:"algorithm,omitempty"` - EarlyStopping *v1beta1.EarlyStoppingSpecApplyConfiguration `json:"earlyStopping,omitempty"` - Requests *int32 `json:"requests,omitempty"` - ResumePolicy *experimentsv1beta1.ResumePolicyType `json:"resumePolicy,omitempty"` + Algorithm *v1beta1.AlgorithmSpec `json:"algorithm,omitempty"` + EarlyStopping *v1beta1.EarlyStoppingSpec `json:"earlyStopping,omitempty"` + Requests *int32 `json:"requests,omitempty"` + ResumePolicy *experimentsv1beta1.ResumePolicyType `json:"resumePolicy,omitempty"` } // SuggestionSpecApplyConfiguration constructs an declarative configuration of the SuggestionSpec type for use with @@ -41,16 +41,16 @@ func SuggestionSpec() *SuggestionSpecApplyConfiguration { // WithAlgorithm sets the Algorithm field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Algorithm field is set to the value of the last call. -func (b *SuggestionSpecApplyConfiguration) WithAlgorithm(value *v1beta1.AlgorithmSpecApplyConfiguration) *SuggestionSpecApplyConfiguration { - b.Algorithm = value +func (b *SuggestionSpecApplyConfiguration) WithAlgorithm(value v1beta1.AlgorithmSpec) *SuggestionSpecApplyConfiguration { + b.Algorithm = &value return b } // WithEarlyStopping sets the EarlyStopping field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the EarlyStopping field is set to the value of the last call. -func (b *SuggestionSpecApplyConfiguration) WithEarlyStopping(value *v1beta1.EarlyStoppingSpecApplyConfiguration) *SuggestionSpecApplyConfiguration { - b.EarlyStopping = value +func (b *SuggestionSpecApplyConfiguration) WithEarlyStopping(value v1beta1.EarlyStoppingSpec) *SuggestionSpecApplyConfiguration { + b.EarlyStopping = &value return b } diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go index 0f88a84429a..856ba321835 100644 --- a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go @@ -19,20 +19,20 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" + v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // SuggestionStatusApplyConfiguration represents an declarative configuration of the SuggestionStatus type for use // with apply. type SuggestionStatusApplyConfiguration struct { - AlgorithmSettings []v1beta1.AlgorithmSettingApplyConfiguration `json:"algorithmSettings,omitempty"` - SuggestionCount *int32 `json:"suggestionCount,omitempty"` - Suggestions []TrialAssignmentApplyConfiguration `json:"suggestions,omitempty"` - StartTime *v1.Time `json:"startTime,omitempty"` - CompletionTime *v1.Time `json:"completionTime,omitempty"` - LastReconcileTime *v1.Time `json:"lastReconcileTime,omitempty"` - Conditions []SuggestionConditionApplyConfiguration `json:"conditions,omitempty"` + AlgorithmSettings []v1beta1.AlgorithmSetting `json:"algorithmSettings,omitempty"` + SuggestionCount *int32 `json:"suggestionCount,omitempty"` + Suggestions []TrialAssignmentApplyConfiguration `json:"suggestions,omitempty"` + StartTime *v1.Time `json:"startTime,omitempty"` + CompletionTime *v1.Time `json:"completionTime,omitempty"` + LastReconcileTime *v1.Time `json:"lastReconcileTime,omitempty"` + Conditions []SuggestionConditionApplyConfiguration `json:"conditions,omitempty"` } // SuggestionStatusApplyConfiguration constructs an declarative configuration of the SuggestionStatus type for use with @@ -44,12 +44,9 @@ func SuggestionStatus() *SuggestionStatusApplyConfiguration { // WithAlgorithmSettings adds the given value to the AlgorithmSettings field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the AlgorithmSettings field. -func (b *SuggestionStatusApplyConfiguration) WithAlgorithmSettings(values ...*v1beta1.AlgorithmSettingApplyConfiguration) *SuggestionStatusApplyConfiguration { +func (b *SuggestionStatusApplyConfiguration) WithAlgorithmSettings(values ...v1beta1.AlgorithmSetting) *SuggestionStatusApplyConfiguration { for i := range values { - if values[i] == nil { - panic("nil value passed to WithAlgorithmSettings") - } - b.AlgorithmSettings = append(b.AlgorithmSettings, *values[i]) + b.AlgorithmSettings = append(b.AlgorithmSettings, values[i]) } return b } diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go index 261e31a6b28..1449b95167f 100644 --- a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go @@ -19,16 +19,16 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" + v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" ) // TrialAssignmentApplyConfiguration represents an declarative configuration of the TrialAssignment type for use // with apply. type TrialAssignmentApplyConfiguration struct { - ParameterAssignments []v1beta1.ParameterAssignmentApplyConfiguration `json:"parameterAssignments,omitempty"` - Name *string `json:"name,omitempty"` - EarlyStoppingRules []v1beta1.EarlyStoppingRuleApplyConfiguration `json:"earlyStoppingRules,omitempty"` - Labels map[string]string `json:"labels,omitempty"` + ParameterAssignments []v1beta1.ParameterAssignment `json:"parameterAssignments,omitempty"` + Name *string `json:"name,omitempty"` + EarlyStoppingRules []v1beta1.EarlyStoppingRule `json:"earlyStoppingRules,omitempty"` + Labels map[string]string `json:"labels,omitempty"` } // TrialAssignmentApplyConfiguration constructs an declarative configuration of the TrialAssignment type for use with @@ -40,12 +40,9 @@ func TrialAssignment() *TrialAssignmentApplyConfiguration { // WithParameterAssignments adds the given value to the ParameterAssignments field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ParameterAssignments field. -func (b *TrialAssignmentApplyConfiguration) WithParameterAssignments(values ...*v1beta1.ParameterAssignmentApplyConfiguration) *TrialAssignmentApplyConfiguration { +func (b *TrialAssignmentApplyConfiguration) WithParameterAssignments(values ...v1beta1.ParameterAssignment) *TrialAssignmentApplyConfiguration { for i := range values { - if values[i] == nil { - panic("nil value passed to WithParameterAssignments") - } - b.ParameterAssignments = append(b.ParameterAssignments, *values[i]) + b.ParameterAssignments = append(b.ParameterAssignments, values[i]) } return b } @@ -61,12 +58,9 @@ func (b *TrialAssignmentApplyConfiguration) WithName(value string) *TrialAssignm // WithEarlyStoppingRules adds the given value to the EarlyStoppingRules field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the EarlyStoppingRules field. -func (b *TrialAssignmentApplyConfiguration) WithEarlyStoppingRules(values ...*v1beta1.EarlyStoppingRuleApplyConfiguration) *TrialAssignmentApplyConfiguration { +func (b *TrialAssignmentApplyConfiguration) WithEarlyStoppingRules(values ...v1beta1.EarlyStoppingRule) *TrialAssignmentApplyConfiguration { for i := range values { - if values[i] == nil { - panic("nil value passed to WithEarlyStoppingRules") - } - b.EarlyStoppingRules = append(b.EarlyStoppingRules, *values[i]) + b.EarlyStoppingRules = append(b.EarlyStoppingRules, values[i]) } return b } diff --git a/pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go index bbe4a54535e..c6a482b7673 100644 --- a/pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go +++ b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go @@ -19,24 +19,24 @@ limitations under the License. package v1beta1 import ( - v1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" + v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) // TrialSpecApplyConfiguration represents an declarative configuration of the TrialSpec type for use // with apply. type TrialSpecApplyConfiguration struct { - Objective *v1beta1.ObjectiveSpecApplyConfiguration `json:"objective,omitempty"` - ParameterAssignments []v1beta1.ParameterAssignmentApplyConfiguration `json:"parameterAssignments,omitempty"` - EarlyStoppingRules []v1beta1.EarlyStoppingRuleApplyConfiguration `json:"earlyStoppingRules,omitempty"` - RunSpec *unstructured.Unstructured `json:"runSpec,omitempty"` - RetainRun *bool `json:"retainRun,omitempty"` - MetricsCollector *v1beta1.MetricsCollectorSpecApplyConfiguration `json:"metricsCollector,omitempty"` - PrimaryPodLabels map[string]string `json:"primaryPodLabels,omitempty"` - PrimaryContainerName *string `json:"primaryContainerName,omitempty"` - SuccessCondition *string `json:"successCondition,omitempty"` - FailureCondition *string `json:"failureCondition,omitempty"` - Labels map[string]string `json:"labels,omitempty"` + Objective *v1beta1.ObjectiveSpec `json:"objective,omitempty"` + ParameterAssignments []v1beta1.ParameterAssignment `json:"parameterAssignments,omitempty"` + EarlyStoppingRules []v1beta1.EarlyStoppingRule `json:"earlyStoppingRules,omitempty"` + RunSpec *unstructured.Unstructured `json:"runSpec,omitempty"` + RetainRun *bool `json:"retainRun,omitempty"` + MetricsCollector *v1beta1.MetricsCollectorSpec `json:"metricsCollector,omitempty"` + PrimaryPodLabels map[string]string `json:"primaryPodLabels,omitempty"` + PrimaryContainerName *string `json:"primaryContainerName,omitempty"` + SuccessCondition *string `json:"successCondition,omitempty"` + FailureCondition *string `json:"failureCondition,omitempty"` + Labels map[string]string `json:"labels,omitempty"` } // TrialSpecApplyConfiguration constructs an declarative configuration of the TrialSpec type for use with @@ -48,20 +48,17 @@ func TrialSpec() *TrialSpecApplyConfiguration { // WithObjective sets the Objective field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Objective field is set to the value of the last call. -func (b *TrialSpecApplyConfiguration) WithObjective(value *v1beta1.ObjectiveSpecApplyConfiguration) *TrialSpecApplyConfiguration { - b.Objective = value +func (b *TrialSpecApplyConfiguration) WithObjective(value v1beta1.ObjectiveSpec) *TrialSpecApplyConfiguration { + b.Objective = &value return b } // WithParameterAssignments adds the given value to the ParameterAssignments field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ParameterAssignments field. -func (b *TrialSpecApplyConfiguration) WithParameterAssignments(values ...*v1beta1.ParameterAssignmentApplyConfiguration) *TrialSpecApplyConfiguration { +func (b *TrialSpecApplyConfiguration) WithParameterAssignments(values ...v1beta1.ParameterAssignment) *TrialSpecApplyConfiguration { for i := range values { - if values[i] == nil { - panic("nil value passed to WithParameterAssignments") - } - b.ParameterAssignments = append(b.ParameterAssignments, *values[i]) + b.ParameterAssignments = append(b.ParameterAssignments, values[i]) } return b } @@ -69,12 +66,9 @@ func (b *TrialSpecApplyConfiguration) WithParameterAssignments(values ...*v1beta // WithEarlyStoppingRules adds the given value to the EarlyStoppingRules field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the EarlyStoppingRules field. -func (b *TrialSpecApplyConfiguration) WithEarlyStoppingRules(values ...*v1beta1.EarlyStoppingRuleApplyConfiguration) *TrialSpecApplyConfiguration { +func (b *TrialSpecApplyConfiguration) WithEarlyStoppingRules(values ...v1beta1.EarlyStoppingRule) *TrialSpecApplyConfiguration { for i := range values { - if values[i] == nil { - panic("nil value passed to WithEarlyStoppingRules") - } - b.EarlyStoppingRules = append(b.EarlyStoppingRules, *values[i]) + b.EarlyStoppingRules = append(b.EarlyStoppingRules, values[i]) } return b } @@ -98,8 +92,8 @@ func (b *TrialSpecApplyConfiguration) WithRetainRun(value bool) *TrialSpecApplyC // WithMetricsCollector sets the MetricsCollector field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the MetricsCollector field is set to the value of the last call. -func (b *TrialSpecApplyConfiguration) WithMetricsCollector(value *v1beta1.MetricsCollectorSpecApplyConfiguration) *TrialSpecApplyConfiguration { - b.MetricsCollector = value +func (b *TrialSpecApplyConfiguration) WithMetricsCollector(value v1beta1.MetricsCollectorSpec) *TrialSpecApplyConfiguration { + b.MetricsCollector = &value return b } diff --git a/pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go index fc5ef7959d4..121db6061e5 100644 --- a/pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go +++ b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go @@ -19,18 +19,18 @@ limitations under the License. package v1beta1 import ( - commonv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" + commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // TrialStatusApplyConfiguration represents an declarative configuration of the TrialStatus type for use // with apply. type TrialStatusApplyConfiguration struct { - StartTime *v1.Time `json:"startTime,omitempty"` - CompletionTime *v1.Time `json:"completionTime,omitempty"` - LastReconcileTime *v1.Time `json:"lastReconcileTime,omitempty"` - Conditions []TrialConditionApplyConfiguration `json:"conditions,omitempty"` - Observation *commonv1beta1.ObservationApplyConfiguration `json:"observation,omitempty"` + StartTime *v1.Time `json:"startTime,omitempty"` + CompletionTime *v1.Time `json:"completionTime,omitempty"` + LastReconcileTime *v1.Time `json:"lastReconcileTime,omitempty"` + Conditions []TrialConditionApplyConfiguration `json:"conditions,omitempty"` + Observation *commonv1beta1.Observation `json:"observation,omitempty"` } // TrialStatusApplyConfiguration constructs an declarative configuration of the TrialStatus type for use with @@ -79,7 +79,7 @@ func (b *TrialStatusApplyConfiguration) WithConditions(values ...*TrialCondition // WithObservation sets the Observation field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Observation field is set to the value of the last call. -func (b *TrialStatusApplyConfiguration) WithObservation(value *commonv1beta1.ObservationApplyConfiguration) *TrialStatusApplyConfiguration { - b.Observation = value +func (b *TrialStatusApplyConfiguration) WithObservation(value commonv1beta1.Observation) *TrialStatusApplyConfiguration { + b.Observation = &value return b } diff --git a/pkg/client/controller/applyconfiguration/utils.go b/pkg/client/controller/applyconfiguration/utils.go index ec0879c015f..4c39359ecf1 100644 --- a/pkg/client/controller/applyconfiguration/utils.go +++ b/pkg/client/controller/applyconfiguration/utils.go @@ -19,12 +19,10 @@ limitations under the License. package applyconfiguration import ( - v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" - experimentsv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" + v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" suggestionsv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1" trialsv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1" - commonv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/common/v1beta1" - applyconfigurationexperimentsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/experiments/v1beta1" + experimentsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/experiments/v1beta1" applyconfigurationsuggestionsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/suggestions/v1beta1" applyconfigurationtrialsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/trials/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -34,67 +32,35 @@ import ( // apply configuration type exists for the given GroupVersionKind. func ForKind(kind schema.GroupVersionKind) interface{} { switch kind { - // Group=common.kubeflow.org, Version=v1beta1 - case v1beta1.SchemeGroupVersion.WithKind("AlgorithmSetting"): - return &commonv1beta1.AlgorithmSettingApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("AlgorithmSpec"): - return &commonv1beta1.AlgorithmSpecApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("CollectorSpec"): - return &commonv1beta1.CollectorSpecApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("EarlyStoppingRule"): - return &commonv1beta1.EarlyStoppingRuleApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("EarlyStoppingSetting"): - return &commonv1beta1.EarlyStoppingSettingApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("EarlyStoppingSpec"): - return &commonv1beta1.EarlyStoppingSpecApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("FileSystemPath"): - return &commonv1beta1.FileSystemPathApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("FilterSpec"): - return &commonv1beta1.FilterSpecApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("Metric"): - return &commonv1beta1.MetricApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("MetricsCollectorSpec"): - return &commonv1beta1.MetricsCollectorSpecApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("MetricStrategy"): - return &commonv1beta1.MetricStrategyApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("ObjectiveSpec"): - return &commonv1beta1.ObjectiveSpecApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("Observation"): - return &commonv1beta1.ObservationApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("ParameterAssignment"): - return &commonv1beta1.ParameterAssignmentApplyConfiguration{} - case v1beta1.SchemeGroupVersion.WithKind("SourceSpec"): - return &commonv1beta1.SourceSpecApplyConfiguration{} - - // Group=experiment.kubeflow.org, Version=v1beta1 - case experimentsv1beta1.SchemeGroupVersion.WithKind("ConfigMapSource"): - return &applyconfigurationexperimentsv1beta1.ConfigMapSourceApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("Experiment"): - return &applyconfigurationexperimentsv1beta1.ExperimentApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("ExperimentCondition"): - return &applyconfigurationexperimentsv1beta1.ExperimentConditionApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("ExperimentSpec"): - return &applyconfigurationexperimentsv1beta1.ExperimentSpecApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("ExperimentStatus"): - return &applyconfigurationexperimentsv1beta1.ExperimentStatusApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("FeasibleSpace"): - return &applyconfigurationexperimentsv1beta1.FeasibleSpaceApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("GraphConfig"): - return &applyconfigurationexperimentsv1beta1.GraphConfigApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("NasConfig"): - return &applyconfigurationexperimentsv1beta1.NasConfigApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("Operation"): - return &applyconfigurationexperimentsv1beta1.OperationApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("OptimalTrial"): - return &applyconfigurationexperimentsv1beta1.OptimalTrialApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("ParameterSpec"): - return &applyconfigurationexperimentsv1beta1.ParameterSpecApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("TrialParameterSpec"): - return &applyconfigurationexperimentsv1beta1.TrialParameterSpecApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("TrialSource"): - return &applyconfigurationexperimentsv1beta1.TrialSourceApplyConfiguration{} - case experimentsv1beta1.SchemeGroupVersion.WithKind("TrialTemplate"): - return &applyconfigurationexperimentsv1beta1.TrialTemplateApplyConfiguration{} + // Group=experiment.kubeflow.org, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithKind("ConfigMapSource"): + return &experimentsv1beta1.ConfigMapSourceApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("Experiment"): + return &experimentsv1beta1.ExperimentApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("ExperimentCondition"): + return &experimentsv1beta1.ExperimentConditionApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("ExperimentSpec"): + return &experimentsv1beta1.ExperimentSpecApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("ExperimentStatus"): + return &experimentsv1beta1.ExperimentStatusApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("FeasibleSpace"): + return &experimentsv1beta1.FeasibleSpaceApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("GraphConfig"): + return &experimentsv1beta1.GraphConfigApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("NasConfig"): + return &experimentsv1beta1.NasConfigApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("Operation"): + return &experimentsv1beta1.OperationApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("OptimalTrial"): + return &experimentsv1beta1.OptimalTrialApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("ParameterSpec"): + return &experimentsv1beta1.ParameterSpecApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("TrialParameterSpec"): + return &experimentsv1beta1.TrialParameterSpecApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("TrialSource"): + return &experimentsv1beta1.TrialSourceApplyConfiguration{} + case v1beta1.SchemeGroupVersion.WithKind("TrialTemplate"): + return &experimentsv1beta1.TrialTemplateApplyConfiguration{} // Group=suggestion.kubeflow.org, Version=v1beta1 case suggestionsv1beta1.SchemeGroupVersion.WithKind("Suggestion"): diff --git a/pkg/client/controller/clientset/versioned/clientset.go b/pkg/client/controller/clientset/versioned/clientset.go index 4be4db7c4e3..2547b8526ed 100644 --- a/pkg/client/controller/clientset/versioned/clientset.go +++ b/pkg/client/controller/clientset/versioned/clientset.go @@ -22,7 +22,6 @@ import ( "fmt" "net/http" - commonv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/common/v1beta1" experimentv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1" suggestionv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1" trialv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/trials/v1beta1" @@ -33,7 +32,6 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - CommonV1beta1() commonv1beta1.CommonV1beta1Interface ExperimentV1beta1() experimentv1beta1.ExperimentV1beta1Interface SuggestionV1beta1() suggestionv1beta1.SuggestionV1beta1Interface TrialV1beta1() trialv1beta1.TrialV1beta1Interface @@ -42,17 +40,11 @@ type Interface interface { // Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient - commonV1beta1 *commonv1beta1.CommonV1beta1Client experimentV1beta1 *experimentv1beta1.ExperimentV1beta1Client suggestionV1beta1 *suggestionv1beta1.SuggestionV1beta1Client trialV1beta1 *trialv1beta1.TrialV1beta1Client } -// CommonV1beta1 retrieves the CommonV1beta1Client -func (c *Clientset) CommonV1beta1() commonv1beta1.CommonV1beta1Interface { - return c.commonV1beta1 -} - // ExperimentV1beta1 retrieves the ExperimentV1beta1Client func (c *Clientset) ExperimentV1beta1() experimentv1beta1.ExperimentV1beta1Interface { return c.experimentV1beta1 @@ -112,10 +104,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error - cs.commonV1beta1, err = commonv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } cs.experimentV1beta1, err = experimentv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -149,7 +137,6 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.commonV1beta1 = commonv1beta1.New(c) cs.experimentV1beta1 = experimentv1beta1.New(c) cs.suggestionV1beta1 = suggestionv1beta1.New(c) cs.trialV1beta1 = trialv1beta1.New(c) diff --git a/pkg/client/controller/clientset/versioned/fake/clientset_generated.go b/pkg/client/controller/clientset/versioned/fake/clientset_generated.go index 1ddf57d7abb..4ae91f6b408 100644 --- a/pkg/client/controller/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/controller/clientset/versioned/fake/clientset_generated.go @@ -20,8 +20,6 @@ package fake import ( clientset "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned" - commonv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/common/v1beta1" - fakecommonv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake" experimentv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1" fakeexperimentv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/fake" suggestionv1beta1 "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1" @@ -85,11 +83,6 @@ var ( _ testing.FakeClient = &Clientset{} ) -// CommonV1beta1 retrieves the CommonV1beta1Client -func (c *Clientset) CommonV1beta1() commonv1beta1.CommonV1beta1Interface { - return &fakecommonv1beta1.FakeCommonV1beta1{Fake: &c.Fake} -} - // ExperimentV1beta1 retrieves the ExperimentV1beta1Client func (c *Clientset) ExperimentV1beta1() experimentv1beta1.ExperimentV1beta1Interface { return &fakeexperimentv1beta1.FakeExperimentV1beta1{Fake: &c.Fake} diff --git a/pkg/client/controller/clientset/versioned/fake/register.go b/pkg/client/controller/clientset/versioned/fake/register.go index fa97ed11338..09c67880af3 100644 --- a/pkg/client/controller/clientset/versioned/fake/register.go +++ b/pkg/client/controller/clientset/versioned/fake/register.go @@ -19,7 +19,6 @@ limitations under the License. package fake import ( - commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" experimentv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" suggestionv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1" trialv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1" @@ -34,7 +33,6 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - commonv1beta1.AddToScheme, experimentv1beta1.AddToScheme, suggestionv1beta1.AddToScheme, trialv1beta1.AddToScheme, diff --git a/pkg/client/controller/clientset/versioned/scheme/register.go b/pkg/client/controller/clientset/versioned/scheme/register.go index fc5e8fd7b04..a20ebb20e74 100644 --- a/pkg/client/controller/clientset/versioned/scheme/register.go +++ b/pkg/client/controller/clientset/versioned/scheme/register.go @@ -19,7 +19,6 @@ limitations under the License. package scheme import ( - commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" experimentv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" suggestionv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1" trialv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1" @@ -34,7 +33,6 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - commonv1beta1.AddToScheme, experimentv1beta1.AddToScheme, suggestionv1beta1.AddToScheme, trialv1beta1.AddToScheme, diff --git a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/common_client.go b/pkg/client/controller/clientset/versioned/typed/common/v1beta1/common_client.go deleted file mode 100644 index ef4bfad68cf..00000000000 --- a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/common_client.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "net/http" - - v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" - "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type CommonV1beta1Interface interface { - RESTClient() rest.Interface -} - -// CommonV1beta1Client is used to interact with features provided by the common.kubeflow.org group. -type CommonV1beta1Client struct { - restClient rest.Interface -} - -// NewForConfig creates a new CommonV1beta1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*CommonV1beta1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new CommonV1beta1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CommonV1beta1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &CommonV1beta1Client{client}, nil -} - -// NewForConfigOrDie creates a new CommonV1beta1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CommonV1beta1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new CommonV1beta1Client for the given RESTClient. -func New(c rest.Interface) *CommonV1beta1Client { - return &CommonV1beta1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1beta1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *CommonV1beta1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/doc.go b/pkg/client/controller/clientset/versioned/typed/common/v1beta1/doc.go deleted file mode 100644 index 667c4c49be1..00000000000 --- a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/doc.go b/pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/doc.go deleted file mode 100644 index 6cbbbecc7dc..00000000000 --- a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 client-gen. DO NOT EDIT. - -// Package fake has the automatically generated clients. -package fake diff --git a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/fake_common_client.go b/pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/fake_common_client.go deleted file mode 100644 index 29b27d3daf3..00000000000 --- a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/fake/fake_common_client.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 client-gen. DO NOT EDIT. - -package fake - -import ( - rest "k8s.io/client-go/rest" - testing "k8s.io/client-go/testing" -) - -type FakeCommonV1beta1 struct { - *testing.Fake -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *FakeCommonV1beta1) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/generated_expansion.go b/pkg/client/controller/clientset/versioned/typed/common/v1beta1/generated_expansion.go deleted file mode 100644 index 2156bb18b64..00000000000 --- a/pkg/client/controller/clientset/versioned/typed/common/v1beta1/generated_expansion.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2022 The Kubeflow 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 client-gen. DO NOT EDIT. - -package v1beta1 From 11e577e056cb76afb7d14a03f662d128bea3b4fb Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 08:56:54 +0000 Subject: [PATCH 07/20] chore: update openapigen & generate new openapi definitions. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-openapigen.sh | 43 +- hack/violation_exception_v1beta1.list | 39 + pkg/apis/v1beta1/openapi_generated.go | 2111 ---------- pkg/apis/v1beta1/zz_generated.openapi.go | 4701 ++++++++++++++++++++++ 4 files changed, 4754 insertions(+), 2140 deletions(-) create mode 100644 hack/violation_exception_v1beta1.list delete mode 100644 pkg/apis/v1beta1/openapi_generated.go create mode 100644 pkg/apis/v1beta1/zz_generated.openapi.go diff --git a/hack/update-openapigen.sh b/hack/update-openapigen.sh index 1b5639454c9..6fb9201fecb 100755 --- a/hack/update-openapigen.sh +++ b/hack/update-openapigen.sh @@ -20,41 +20,26 @@ set -o pipefail echo "Generate open-api for the APIs" -if [[ -z "${GOPATH:-}" ]]; then - GOPATH=$(go env GOPATH) - export GOPATH -fi +CURRENT_DIR=$(dirname "${BASH_SOURCE[0]}") +KATIB_ROOT=$(realpath "${CURRENT_DIR}/..") +KATIB_PKG="github.com/kubeflow/katib" +CODEGEN_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/code-generator) -# Grab code-generator version from go.mod -CODEGEN_VERSION=$(cd ../.. && grep 'k8s.io/code-generator' go.mod | awk '{print $2}') -CODEGEN_PKG="${GOPATH}/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}" +cd "$CURRENT_DIR/.." -if [[ ! -d ${CODEGEN_PKG} ]]; then - echo "${CODEGEN_PKG} is missing. Please run 'go mod download'." - exit 0 -fi +# shellcheck source=/dev/null +source "${CODEGEN_PKG}/kube_codegen.sh" -echo ">> Using ${CODEGEN_PKG} for the code generator" - -# Ensure we can execute. -chmod +x "${CODEGEN_PKG}/generate-groups.sh" - -PROJECT_ROOT=${GOPATH}/src/github.com/kubeflow/katib VERSION_LIST=(v1beta1) -SWAGGER_VERSION="0.1" for VERSION in "${VERSION_LIST[@]}"; do - SWAGGER_CODEGEN_FILE=${PROJECT_ROOT}/pkg/apis/${VERSION}/swagger.json - echo "Generating OpenAPI specification for ${VERSION} ..." - # shellcheck disable=SC2140 - go run "${CODEGEN_PKG}/cmd/openapi-gen/main.go" \ - --go-header-file "${PROJECT_ROOT}/hack/boilerplate/boilerplate.go.txt" \ - --input-dirs "github.com/kubeflow/katib/pkg/apis/controller/common/$VERSION","github.com/kubeflow/katib/pkg/apis/controller/experiments/$VERSION","github.com/kubeflow/katib/pkg/apis/controller/suggestions/${VERSION}","github.com/kubeflow/katib/pkg/apis/controller/trials/${VERSION}" \ - --output-package "github.com/kubeflow/katib/pkg/apis/${VERSION}" \ - "$@" - - echo "Generating swagger file for ${VERSION} ..." - go run "${PROJECT_ROOT}/hack/swagger/main.go" "${VERSION}-${SWAGGER_VERSION}" "${VERSION}" >"${SWAGGER_CODEGEN_FILE}" + kube::codegen::gen_openapi \ + --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ + --output-pkg "${KATIB_PKG}/pkg/apis/${VERSION}" \ + --output-dir "${KATIB_ROOT}/pkg/apis/${VERSION}" \ + --report-filename "${KATIB_ROOT}/hack/violation_exception_${VERSION}.list" \ + --update-report \ + "${KATIB_ROOT}/pkg/apis/controller" done diff --git a/hack/violation_exception_v1beta1.list b/hack/violation_exception_v1beta1.list new file mode 100644 index 00000000000..45dcaf3d7e0 --- /dev/null +++ b/hack/violation_exception_v1beta1.list @@ -0,0 +1,39 @@ +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,AlgorithmSpec,AlgorithmSettings +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,EarlyStoppingSpec,AlgorithmSettings +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,FilterSpec,MetricsFormat +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,ObjectiveSpec,AdditionalMetricNames +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,ObjectiveSpec,MetricStrategies +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,Observation,Metrics +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentSpec,Parameters +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,Conditions +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,EarlyStoppedTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,FailedTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,KilledTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,MetricsUnavailableTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,PendingTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,RunningTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,SucceededTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,FeasibleSpace,List +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,GraphConfig,InputSizes +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,GraphConfig,OutputSizes +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,NasConfig,Operations +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,Operation,Parameters +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,OptimalTrial,ParameterAssignments +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,TrialTemplate,TrialParameters +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,AlgorithmSettings +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,Conditions +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,Suggestions +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,TrialAssignment,EarlyStoppingRules +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,TrialAssignment,ParameterAssignments +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialSpec,EarlyStoppingRules +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialSpec,ParameterAssignments +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialStatus,Conditions +API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources +API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration +API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object +API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Type +API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,MicroTime,Time +API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause,Type +API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time +API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding +API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType diff --git a/pkg/apis/v1beta1/openapi_generated.go b/pkg/apis/v1beta1/openapi_generated.go deleted file mode 100644 index 503dbc64b33..00000000000 --- a/pkg/apis/v1beta1/openapi_generated.go +++ /dev/null @@ -1,2111 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 2022 The Kubeflow 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 main. DO NOT EDIT. - -// This file was autogenerated by openapi-gen. Do not edit it manually! - -package v1beta1 - -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{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting": schema_apis_controller_common_v1beta1_AlgorithmSetting(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec": schema_apis_controller_common_v1beta1_AlgorithmSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec": schema_apis_controller_common_v1beta1_CollectorSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule": schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting": schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec": schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath": schema_apis_controller_common_v1beta1_FileSystemPath(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec": schema_apis_controller_common_v1beta1_FilterSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric": schema_apis_controller_common_v1beta1_Metric(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy": schema_apis_controller_common_v1beta1_MetricStrategy(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec": schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec": schema_apis_controller_common_v1beta1_ObjectiveSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation": schema_apis_controller_common_v1beta1_Observation(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment": schema_apis_controller_common_v1beta1_ParameterAssignment(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec": schema_apis_controller_common_v1beta1_SourceSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource": schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment": schema_apis_controller_experiments_v1beta1_Experiment(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition": schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentList": schema_apis_controller_experiments_v1beta1_ExperimentList(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec": schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus": schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace": schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig": schema_apis_controller_experiments_v1beta1_GraphConfig(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig": schema_apis_controller_experiments_v1beta1_NasConfig(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation": schema_apis_controller_experiments_v1beta1_Operation(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial": schema_apis_controller_experiments_v1beta1_OptimalTrial(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec": schema_apis_controller_experiments_v1beta1_ParameterSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec": schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialSource": schema_apis_controller_experiments_v1beta1_TrialSource(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate": schema_apis_controller_experiments_v1beta1_TrialTemplate(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion": schema_apis_controller_suggestions_v1beta1_Suggestion(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition": schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionList": schema_apis_controller_suggestions_v1beta1_SuggestionList(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec": schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus": schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment": schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial": schema_apis_controller_trials_v1beta1_Trial(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition": schema_apis_controller_trials_v1beta1_TrialCondition(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialList": schema_apis_controller_trials_v1beta1_TrialList(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec": schema_apis_controller_trials_v1beta1_TrialSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus": schema_apis_controller_trials_v1beta1_TrialStatus(ref), - } -} - -func schema_apis_controller_common_v1beta1_AlgorithmSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AlgorithmSetting represents key-value pair for HP or NAS algorithm settings.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is setting name.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is the setting value.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_AlgorithmSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AlgorithmSpec is the specification for a HP or NAS algorithm.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithmName": { - SchemaProps: spec.SchemaProps{ - Description: "HP or NAS algorithm name.", - Type: []string{"string"}, - Format: "", - }, - }, - "algorithmSettings": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs representing settings for suggestion algorithms.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"}, - } -} - -func schema_apis_controller_common_v1beta1_CollectorSpec(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{ - Type: []string{"string"}, - Format: "", - }, - }, - "customCollector": { - SchemaProps: spec.SchemaProps{ - Description: "When kind is \"customCollector\", this field will be used", - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Container"}, - } -} - -func schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EarlyStoppingRule represents each rule for early stopping.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name contains metric name for the rule.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value contains metric value for the rule.", - Type: []string{"string"}, - Format: "", - }, - }, - "comparison": { - SchemaProps: spec.SchemaProps{ - Description: "Comparison defines correlation between name and value.", - Type: []string{"string"}, - Format: "", - }, - }, - "startStep": { - SchemaProps: spec.SchemaProps{ - Description: "StartStep defines quantity of intermediate results that should be received before applying the rule. If start step is empty, rule is applied from the first recorded metric.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EarlyStoppingSetting represents key-value pair for early stopping algorithm settings.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the setting name.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is the setting value.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EarlyStoppingSpec is the specification for a early stopping algorithm.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithmName": { - SchemaProps: spec.SchemaProps{ - Description: "Early stopping algorithm name.", - Type: []string{"string"}, - Format: "", - }, - }, - "algorithmSettings": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs representing settings for early stopping algorithm.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"}, - } -} - -func schema_apis_controller_common_v1beta1_FileSystemPath(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "format": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_FilterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metricsFormat": { - SchemaProps: spec.SchemaProps{ - Description: "When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \": \" or else", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_Metric(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: "", - }, - }, - "min": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "max": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "latest": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_MetricStrategy(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: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "source": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"), - }, - }, - "collector": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"}, - } -} - -func schema_apis_controller_common_v1beta1_ObjectiveSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectiveSpec represents Experiment's objective specification.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type for Experiment optimization.", - Type: []string{"string"}, - Format: "", - }, - }, - "goal": { - SchemaProps: spec.SchemaProps{ - Description: "Goal is the Experiment's objective goal that should be reached. In case of empty goal, Experiment is running until MaxTrialCount = TrialsSucceeded.", - Type: []string{"number"}, - Format: "double", - }, - }, - "objectiveMetricName": { - SchemaProps: spec.SchemaProps{ - Description: "ObjectiveMetricName represents primary Experiment's metric to optimize.", - Type: []string{"string"}, - Format: "", - }, - }, - "additionalMetricNames": { - SchemaProps: spec.SchemaProps{ - Description: "AdditionalMetricNames represents metrics that should be collected from Trials. This can be empty if we only care about the objective metric. Note: If we adopt a push instead of pull mechanism, this can be omitted completely.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "metricStrategies": { - SchemaProps: spec.SchemaProps{ - Description: "MetricStrategies defines various rules (min, max or latest) to extract metrics values. This field is allowed to missing, experiment defaulter (webhook) will fill it.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"}, - } -} - -func schema_apis_controller_common_v1beta1_Observation(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metrics": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs for metric names and values", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"}, - } -} - -func schema_apis_controller_common_v1beta1_ParameterAssignment(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: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_SourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "fileSystemPath": { - SchemaProps: spec.SchemaProps{ - Description: "During training model, metrics may be persisted into local file in source code, such as tfEvent use case", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath"), - }, - }, - "filter": { - SchemaProps: spec.SchemaProps{ - Description: "Default metric output format is {\"metric\": \"\", \"value\": , \"epoch\": , \"step\": }, but if the output doesn't follow default format, please extend it here", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec", "k8s.io/api/core/v1.HTTPGetAction"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapSource references the config map where trial template is located", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "configMapName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of config map where trial template is located", - Type: []string{"string"}, - Format: "", - }, - }, - "configMapNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of config map where trial template is located", - Type: []string{"string"}, - Format: "", - }, - }, - "templatePath": { - SchemaProps: spec.SchemaProps{ - Description: "Path in config map where trial template is located", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_Experiment(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Structure of the Experiment custom resource.", - 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentCondition describes the state of the experiment at a certain point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of experiment 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: "", - }, - }, - "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: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - 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"), - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentList contains a list of Experiments", - 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentSpec is the specification of an Experiment.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "List of hyperparameter configurations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), - }, - }, - }, - }, - }, - "objective": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the objective of the experiment.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), - }, - }, - "algorithm": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the suggestion algorithm.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), - }, - }, - "earlyStopping": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the early stopping algorithm.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), - }, - }, - "trialTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "Template for each run of the trial.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"), - }, - }, - "parallelTrialCount": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials can be processed in parallel. Defaults to 3", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "maxTrialCount": { - SchemaProps: spec.SchemaProps{ - Description: "Max completed trials to mark experiment as succeeded", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "maxFailedTrialCount": { - SchemaProps: spec.SchemaProps{ - Description: "Max failed trials to mark experiment as failed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "metricsCollectorSpec": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the specification of the metrics collector", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), - }, - }, - "nasConfig": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig"), - }, - }, - "resumePolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Describes resuming policy which usually take effect after experiment terminated. Default value is Never.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentStatus is the current status of an Experiment.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "completionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastReconcileTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "List of observed runtime conditions for this Experiment.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition"), - }, - }, - }, - }, - }, - "currentOptimalTrial": { - SchemaProps: spec.SchemaProps{ - Description: "Current optimal trial parameters and observations.", - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial"), - }, - }, - "runningTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which are running.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "pendingTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which are pending.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "failedTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have already failed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "succeededTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have already succeeded.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "killedTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have been killed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "earlyStoppedTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have been early stopped.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "metricsUnavailableTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have been metrics unavailable", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "trials": { - SchemaProps: spec.SchemaProps{ - Description: "Trials is the total number of trials owned by the experiment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsSucceeded": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials have succeeded.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsFailed": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials have failed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsKilled": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials have been killed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsPending": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently pending.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsRunning": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently running.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsEarlyStopped": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently early stopped.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialMetricsUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently metrics unavailable.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "max": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "min": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "list": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "step": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "distribution": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_GraphConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GraphConfig contains a config of DAG", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "numLayers": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - "inputSizes": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - "outputSizes": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_NasConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NasConfig contains config for NAS job", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "graphConfig": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig"), - }, - }, - "operations": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"}, - } -} - -func schema_apis_controller_experiments_v1beta1_Operation(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Operation contains type of operation in DAG", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "operationType": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"}, - } -} - -func schema_apis_controller_experiments_v1beta1_OptimalTrial(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "OptimalTrial is the metrics and assignments of the best trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "bestTrialName": { - SchemaProps: spec.SchemaProps{ - Description: "BestTrialName is the name of the best trial.", - Type: []string{"string"}, - Format: "", - }, - }, - "parameterAssignments": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs for hyperparameters and assignment values.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), - }, - }, - }, - }, - }, - "observation": { - SchemaProps: spec.SchemaProps{ - Description: "Observation for this trial", - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ParameterSpec(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: "", - }, - }, - "parameterType": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "feasibleSpace": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"}, - } -} - -func schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialParameterSpec describes parameters that must be replaced in trial template", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the parameter that must be replaced in trial template", - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Description: "Description of the parameter", - Type: []string{"string"}, - Format: "", - }, - }, - "reference": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to the parameter in search space", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_TrialSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialSource represent the source for trial template Only one source can be specified", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "trialSpec": { - SchemaProps: spec.SchemaProps{ - Description: "TrialSpec represents trial template in unstructured format", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap spec represents a reference to ConfigMap", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, - } -} - -func schema_apis_controller_experiments_v1beta1_TrialTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialTemplate describes structure of trial template", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "retain": { - SchemaProps: spec.SchemaProps{ - Description: "Retain indicates that trial resources must be not cleanup", - Type: []string{"boolean"}, - Format: "", - }, - }, - "trialSpec": { - SchemaProps: spec.SchemaProps{ - Description: "TrialSpec represents trial template in unstructured format", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap spec represents a reference to ConfigMap", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), - }, - }, - "trialParameters": { - SchemaProps: spec.SchemaProps{ - Description: "List of parameters that are used in trial template", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec"), - }, - }, - }, - }, - }, - "primaryPodLabels": { - SchemaProps: spec.SchemaProps{ - Description: "Labels that determines if pod needs to be injected by Katib sidecar container. If PrimaryPodLabels is omitted, metrics collector wraps all Trial's pods.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "primaryContainerName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of training container where actual model training is running", - Type: []string{"string"}, - Format: "", - }, - }, - "successCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - "failureCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_Suggestion(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Suggestion represents the structure of a Suggestion resource.", - 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionCondition describes the state of the Suggestion at a certain point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of Suggestion 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: "", - }, - }, - "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: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - 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"), - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionList contains a list of Suggestion", - 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionSpec is the specification of a Suggestion.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithm": { - SchemaProps: spec.SchemaProps{ - Description: "Algorithm describes HP or NAS algorithm that suggestion is used.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), - }, - }, - "earlyStopping": { - SchemaProps: spec.SchemaProps{ - Description: "EarlyStopping describes early stopping algorithm that suggestion is used.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), - }, - }, - "requests": { - SchemaProps: spec.SchemaProps{ - Description: "Number of suggestions requested.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "resumePolicy": { - SchemaProps: spec.SchemaProps{ - Description: "ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is Never.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionStatus is the current status of a Suggestion.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithmSettings": { - SchemaProps: spec.SchemaProps{ - Description: "AlgorithmSettings defines HP or NAS algorithm settings which suggestion gRPC service returns. These settings overwrites Experiment's settings before the gRPC request. It can be empty if settings haven't been changed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), - }, - }, - }, - }, - }, - "suggestionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Number of suggestion results", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "suggestions": { - SchemaProps: spec.SchemaProps{ - Description: "Suggestion results", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment"), - }, - }, - }, - }, - }, - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Suggestion was acknowledged by the Suggestion controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "completionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Suggestion was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastReconcileTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents last time when the Suggestion was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "List of observed runtime conditions for this Suggestion.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialAssignment is the assignment for one trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "parameterAssignments": { - SchemaProps: spec.SchemaProps{ - Description: "Suggestion results with Trial parameters", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), - }, - }, - }, - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the suggestion", - Type: []string{"string"}, - Format: "", - }, - }, - "earlyStoppingRules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules for early stopping techniques Contains rule name, value and comparison type", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), - }, - }, - }, - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Suggestion label metadata to attach to Trial job", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, - } -} - -func schema_apis_controller_trials_v1beta1_Trial(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents the structure of a Trial resource.", - 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialCondition describes the state of the trial at a certain point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of trial 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: "", - }, - }, - "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: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - 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"), - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialList contains a list of Trials", - 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialSpec is the specification of a Trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "objective": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the objective of the experiment.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), - }, - }, - "parameterAssignments": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs for hyperparameters and assignment values.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), - }, - }, - }, - }, - }, - "earlyStoppingRules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules for early stopping techniques. Each rule should be met to early stop Trial.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), - }, - }, - }, - }, - }, - "runSpec": { - SchemaProps: spec.SchemaProps{ - Description: "Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. Kubeflow Training Operator) handle the rest.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), - }, - }, - "retainRun": { - SchemaProps: spec.SchemaProps{ - Description: "Whether to retain the trial run object after completed.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "metricsCollector": { - SchemaProps: spec.SchemaProps{ - Description: "Describes how metrics will be collected", - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), - }, - }, - "primaryPodLabels": { - SchemaProps: spec.SchemaProps{ - Description: "Label that determines if pod needs to be injected by Katib sidecar container", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "primaryContainerName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of training container where actual model training is running", - Type: []string{"string"}, - Format: "", - }, - }, - "successCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - "failureCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Labels that provide additional metadata for services (e.g. Suggestions tracking)", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialStatus is the current status of a Trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "completionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastReconcileTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "List of observed runtime conditions for this Trial.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition"), - }, - }, - }, - }, - }, - "observation": { - SchemaProps: spec.SchemaProps{ - Description: "Results of the Trial - objectives and other metrics values.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} diff --git a/pkg/apis/v1beta1/zz_generated.openapi.go b/pkg/apis/v1beta1/zz_generated.openapi.go new file mode 100644 index 00000000000..020713d61a8 --- /dev/null +++ b/pkg/apis/v1beta1/zz_generated.openapi.go @@ -0,0 +1,4701 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 The Kubeflow 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 openapi-gen. DO NOT EDIT. + +package v1beta1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + 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{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting": schema_apis_controller_common_v1beta1_AlgorithmSetting(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec": schema_apis_controller_common_v1beta1_AlgorithmSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec": schema_apis_controller_common_v1beta1_CollectorSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule": schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting": schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec": schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath": schema_apis_controller_common_v1beta1_FileSystemPath(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec": schema_apis_controller_common_v1beta1_FilterSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric": schema_apis_controller_common_v1beta1_Metric(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy": schema_apis_controller_common_v1beta1_MetricStrategy(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec": schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec": schema_apis_controller_common_v1beta1_ObjectiveSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation": schema_apis_controller_common_v1beta1_Observation(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment": schema_apis_controller_common_v1beta1_ParameterAssignment(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec": schema_apis_controller_common_v1beta1_SourceSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource": schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment": schema_apis_controller_experiments_v1beta1_Experiment(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition": schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentList": schema_apis_controller_experiments_v1beta1_ExperimentList(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec": schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus": schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace": schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig": schema_apis_controller_experiments_v1beta1_GraphConfig(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig": schema_apis_controller_experiments_v1beta1_NasConfig(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation": schema_apis_controller_experiments_v1beta1_Operation(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial": schema_apis_controller_experiments_v1beta1_OptimalTrial(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec": schema_apis_controller_experiments_v1beta1_ParameterSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec": schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialSource": schema_apis_controller_experiments_v1beta1_TrialSource(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate": schema_apis_controller_experiments_v1beta1_TrialTemplate(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion": schema_apis_controller_suggestions_v1beta1_Suggestion(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition": schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionList": schema_apis_controller_suggestions_v1beta1_SuggestionList(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec": schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus": schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment": schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial": schema_apis_controller_trials_v1beta1_Trial(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition": schema_apis_controller_trials_v1beta1_TrialCondition(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialList": schema_apis_controller_trials_v1beta1_TrialList(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec": schema_apis_controller_trials_v1beta1_TrialSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus": schema_apis_controller_trials_v1beta1_TrialStatus(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/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + } +} + +func schema_apis_controller_common_v1beta1_AlgorithmSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AlgorithmSetting represents key-value pair for HP or NAS algorithm settings.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is setting name.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the setting value.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_AlgorithmSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AlgorithmSpec is the specification for a HP or NAS algorithm.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithmName": { + SchemaProps: spec.SchemaProps{ + Description: "HP or NAS algorithm name.", + Type: []string{"string"}, + Format: "", + }, + }, + "algorithmSettings": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs representing settings for suggestion algorithms.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"}, + } +} + +func schema_apis_controller_common_v1beta1_CollectorSpec(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{ + Type: []string{"string"}, + Format: "", + }, + }, + "customCollector": { + SchemaProps: spec.SchemaProps{ + Description: "When kind is \"customCollector\", this field will be used", + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Container"}, + } +} + +func schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EarlyStoppingRule represents each rule for early stopping.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name contains metric name for the rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value contains metric value for the rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "comparison": { + SchemaProps: spec.SchemaProps{ + Description: "Comparison defines correlation between name and value.", + Type: []string{"string"}, + Format: "", + }, + }, + "startStep": { + SchemaProps: spec.SchemaProps{ + Description: "StartStep defines quantity of intermediate results that should be received before applying the rule. If start step is empty, rule is applied from the first recorded metric.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EarlyStoppingSetting represents key-value pair for early stopping algorithm settings.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the setting name.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the setting value.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EarlyStoppingSpec is the specification for a early stopping algorithm.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithmName": { + SchemaProps: spec.SchemaProps{ + Description: "Early stopping algorithm name.", + Type: []string{"string"}, + Format: "", + }, + }, + "algorithmSettings": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs representing settings for early stopping algorithm.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"}, + } +} + +func schema_apis_controller_common_v1beta1_FileSystemPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_FilterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricsFormat": { + SchemaProps: spec.SchemaProps{ + Description: "When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \": \" or else", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_Metric(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: "", + }, + }, + "min": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "latest": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_MetricStrategy(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: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"), + }, + }, + "collector": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"}, + } +} + +func schema_apis_controller_common_v1beta1_ObjectiveSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectiveSpec represents Experiment's objective specification.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type for Experiment optimization.", + Type: []string{"string"}, + Format: "", + }, + }, + "goal": { + SchemaProps: spec.SchemaProps{ + Description: "Goal is the Experiment's objective goal that should be reached. In case of empty goal, Experiment is running until MaxTrialCount = TrialsSucceeded.", + Type: []string{"number"}, + Format: "double", + }, + }, + "objectiveMetricName": { + SchemaProps: spec.SchemaProps{ + Description: "ObjectiveMetricName represents primary Experiment's metric to optimize.", + Type: []string{"string"}, + Format: "", + }, + }, + "additionalMetricNames": { + SchemaProps: spec.SchemaProps{ + Description: "AdditionalMetricNames represents metrics that should be collected from Trials. This can be empty if we only care about the objective metric. Note: If we adopt a push instead of pull mechanism, this can be omitted completely.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "metricStrategies": { + SchemaProps: spec.SchemaProps{ + Description: "MetricStrategies defines various rules (min, max or latest) to extract metrics values. This field is allowed to missing, experiment defaulter (webhook) will fill it.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"}, + } +} + +func schema_apis_controller_common_v1beta1_Observation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metrics": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs for metric names and values", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"}, + } +} + +func schema_apis_controller_common_v1beta1_ParameterAssignment(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: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_SourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "fileSystemPath": { + SchemaProps: spec.SchemaProps{ + Description: "During training model, metrics may be persisted into local file in source code, such as tfEvent use case", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath"), + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Default metric output format is {\"metric\": \"\", \"value\": , \"epoch\": , \"step\": }, but if the output doesn't follow default format, please extend it here", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec", "k8s.io/api/core/v1.HTTPGetAction"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapSource references the config map where trial template is located", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "configMapName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of config map where trial template is located", + Type: []string{"string"}, + Format: "", + }, + }, + "configMapNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of config map where trial template is located", + Type: []string{"string"}, + Format: "", + }, + }, + "templatePath": { + SchemaProps: spec.SchemaProps{ + Description: "Path in config map where trial template is located", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_Experiment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Structure of the Experiment custom resource.", + 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentCondition describes the state of the experiment at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of experiment 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: "", + }, + }, + "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: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + 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"), + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentList contains a list of Experiments", + 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentSpec is the specification of an Experiment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "List of hyperparameter configurations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), + }, + }, + }, + }, + }, + "objective": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the objective of the experiment.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), + }, + }, + "algorithm": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the suggestion algorithm.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), + }, + }, + "earlyStopping": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the early stopping algorithm.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), + }, + }, + "trialTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Template for each run of the trial.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"), + }, + }, + "parallelTrialCount": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials can be processed in parallel. Defaults to 3", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxTrialCount": { + SchemaProps: spec.SchemaProps{ + Description: "Max completed trials to mark experiment as succeeded", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxFailedTrialCount": { + SchemaProps: spec.SchemaProps{ + Description: "Max failed trials to mark experiment as failed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "metricsCollectorSpec": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the specification of the metrics collector", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), + }, + }, + "nasConfig": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig"), + }, + }, + "resumePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Describes resuming policy which usually take effect after experiment terminated. Default value is Never.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentStatus is the current status of an Experiment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastReconcileTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "List of observed runtime conditions for this Experiment.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition"), + }, + }, + }, + }, + }, + "currentOptimalTrial": { + SchemaProps: spec.SchemaProps{ + Description: "Current optimal trial parameters and observations.", + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial"), + }, + }, + "runningTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which are running.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "pendingTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which are pending.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "failedTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have already failed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "succeededTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have already succeeded.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "killedTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have been killed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "earlyStoppedTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have been early stopped.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "metricsUnavailableTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have been metrics unavailable", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "trials": { + SchemaProps: spec.SchemaProps{ + Description: "Trials is the total number of trials owned by the experiment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsSucceeded": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials have succeeded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsFailed": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials have failed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsKilled": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials have been killed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsPending": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently pending.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsRunning": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently running.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsEarlyStopped": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently early stopped.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialMetricsUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently metrics unavailable.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "max": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "min": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "list": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "step": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "distribution": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_GraphConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GraphConfig contains a config of DAG", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "numLayers": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "inputSizes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "outputSizes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_NasConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NasConfig contains config for NAS job", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "graphConfig": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig"), + }, + }, + "operations": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"}, + } +} + +func schema_apis_controller_experiments_v1beta1_Operation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Operation contains type of operation in DAG", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operationType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"}, + } +} + +func schema_apis_controller_experiments_v1beta1_OptimalTrial(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OptimalTrial is the metrics and assignments of the best trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bestTrialName": { + SchemaProps: spec.SchemaProps{ + Description: "BestTrialName is the name of the best trial.", + Type: []string{"string"}, + Format: "", + }, + }, + "parameterAssignments": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs for hyperparameters and assignment values.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), + }, + }, + }, + }, + }, + "observation": { + SchemaProps: spec.SchemaProps{ + Description: "Observation for this trial", + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ParameterSpec(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: "", + }, + }, + "parameterType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "feasibleSpace": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"}, + } +} + +func schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialParameterSpec describes parameters that must be replaced in trial template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the parameter that must be replaced in trial template", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "Description of the parameter", + Type: []string{"string"}, + Format: "", + }, + }, + "reference": { + SchemaProps: spec.SchemaProps{ + Description: "Reference to the parameter in search space", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_TrialSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialSource represent the source for trial template Only one source can be specified", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "trialSpec": { + SchemaProps: spec.SchemaProps{ + Description: "TrialSpec represents trial template in unstructured format", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap spec represents a reference to ConfigMap", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_apis_controller_experiments_v1beta1_TrialTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialTemplate describes structure of trial template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "retain": { + SchemaProps: spec.SchemaProps{ + Description: "Retain indicates that trial resources must be not cleanup", + Type: []string{"boolean"}, + Format: "", + }, + }, + "trialSpec": { + SchemaProps: spec.SchemaProps{ + Description: "TrialSpec represents trial template in unstructured format", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap spec represents a reference to ConfigMap", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), + }, + }, + "trialParameters": { + SchemaProps: spec.SchemaProps{ + Description: "List of parameters that are used in trial template", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec"), + }, + }, + }, + }, + }, + "primaryPodLabels": { + SchemaProps: spec.SchemaProps{ + Description: "Labels that determines if pod needs to be injected by Katib sidecar container. If PrimaryPodLabels is omitted, metrics collector wraps all Trial's pods.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "primaryContainerName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of training container where actual model training is running", + Type: []string{"string"}, + Format: "", + }, + }, + "successCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + "failureCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_Suggestion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Suggestion represents the structure of a Suggestion resource.", + 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionCondition describes the state of the Suggestion at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of Suggestion 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: "", + }, + }, + "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: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + 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"), + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionList contains a list of Suggestion", + 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionSpec is the specification of a Suggestion.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithm": { + SchemaProps: spec.SchemaProps{ + Description: "Algorithm describes HP or NAS algorithm that suggestion is used.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), + }, + }, + "earlyStopping": { + SchemaProps: spec.SchemaProps{ + Description: "EarlyStopping describes early stopping algorithm that suggestion is used.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), + }, + }, + "requests": { + SchemaProps: spec.SchemaProps{ + Description: "Number of suggestions requested.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "resumePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is Never.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionStatus is the current status of a Suggestion.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithmSettings": { + SchemaProps: spec.SchemaProps{ + Description: "AlgorithmSettings defines HP or NAS algorithm settings which suggestion gRPC service returns. These settings overwrites Experiment's settings before the gRPC request. It can be empty if settings haven't been changed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), + }, + }, + }, + }, + }, + "suggestionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Number of suggestion results", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "suggestions": { + SchemaProps: spec.SchemaProps{ + Description: "Suggestion results", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment"), + }, + }, + }, + }, + }, + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Suggestion was acknowledged by the Suggestion controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Suggestion was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastReconcileTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents last time when the Suggestion was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "List of observed runtime conditions for this Suggestion.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialAssignment is the assignment for one trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "parameterAssignments": { + SchemaProps: spec.SchemaProps{ + Description: "Suggestion results with Trial parameters", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), + }, + }, + }, + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the suggestion", + Type: []string{"string"}, + Format: "", + }, + }, + "earlyStoppingRules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules for early stopping techniques Contains rule name, value and comparison type", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), + }, + }, + }, + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Suggestion label metadata to attach to Trial job", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, + } +} + +func schema_apis_controller_trials_v1beta1_Trial(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the structure of a Trial resource.", + 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialCondition describes the state of the trial at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of trial 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: "", + }, + }, + "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: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + 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"), + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialList contains a list of Trials", + 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialSpec is the specification of a Trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "objective": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the objective of the experiment.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), + }, + }, + "parameterAssignments": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs for hyperparameters and assignment values.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), + }, + }, + }, + }, + }, + "earlyStoppingRules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules for early stopping techniques. Each rule should be met to early stop Trial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), + }, + }, + }, + }, + }, + "runSpec": { + SchemaProps: spec.SchemaProps{ + Description: "Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. Kubeflow Training Operator) handle the rest.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + "retainRun": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to retain the trial run object after completed.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "metricsCollector": { + SchemaProps: spec.SchemaProps{ + Description: "Describes how metrics will be collected", + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), + }, + }, + "primaryPodLabels": { + SchemaProps: spec.SchemaProps{ + Description: "Label that determines if pod needs to be injected by Katib sidecar container", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "primaryContainerName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of training container where actual model training is running", + Type: []string{"string"}, + Format: "", + }, + }, + "successCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + "failureCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Labels that provide additional metadata for services (e.g. Suggestions tracking)", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialStatus is the current status of a Trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastReconcileTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "List of observed runtime conditions for this Trial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition"), + }, + }, + }, + }, + }, + "observation": { + SchemaProps: spec.SchemaProps{ + Description: "Results of the Trial - objectives and other metrics values.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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-list-map-keys": []interface{}{ + "uid", + }, + "x-kubernetes-list-type": "map", + "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-list-type": "set", + "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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "atomic", + }, + }, + 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_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"}, + }, + }, + } +} From ed01b401b5e44a39d708eac3968f220d7f0a0960 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 09:03:02 +0000 Subject: [PATCH 08/20] fix: fix typo error. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- pkg/mock/v1beta1/trial/managerclient/katibmanager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/mock/v1beta1/trial/managerclient/katibmanager.go b/pkg/mock/v1beta1/trial/managerclient/katibmanager.go index 159a5ade746..ecc58cc92a4 100644 --- a/pkg/mock/v1beta1/trial/managerclient/katibmanager.go +++ b/pkg/mock/v1beta1/trial/managerclient/katibmanager.go @@ -79,8 +79,8 @@ func (m *MockManagerClient) ReportTrialObservationLog(arg0 *v1beta1.Trial, arg1 return ret0, ret1 } -// ReportTrialObservationLog indicated an expected call of ReportTrialObservationLog. -func (mr *MockManagerClientMockRecorder) ReportTrialObservationLog(arg0 any, arg1 any) *gomock.Call { +// ReportTrialObservationLog indicates an expected call of ReportTrialObservationLog. +func (mr *MockManagerClientMockRecorder) ReportTrialObservationLog(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportTrialObservationLog", reflect.TypeOf((*MockManagerClient)(nil).ReportTrialObservationLog), arg0, arg1) } From b915471b6bed0d90749f53e3e708e72ce259d134 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 09:10:59 +0000 Subject: [PATCH 09/20] chore: update k8s version in CI. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- .github/workflows/e2e-test-darts-cifar10.yaml | 2 +- .github/workflows/e2e-test-enas-cifar10.yaml | 2 +- .github/workflows/e2e-test-pytorch-mnist.yaml | 2 +- .github/workflows/e2e-test-simple-pbt.yaml | 2 +- .github/workflows/e2e-test-tf-mnist-with-summaries.yaml | 2 +- .github/workflows/e2e-test-tune-api.yaml | 2 +- .github/workflows/e2e-test-ui-random-search-postgres.yaml | 2 +- .github/workflows/test-go.yaml | 2 +- examples/v1beta1/kind-cluster/README.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-test-darts-cifar10.yaml b/.github/workflows/e2e-test-darts-cifar10.yaml index 3550f412917..e6a181201fb 100644 --- a/.github/workflows/e2e-test-darts-cifar10.yaml +++ b/.github/workflows/e2e-test-darts-cifar10.yaml @@ -33,6 +33,6 @@ jobs: strategy: fail-fast: false matrix: - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"] + kubernetes-version: ["v1.28.7", "v1.29.2", "v1.30.7"] # Comma Delimited experiments: ["darts-cpu"] diff --git a/.github/workflows/e2e-test-enas-cifar10.yaml b/.github/workflows/e2e-test-enas-cifar10.yaml index ccfe5538b95..33b06470f11 100644 --- a/.github/workflows/e2e-test-enas-cifar10.yaml +++ b/.github/workflows/e2e-test-enas-cifar10.yaml @@ -33,6 +33,6 @@ jobs: strategy: fail-fast: false matrix: - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"] + kubernetes-version: ["v1.28.7", "v1.29.2", "v1.30.7"] # Comma Delimited experiments: ["enas-cpu"] diff --git a/.github/workflows/e2e-test-pytorch-mnist.yaml b/.github/workflows/e2e-test-pytorch-mnist.yaml index dd715975166..499a629e494 100644 --- a/.github/workflows/e2e-test-pytorch-mnist.yaml +++ b/.github/workflows/e2e-test-pytorch-mnist.yaml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"] + kubernetes-version: ["v1.28.7", "v1.29.2", "v1.30.7"] # Comma Delimited experiments: # suggestion-hyperopt diff --git a/.github/workflows/e2e-test-simple-pbt.yaml b/.github/workflows/e2e-test-simple-pbt.yaml index c91f6a3cb57..26040436f92 100644 --- a/.github/workflows/e2e-test-simple-pbt.yaml +++ b/.github/workflows/e2e-test-simple-pbt.yaml @@ -33,6 +33,6 @@ jobs: fail-fast: false matrix: # Detail: https://hub.docker.com/r/kindest/node - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"] + kubernetes-version: ["v1.28.7", "v1.29.2", "v1.30.7"] # Comma Delimited experiments: ["simple-pbt"] diff --git a/.github/workflows/e2e-test-tf-mnist-with-summaries.yaml b/.github/workflows/e2e-test-tf-mnist-with-summaries.yaml index 4bc5730c5a6..8b4726442de 100644 --- a/.github/workflows/e2e-test-tf-mnist-with-summaries.yaml +++ b/.github/workflows/e2e-test-tf-mnist-with-summaries.yaml @@ -33,6 +33,6 @@ jobs: strategy: fail-fast: false matrix: - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"] + kubernetes-version: ["v1.28.7", "v1.29.2", "v1.30.7"] # Comma Delimited experiments: ["tfjob-mnist-with-summaries"] diff --git a/.github/workflows/e2e-test-tune-api.yaml b/.github/workflows/e2e-test-tune-api.yaml index e1f37a3701b..07c5894e67a 100644 --- a/.github/workflows/e2e-test-tune-api.yaml +++ b/.github/workflows/e2e-test-tune-api.yaml @@ -31,4 +31,4 @@ jobs: fail-fast: false matrix: # Detail: https://hub.docker.com/r/kindest/node - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"] + kubernetes-version: ["v1.28.7", "v1.29.2", "v1.30.7"] diff --git a/.github/workflows/e2e-test-ui-random-search-postgres.yaml b/.github/workflows/e2e-test-ui-random-search-postgres.yaml index 16f74350d94..a3ff7075e76 100644 --- a/.github/workflows/e2e-test-ui-random-search-postgres.yaml +++ b/.github/workflows/e2e-test-ui-random-search-postgres.yaml @@ -32,4 +32,4 @@ jobs: strategy: fail-fast: false matrix: - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"] + kubernetes-version: ["v1.28.7", "v1.29.2", "v1.30.7"] diff --git a/.github/workflows/test-go.yaml b/.github/workflows/test-go.yaml index e18b569c6c2..2022bb60a8b 100644 --- a/.github/workflows/test-go.yaml +++ b/.github/workflows/test-go.yaml @@ -67,7 +67,7 @@ jobs: fail-fast: false matrix: # Detail: `setup-envtest list` - kubernetes-version: ["1.27.1", "1.28.3", "1.29.3"] + kubernetes-version: ["1.28.3", "1.29.3", "1.30.7"] # notifies that all test jobs are finished. finish: diff --git a/examples/v1beta1/kind-cluster/README.md b/examples/v1beta1/kind-cluster/README.md index 82e80b2074b..89d603a8881 100644 --- a/examples/v1beta1/kind-cluster/README.md +++ b/examples/v1beta1/kind-cluster/README.md @@ -10,7 +10,7 @@ Install the following tools to run the example: - [Docker](https://docs.docker.com/get-docker) >= 20.10 - [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) >= 0.13 -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) >= 1.27 +- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) >= 1.28 ## Installation From 146148cdecfffc6604b2be92965b5c6172b30a9a Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 09:22:49 +0000 Subject: [PATCH 10/20] test(codegen): output CODEGEN_PKG. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-codegen.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 39d7507c590..491f0ef24c5 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -28,6 +28,7 @@ CODEGEN_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/code-generator) cd "$CURRENT_DIR/.." # shellcheck source=/dev/null +echo "${CODEGEN_PKG}" source "${CODEGEN_PKG}/kube_codegen.sh" echo "Generating conversion and defaults functions for config.kubeflow.org ..." From 5c48e4bf937691c2725dc93f135c8848d8986049 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 09:30:23 +0000 Subject: [PATCH 11/20] fix(codegen): move shell check annotation. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-codegen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 491f0ef24c5..59b4a26dbeb 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -27,8 +27,8 @@ CODEGEN_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/code-generator) cd "$CURRENT_DIR/.." -# shellcheck source=/dev/null echo "${CODEGEN_PKG}" +# shellcheck source=/dev/null source "${CODEGEN_PKG}/kube_codegen.sh" echo "Generating conversion and defaults functions for config.kubeflow.org ..." From 532ab001b1147fef25fb8d1df02eefa2a29fa4ed Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Mon, 9 Dec 2024 12:03:34 +0000 Subject: [PATCH 12/20] fix(ci): change k8s version in go test to 1.30.0. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- .github/workflows/test-go.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-go.yaml b/.github/workflows/test-go.yaml index 2022bb60a8b..6df1ace4657 100644 --- a/.github/workflows/test-go.yaml +++ b/.github/workflows/test-go.yaml @@ -67,7 +67,7 @@ jobs: fail-fast: false matrix: # Detail: `setup-envtest list` - kubernetes-version: ["1.28.3", "1.29.3", "1.30.7"] + kubernetes-version: ["1.28.3", "1.29.3", "1.30.0"] # notifies that all test jobs are finished. finish: From 8c2a15c279bf7254d6fe97bdace022769d898278 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Wed, 11 Dec 2024 02:56:28 +0000 Subject: [PATCH 13/20] fix: remove toolchain declaration in go.mod Signed-off-by: Electronic-Waste <2690692950@qq.com> --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index 6e88a207935..3ee6131f3d7 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/kubeflow/katib go 1.22.0 -toolchain go1.23.2 - require ( github.com/DATA-DOG/go-sqlmock v1.5.0 github.com/awalterschulze/gographviz v2.0.3+incompatible From f3088b256139e0b6ea3fd54920029b29cce53696 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Wed, 11 Dec 2024 03:07:47 +0000 Subject: [PATCH 14/20] fix: remove codegen dependency in openapigen.sh. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-openapigen.sh | 12 +- hack/violation_exception_v1beta1.list | 39 - pkg/apis/v1beta1/zz_generated.openapi.go | 4673 +--------------------- 3 files changed, 7 insertions(+), 4717 deletions(-) diff --git a/hack/update-openapigen.sh b/hack/update-openapigen.sh index 6fb9201fecb..ef1a52383c2 100755 --- a/hack/update-openapigen.sh +++ b/hack/update-openapigen.sh @@ -23,23 +23,23 @@ echo "Generate open-api for the APIs" CURRENT_DIR=$(dirname "${BASH_SOURCE[0]}") KATIB_ROOT=$(realpath "${CURRENT_DIR}/..") KATIB_PKG="github.com/kubeflow/katib" -CODEGEN_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/code-generator) cd "$CURRENT_DIR/.." -# shellcheck source=/dev/null -source "${CODEGEN_PKG}/kube_codegen.sh" +# Get the kube-openapi binary. +OPENAPI_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/kube-openapi) +echo ">> Using ${OPENAPI_PKG}" VERSION_LIST=(v1beta1) for VERSION in "${VERSION_LIST[@]}"; do echo "Generating OpenAPI specification for ${VERSION} ..." - kube::codegen::gen_openapi \ - --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ + go run "${OPENAPI_PKG}/cmd/openapi-gen" \ + --go-header-file "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ --output-pkg "${KATIB_PKG}/pkg/apis/${VERSION}" \ --output-dir "${KATIB_ROOT}/pkg/apis/${VERSION}" \ + --output-file "zz_generated.openapi.go" \ --report-filename "${KATIB_ROOT}/hack/violation_exception_${VERSION}.list" \ - --update-report \ "${KATIB_ROOT}/pkg/apis/controller" done diff --git a/hack/violation_exception_v1beta1.list b/hack/violation_exception_v1beta1.list index 45dcaf3d7e0..e69de29bb2d 100644 --- a/hack/violation_exception_v1beta1.list +++ b/hack/violation_exception_v1beta1.list @@ -1,39 +0,0 @@ -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,AlgorithmSpec,AlgorithmSettings -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,EarlyStoppingSpec,AlgorithmSettings -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,FilterSpec,MetricsFormat -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,ObjectiveSpec,AdditionalMetricNames -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,ObjectiveSpec,MetricStrategies -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,Observation,Metrics -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentSpec,Parameters -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,Conditions -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,EarlyStoppedTrialList -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,FailedTrialList -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,KilledTrialList -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,MetricsUnavailableTrialList -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,PendingTrialList -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,RunningTrialList -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,SucceededTrialList -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,FeasibleSpace,List -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,GraphConfig,InputSizes -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,GraphConfig,OutputSizes -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,NasConfig,Operations -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,Operation,Parameters -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,OptimalTrial,ParameterAssignments -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,TrialTemplate,TrialParameters -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,AlgorithmSettings -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,Conditions -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,Suggestions -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,TrialAssignment,EarlyStoppingRules -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,TrialAssignment,ParameterAssignments -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialSpec,EarlyStoppingRules -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialSpec,ParameterAssignments -API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialStatus,Conditions -API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,APIResourceList,APIResources -API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Duration,Duration -API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Object -API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,InternalEvent,Type -API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,MicroTime,Time -API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,StatusCause,Type -API rule violation: names_match,k8s.io/apimachinery/pkg/apis/meta/v1,Time,Time -API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentEncoding -API rule violation: names_match,k8s.io/apimachinery/pkg/runtime,Unknown,ContentType diff --git a/pkg/apis/v1beta1/zz_generated.openapi.go b/pkg/apis/v1beta1/zz_generated.openapi.go index 020713d61a8..56739159a6a 100644 --- a/pkg/apis/v1beta1/zz_generated.openapi.go +++ b/pkg/apis/v1beta1/zz_generated.openapi.go @@ -22,4680 +22,9 @@ limitations under the License. package v1beta1 import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 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{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting": schema_apis_controller_common_v1beta1_AlgorithmSetting(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec": schema_apis_controller_common_v1beta1_AlgorithmSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec": schema_apis_controller_common_v1beta1_CollectorSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule": schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting": schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec": schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath": schema_apis_controller_common_v1beta1_FileSystemPath(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec": schema_apis_controller_common_v1beta1_FilterSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric": schema_apis_controller_common_v1beta1_Metric(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy": schema_apis_controller_common_v1beta1_MetricStrategy(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec": schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec": schema_apis_controller_common_v1beta1_ObjectiveSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation": schema_apis_controller_common_v1beta1_Observation(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment": schema_apis_controller_common_v1beta1_ParameterAssignment(ref), - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec": schema_apis_controller_common_v1beta1_SourceSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource": schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment": schema_apis_controller_experiments_v1beta1_Experiment(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition": schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentList": schema_apis_controller_experiments_v1beta1_ExperimentList(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec": schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus": schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace": schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig": schema_apis_controller_experiments_v1beta1_GraphConfig(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig": schema_apis_controller_experiments_v1beta1_NasConfig(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation": schema_apis_controller_experiments_v1beta1_Operation(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial": schema_apis_controller_experiments_v1beta1_OptimalTrial(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec": schema_apis_controller_experiments_v1beta1_ParameterSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec": schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialSource": schema_apis_controller_experiments_v1beta1_TrialSource(ref), - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate": schema_apis_controller_experiments_v1beta1_TrialTemplate(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion": schema_apis_controller_suggestions_v1beta1_Suggestion(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition": schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionList": schema_apis_controller_suggestions_v1beta1_SuggestionList(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec": schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus": schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref), - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment": schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial": schema_apis_controller_trials_v1beta1_Trial(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition": schema_apis_controller_trials_v1beta1_TrialCondition(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialList": schema_apis_controller_trials_v1beta1_TrialList(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec": schema_apis_controller_trials_v1beta1_TrialSpec(ref), - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus": schema_apis_controller_trials_v1beta1_TrialStatus(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/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), - } -} - -func schema_apis_controller_common_v1beta1_AlgorithmSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AlgorithmSetting represents key-value pair for HP or NAS algorithm settings.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is setting name.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is the setting value.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_AlgorithmSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "AlgorithmSpec is the specification for a HP or NAS algorithm.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithmName": { - SchemaProps: spec.SchemaProps{ - Description: "HP or NAS algorithm name.", - Type: []string{"string"}, - Format: "", - }, - }, - "algorithmSettings": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs representing settings for suggestion algorithms.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"}, - } -} - -func schema_apis_controller_common_v1beta1_CollectorSpec(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{ - Type: []string{"string"}, - Format: "", - }, - }, - "customCollector": { - SchemaProps: spec.SchemaProps{ - Description: "When kind is \"customCollector\", this field will be used", - Ref: ref("k8s.io/api/core/v1.Container"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "k8s.io/api/core/v1.Container"}, - } -} - -func schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EarlyStoppingRule represents each rule for early stopping.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name contains metric name for the rule.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value contains metric value for the rule.", - Type: []string{"string"}, - Format: "", - }, - }, - "comparison": { - SchemaProps: spec.SchemaProps{ - Description: "Comparison defines correlation between name and value.", - Type: []string{"string"}, - Format: "", - }, - }, - "startStep": { - SchemaProps: spec.SchemaProps{ - Description: "StartStep defines quantity of intermediate results that should be received before applying the rule. If start step is empty, rule is applied from the first recorded metric.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EarlyStoppingSetting represents key-value pair for early stopping algorithm settings.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is the setting name.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is the setting value.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "EarlyStoppingSpec is the specification for a early stopping algorithm.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithmName": { - SchemaProps: spec.SchemaProps{ - Description: "Early stopping algorithm name.", - Type: []string{"string"}, - Format: "", - }, - }, - "algorithmSettings": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs representing settings for early stopping algorithm.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"}, - } -} - -func schema_apis_controller_common_v1beta1_FileSystemPath(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "path": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "format": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_FilterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metricsFormat": { - SchemaProps: spec.SchemaProps{ - Description: "When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \": \" or else", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_Metric(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: "", - }, - }, - "min": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "max": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "latest": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_MetricStrategy(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: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "source": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"), - }, - }, - "collector": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"}, - } -} - -func schema_apis_controller_common_v1beta1_ObjectiveSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ObjectiveSpec represents Experiment's objective specification.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type for Experiment optimization.", - Type: []string{"string"}, - Format: "", - }, - }, - "goal": { - SchemaProps: spec.SchemaProps{ - Description: "Goal is the Experiment's objective goal that should be reached. In case of empty goal, Experiment is running until MaxTrialCount = TrialsSucceeded.", - Type: []string{"number"}, - Format: "double", - }, - }, - "objectiveMetricName": { - SchemaProps: spec.SchemaProps{ - Description: "ObjectiveMetricName represents primary Experiment's metric to optimize.", - Type: []string{"string"}, - Format: "", - }, - }, - "additionalMetricNames": { - SchemaProps: spec.SchemaProps{ - Description: "AdditionalMetricNames represents metrics that should be collected from Trials. This can be empty if we only care about the objective metric. Note: If we adopt a push instead of pull mechanism, this can be omitted completely.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "metricStrategies": { - SchemaProps: spec.SchemaProps{ - Description: "MetricStrategies defines various rules (min, max or latest) to extract metrics values. This field is allowed to missing, experiment defaulter (webhook) will fill it.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"}, - } -} - -func schema_apis_controller_common_v1beta1_Observation(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "metrics": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs for metric names and values", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"}, - } -} - -func schema_apis_controller_common_v1beta1_ParameterAssignment(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: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_common_v1beta1_SourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "httpGet": { - SchemaProps: spec.SchemaProps{ - Description: "Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format", - Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), - }, - }, - "fileSystemPath": { - SchemaProps: spec.SchemaProps{ - Description: "During training model, metrics may be persisted into local file in source code, such as tfEvent use case", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath"), - }, - }, - "filter": { - SchemaProps: spec.SchemaProps{ - Description: "Default metric output format is {\"metric\": \"\", \"value\": , \"epoch\": , \"step\": }, but if the output doesn't follow default format, please extend it here", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec", "k8s.io/api/core/v1.HTTPGetAction"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConfigMapSource references the config map where trial template is located", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "configMapName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of config map where trial template is located", - Type: []string{"string"}, - Format: "", - }, - }, - "configMapNamespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace of config map where trial template is located", - Type: []string{"string"}, - Format: "", - }, - }, - "templatePath": { - SchemaProps: spec.SchemaProps{ - Description: "Path in config map where trial template is located", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_Experiment(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Structure of the Experiment custom resource.", - 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentCondition describes the state of the experiment at a certain point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of experiment 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: "", - }, - }, - "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: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - 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"), - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentList contains a list of Experiments", - 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentSpec is the specification of an Experiment.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "List of hyperparameter configurations.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), - }, - }, - }, - }, - }, - "objective": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the objective of the experiment.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), - }, - }, - "algorithm": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the suggestion algorithm.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), - }, - }, - "earlyStopping": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the early stopping algorithm.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), - }, - }, - "trialTemplate": { - SchemaProps: spec.SchemaProps{ - Description: "Template for each run of the trial.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"), - }, - }, - "parallelTrialCount": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials can be processed in parallel. Defaults to 3", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "maxTrialCount": { - SchemaProps: spec.SchemaProps{ - Description: "Max completed trials to mark experiment as succeeded", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "maxFailedTrialCount": { - SchemaProps: spec.SchemaProps{ - Description: "Max failed trials to mark experiment as failed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "metricsCollectorSpec": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the specification of the metrics collector", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), - }, - }, - "nasConfig": { - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig"), - }, - }, - "resumePolicy": { - SchemaProps: spec.SchemaProps{ - Description: "Describes resuming policy which usually take effect after experiment terminated. Default value is Never.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ExperimentStatus is the current status of an Experiment.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "completionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastReconcileTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "List of observed runtime conditions for this Experiment.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition"), - }, - }, - }, - }, - }, - "currentOptimalTrial": { - SchemaProps: spec.SchemaProps{ - Description: "Current optimal trial parameters and observations.", - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial"), - }, - }, - "runningTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which are running.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "pendingTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which are pending.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "failedTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have already failed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "succeededTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have already succeeded.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "killedTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have been killed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "earlyStoppedTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have been early stopped.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "metricsUnavailableTrialList": { - SchemaProps: spec.SchemaProps{ - Description: "List of trial names which have been metrics unavailable", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "trials": { - SchemaProps: spec.SchemaProps{ - Description: "Trials is the total number of trials owned by the experiment.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsSucceeded": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials have succeeded.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsFailed": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials have failed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsKilled": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials have been killed.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsPending": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently pending.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsRunning": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently running.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialsEarlyStopped": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently early stopped.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "trialMetricsUnavailable": { - SchemaProps: spec.SchemaProps{ - Description: "How many trials are currently metrics unavailable.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "max": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "min": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "list": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "step": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "distribution": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_GraphConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GraphConfig contains a config of DAG", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "numLayers": { - SchemaProps: spec.SchemaProps{ - Type: []string{"integer"}, - Format: "int32", - }, - }, - "inputSizes": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - "outputSizes": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_NasConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "NasConfig contains config for NAS job", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "graphConfig": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig"), - }, - }, - "operations": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"}, - } -} - -func schema_apis_controller_experiments_v1beta1_Operation(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Operation contains type of operation in DAG", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "operationType": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"}, - } -} - -func schema_apis_controller_experiments_v1beta1_OptimalTrial(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "OptimalTrial is the metrics and assignments of the best trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "bestTrialName": { - SchemaProps: spec.SchemaProps{ - Description: "BestTrialName is the name of the best trial.", - Type: []string{"string"}, - Format: "", - }, - }, - "parameterAssignments": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs for hyperparameters and assignment values.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), - }, - }, - }, - }, - }, - "observation": { - SchemaProps: spec.SchemaProps{ - Description: "Observation for this trial", - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, - } -} - -func schema_apis_controller_experiments_v1beta1_ParameterSpec(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: "", - }, - }, - "parameterType": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "feasibleSpace": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"}, - } -} - -func schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialParameterSpec describes parameters that must be replaced in trial template", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the parameter that must be replaced in trial template", - Type: []string{"string"}, - Format: "", - }, - }, - "description": { - SchemaProps: spec.SchemaProps{ - Description: "Description of the parameter", - Type: []string{"string"}, - Format: "", - }, - }, - "reference": { - SchemaProps: spec.SchemaProps{ - Description: "Reference to the parameter in search space", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - } -} - -func schema_apis_controller_experiments_v1beta1_TrialSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialSource represent the source for trial template Only one source can be specified", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "trialSpec": { - SchemaProps: spec.SchemaProps{ - Description: "TrialSpec represents trial template in unstructured format", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap spec represents a reference to ConfigMap", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, - } -} - -func schema_apis_controller_experiments_v1beta1_TrialTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialTemplate describes structure of trial template", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "retain": { - SchemaProps: spec.SchemaProps{ - Description: "Retain indicates that trial resources must be not cleanup", - Type: []string{"boolean"}, - Format: "", - }, - }, - "trialSpec": { - SchemaProps: spec.SchemaProps{ - Description: "TrialSpec represents trial template in unstructured format", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), - }, - }, - "configMap": { - SchemaProps: spec.SchemaProps{ - Description: "ConfigMap spec represents a reference to ConfigMap", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), - }, - }, - "trialParameters": { - SchemaProps: spec.SchemaProps{ - Description: "List of parameters that are used in trial template", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec"), - }, - }, - }, - }, - }, - "primaryPodLabels": { - SchemaProps: spec.SchemaProps{ - Description: "Labels that determines if pod needs to be injected by Katib sidecar container. If PrimaryPodLabels is omitted, metrics collector wraps all Trial's pods.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "primaryContainerName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of training container where actual model training is running", - Type: []string{"string"}, - Format: "", - }, - }, - "successCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - "failureCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_Suggestion(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Suggestion represents the structure of a Suggestion resource.", - 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionCondition describes the state of the Suggestion at a certain point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of Suggestion 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: "", - }, - }, - "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: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - 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"), - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionList contains a list of Suggestion", - 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionSpec is the specification of a Suggestion.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithm": { - SchemaProps: spec.SchemaProps{ - Description: "Algorithm describes HP or NAS algorithm that suggestion is used.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), - }, - }, - "earlyStopping": { - SchemaProps: spec.SchemaProps{ - Description: "EarlyStopping describes early stopping algorithm that suggestion is used.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), - }, - }, - "requests": { - SchemaProps: spec.SchemaProps{ - Description: "Number of suggestions requested.", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "resumePolicy": { - SchemaProps: spec.SchemaProps{ - Description: "ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is Never.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "SuggestionStatus is the current status of a Suggestion.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "algorithmSettings": { - SchemaProps: spec.SchemaProps{ - Description: "AlgorithmSettings defines HP or NAS algorithm settings which suggestion gRPC service returns. These settings overwrites Experiment's settings before the gRPC request. It can be empty if settings haven't been changed.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), - }, - }, - }, - }, - }, - "suggestionCount": { - SchemaProps: spec.SchemaProps{ - Description: "Number of suggestion results", - Type: []string{"integer"}, - Format: "int32", - }, - }, - "suggestions": { - SchemaProps: spec.SchemaProps{ - Description: "Suggestion results", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment"), - }, - }, - }, - }, - }, - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Suggestion was acknowledged by the Suggestion controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "completionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Suggestion was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastReconcileTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents last time when the Suggestion was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "List of observed runtime conditions for this Suggestion.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition"), - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialAssignment is the assignment for one trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "parameterAssignments": { - SchemaProps: spec.SchemaProps{ - Description: "Suggestion results with Trial parameters", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), - }, - }, - }, - }, - }, - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name of the suggestion", - Type: []string{"string"}, - Format: "", - }, - }, - "earlyStoppingRules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules for early stopping techniques Contains rule name, value and comparison type", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), - }, - }, - }, - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Suggestion label metadata to attach to Trial job", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, - } -} - -func schema_apis_controller_trials_v1beta1_Trial(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Represents the structure of a Trial resource.", - 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec"), - }, - }, - "status": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialCondition describes the state of the trial at a certain point.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "Type of trial 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: "", - }, - }, - "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: "", - }, - }, - "lastUpdateTime": { - SchemaProps: spec.SchemaProps{ - Description: "The last time this condition was updated.", - 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"), - }, - }, - }, - Required: []string{"type", "status"}, - }, - }, - Dependencies: []string{ - "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialList contains a list of Trials", - 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial"), - }, - }, - }, - }, - }, - }, - Required: []string{"items"}, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialSpec is the specification of a Trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "objective": { - SchemaProps: spec.SchemaProps{ - Description: "Describes the objective of the experiment.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), - }, - }, - "parameterAssignments": { - SchemaProps: spec.SchemaProps{ - Description: "Key-value pairs for hyperparameters and assignment values.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), - }, - }, - }, - }, - }, - "earlyStoppingRules": { - SchemaProps: spec.SchemaProps{ - Description: "Rules for early stopping techniques. Each rule should be met to early stop Trial.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), - }, - }, - }, - }, - }, - "runSpec": { - SchemaProps: spec.SchemaProps{ - Description: "Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. Kubeflow Training Operator) handle the rest.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), - }, - }, - "retainRun": { - SchemaProps: spec.SchemaProps{ - Description: "Whether to retain the trial run object after completed.", - Type: []string{"boolean"}, - Format: "", - }, - }, - "metricsCollector": { - SchemaProps: spec.SchemaProps{ - Description: "Describes how metrics will be collected", - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), - }, - }, - "primaryPodLabels": { - SchemaProps: spec.SchemaProps{ - Description: "Label that determines if pod needs to be injected by Katib sidecar container", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "primaryContainerName": { - SchemaProps: spec.SchemaProps{ - Description: "Name of training container where actual model training is running", - Type: []string{"string"}, - Format: "", - }, - }, - "successCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - "failureCondition": { - SchemaProps: spec.SchemaProps{ - Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", - Type: []string{"string"}, - Format: "", - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Labels that provide additional metadata for services (e.g. Suggestions tracking)", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, - } -} - -func schema_apis_controller_trials_v1beta1_TrialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "TrialStatus is the current status of a Trial.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "startTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "completionTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "lastReconcileTime": { - SchemaProps: spec.SchemaProps{ - Description: "Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), - }, - }, - "conditions": { - SchemaProps: spec.SchemaProps{ - Description: "List of observed runtime conditions for this Trial.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition"), - }, - }, - }, - }, - }, - "observation": { - SchemaProps: spec.SchemaProps{ - Description: "Results of the Trial - objectives and other metrics values.", - Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), - }, - }, - }, - }, - }, - Dependencies: []string{ - "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, - } -} - -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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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-list-map-keys": []interface{}{ - "uid", - }, - "x-kubernetes-list-type": "map", - "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-list-type": "set", - "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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "atomic", - }, - }, - 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_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"}, - }, - }, - } + return map[string]common.OpenAPIDefinition{} } From a63e300445a77174053c34de3c0adf4971fbba43 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Wed, 11 Dec 2024 07:57:07 +0000 Subject: [PATCH 15/20] fix: fix bugs in recursive dir detection. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-codegen.sh | 5 +- hack/update-openapigen.sh | 14 +- hack/violation_exception_v1beta1.list | 30 + pkg/apis/v1beta1/zz_generated.openapi.go | 2081 +++++++++++++++++++++- 4 files changed, 2124 insertions(+), 6 deletions(-) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 59b4a26dbeb..f80fb984321 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -27,16 +27,15 @@ CODEGEN_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/code-generator) cd "$CURRENT_DIR/.." -echo "${CODEGEN_PKG}" # shellcheck source=/dev/null source "${CODEGEN_PKG}/kube_codegen.sh" -echo "Generating conversion and defaults functions for config.kubeflow.org ..." +echo "Generating deepcopy and defaults for config.kubeflow.org ..." kube::codegen::gen_helpers \ --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ "${KATIB_ROOT}/pkg/apis/config" -echo "Generating clients for config.kubeflow.org ..." +echo "Generating clients for v1beta1" kube::codegen::gen_client \ --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ --output-dir "${KATIB_ROOT}/pkg/client/controller" \ diff --git a/hack/update-openapigen.sh b/hack/update-openapigen.sh index ef1a52383c2..579e0ffbeb4 100755 --- a/hack/update-openapigen.sh +++ b/hack/update-openapigen.sh @@ -31,15 +31,25 @@ OPENAPI_PKG=$(go list -m -mod=readonly -f "{{.Dir}}" k8s.io/kube-openapi) echo ">> Using ${OPENAPI_PKG}" VERSION_LIST=(v1beta1) +SWAGGER_VERSION="0.1" for VERSION in "${VERSION_LIST[@]}"; do - echo "Generating OpenAPI specification for ${VERSION} ..." + SWAGGER_CODEGEN_FILE=${KATIB_ROOT}/pkg/apis/${VERSION}/swagger.json + echo "Generating OpenAPI specification for ${VERSION} ..." + go run "${OPENAPI_PKG}/cmd/openapi-gen" \ --go-header-file "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ --output-pkg "${KATIB_PKG}/pkg/apis/${VERSION}" \ --output-dir "${KATIB_ROOT}/pkg/apis/${VERSION}" \ --output-file "zz_generated.openapi.go" \ --report-filename "${KATIB_ROOT}/hack/violation_exception_${VERSION}.list" \ - "${KATIB_ROOT}/pkg/apis/controller" + "${KATIB_ROOT}/pkg/apis/controller/common/${VERSION}" \ + "${KATIB_ROOT}/pkg/apis/controller/experiments/${VERSION}" \ + "${KATIB_ROOT}/pkg/apis/controller/suggestions/${VERSION}" \ + "${KATIB_ROOT}/pkg/apis/controller/trials/${VERSION}" + + echo "Generating OpenAPI Swagger for ${VERSION} ..." + + go run "${KATIB_ROOT}/hack/swagger/main.go" "${VERSION}-${SWAGGER_VERSION}" "${VERSION}" >"${SWAGGER_CODEGEN_FILE}" done diff --git a/hack/violation_exception_v1beta1.list b/hack/violation_exception_v1beta1.list index e69de29bb2d..1ed6c8e7602 100644 --- a/hack/violation_exception_v1beta1.list +++ b/hack/violation_exception_v1beta1.list @@ -0,0 +1,30 @@ +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,AlgorithmSpec,AlgorithmSettings +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,EarlyStoppingSpec,AlgorithmSettings +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,FilterSpec,MetricsFormat +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,ObjectiveSpec,AdditionalMetricNames +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,ObjectiveSpec,MetricStrategies +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1,Observation,Metrics +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentSpec,Parameters +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,Conditions +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,EarlyStoppedTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,FailedTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,KilledTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,MetricsUnavailableTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,PendingTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,RunningTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,ExperimentStatus,SucceededTrialList +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,FeasibleSpace,List +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,GraphConfig,InputSizes +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,GraphConfig,OutputSizes +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,NasConfig,Operations +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,Operation,Parameters +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,OptimalTrial,ParameterAssignments +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1,TrialTemplate,TrialParameters +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,AlgorithmSettings +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,Conditions +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,SuggestionStatus,Suggestions +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,TrialAssignment,EarlyStoppingRules +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1,TrialAssignment,ParameterAssignments +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialSpec,EarlyStoppingRules +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialSpec,ParameterAssignments +API rule violation: list_type_missing,github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1,TrialStatus,Conditions diff --git a/pkg/apis/v1beta1/zz_generated.openapi.go b/pkg/apis/v1beta1/zz_generated.openapi.go index 56739159a6a..986c37d3ed6 100644 --- a/pkg/apis/v1beta1/zz_generated.openapi.go +++ b/pkg/apis/v1beta1/zz_generated.openapi.go @@ -23,8 +23,2087 @@ package v1beta1 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{} + return map[string]common.OpenAPIDefinition{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting": schema_apis_controller_common_v1beta1_AlgorithmSetting(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec": schema_apis_controller_common_v1beta1_AlgorithmSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec": schema_apis_controller_common_v1beta1_CollectorSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule": schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting": schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec": schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath": schema_apis_controller_common_v1beta1_FileSystemPath(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec": schema_apis_controller_common_v1beta1_FilterSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric": schema_apis_controller_common_v1beta1_Metric(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy": schema_apis_controller_common_v1beta1_MetricStrategy(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec": schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec": schema_apis_controller_common_v1beta1_ObjectiveSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation": schema_apis_controller_common_v1beta1_Observation(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment": schema_apis_controller_common_v1beta1_ParameterAssignment(ref), + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec": schema_apis_controller_common_v1beta1_SourceSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource": schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment": schema_apis_controller_experiments_v1beta1_Experiment(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition": schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentList": schema_apis_controller_experiments_v1beta1_ExperimentList(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec": schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus": schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace": schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig": schema_apis_controller_experiments_v1beta1_GraphConfig(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig": schema_apis_controller_experiments_v1beta1_NasConfig(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation": schema_apis_controller_experiments_v1beta1_Operation(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial": schema_apis_controller_experiments_v1beta1_OptimalTrial(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec": schema_apis_controller_experiments_v1beta1_ParameterSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec": schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialSource": schema_apis_controller_experiments_v1beta1_TrialSource(ref), + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate": schema_apis_controller_experiments_v1beta1_TrialTemplate(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion": schema_apis_controller_suggestions_v1beta1_Suggestion(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition": schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionList": schema_apis_controller_suggestions_v1beta1_SuggestionList(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec": schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus": schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref), + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment": schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial": schema_apis_controller_trials_v1beta1_Trial(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition": schema_apis_controller_trials_v1beta1_TrialCondition(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialList": schema_apis_controller_trials_v1beta1_TrialList(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec": schema_apis_controller_trials_v1beta1_TrialSpec(ref), + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus": schema_apis_controller_trials_v1beta1_TrialStatus(ref), + } +} + +func schema_apis_controller_common_v1beta1_AlgorithmSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AlgorithmSetting represents key-value pair for HP or NAS algorithm settings.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is setting name.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the setting value.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_AlgorithmSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "AlgorithmSpec is the specification for a HP or NAS algorithm.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithmName": { + SchemaProps: spec.SchemaProps{ + Description: "HP or NAS algorithm name.", + Type: []string{"string"}, + Format: "", + }, + }, + "algorithmSettings": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs representing settings for suggestion algorithms.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"}, + } +} + +func schema_apis_controller_common_v1beta1_CollectorSpec(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{ + Type: []string{"string"}, + Format: "", + }, + }, + "customCollector": { + SchemaProps: spec.SchemaProps{ + Description: "When kind is \"customCollector\", this field will be used", + Ref: ref("k8s.io/api/core/v1.Container"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.Container"}, + } +} + +func schema_apis_controller_common_v1beta1_EarlyStoppingRule(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EarlyStoppingRule represents each rule for early stopping.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name contains metric name for the rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value contains metric value for the rule.", + Type: []string{"string"}, + Format: "", + }, + }, + "comparison": { + SchemaProps: spec.SchemaProps{ + Description: "Comparison defines correlation between name and value.", + Type: []string{"string"}, + Format: "", + }, + }, + "startStep": { + SchemaProps: spec.SchemaProps{ + Description: "StartStep defines quantity of intermediate results that should be received before applying the rule. If start step is empty, rule is applied from the first recorded metric.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_EarlyStoppingSetting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EarlyStoppingSetting represents key-value pair for early stopping algorithm settings.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is the setting name.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the setting value.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_EarlyStoppingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "EarlyStoppingSpec is the specification for a early stopping algorithm.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithmName": { + SchemaProps: spec.SchemaProps{ + Description: "Early stopping algorithm name.", + Type: []string{"string"}, + Format: "", + }, + }, + "algorithmSettings": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs representing settings for early stopping algorithm.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSetting"}, + } +} + +func schema_apis_controller_common_v1beta1_FileSystemPath(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "path": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "format": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_FilterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metricsFormat": { + SchemaProps: spec.SchemaProps{ + Description: "When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \": \" or else", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_Metric(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: "", + }, + }, + "min": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "max": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "latest": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_MetricStrategy(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: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_MetricsCollectorSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "source": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"), + }, + }, + "collector": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.CollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.SourceSpec"}, + } +} + +func schema_apis_controller_common_v1beta1_ObjectiveSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectiveSpec represents Experiment's objective specification.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type for Experiment optimization.", + Type: []string{"string"}, + Format: "", + }, + }, + "goal": { + SchemaProps: spec.SchemaProps{ + Description: "Goal is the Experiment's objective goal that should be reached. In case of empty goal, Experiment is running until MaxTrialCount = TrialsSucceeded.", + Type: []string{"number"}, + Format: "double", + }, + }, + "objectiveMetricName": { + SchemaProps: spec.SchemaProps{ + Description: "ObjectiveMetricName represents primary Experiment's metric to optimize.", + Type: []string{"string"}, + Format: "", + }, + }, + "additionalMetricNames": { + SchemaProps: spec.SchemaProps{ + Description: "AdditionalMetricNames represents metrics that should be collected from Trials. This can be empty if we only care about the objective metric. Note: If we adopt a push instead of pull mechanism, this can be omitted completely.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "metricStrategies": { + SchemaProps: spec.SchemaProps{ + Description: "MetricStrategies defines various rules (min, max or latest) to extract metrics values. This field is allowed to missing, experiment defaulter (webhook) will fill it.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricStrategy"}, + } +} + +func schema_apis_controller_common_v1beta1_Observation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "metrics": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs for metric names and values", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Metric"}, + } +} + +func schema_apis_controller_common_v1beta1_ParameterAssignment(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: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_common_v1beta1_SourceSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "httpGet": { + SchemaProps: spec.SchemaProps{ + Description: "Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format", + Ref: ref("k8s.io/api/core/v1.HTTPGetAction"), + }, + }, + "fileSystemPath": { + SchemaProps: spec.SchemaProps{ + Description: "During training model, metrics may be persisted into local file in source code, such as tfEvent use case", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath"), + }, + }, + "filter": { + SchemaProps: spec.SchemaProps{ + Description: "Default metric output format is {\"metric\": \"\", \"value\": , \"epoch\": , \"step\": }, but if the output doesn't follow default format, please extend it here", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FileSystemPath", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.FilterSpec", "k8s.io/api/core/v1.HTTPGetAction"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ConfigMapSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ConfigMapSource references the config map where trial template is located", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "configMapName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of config map where trial template is located", + Type: []string{"string"}, + Format: "", + }, + }, + "configMapNamespace": { + SchemaProps: spec.SchemaProps{ + Description: "Namespace of config map where trial template is located", + Type: []string{"string"}, + Format: "", + }, + }, + "templatePath": { + SchemaProps: spec.SchemaProps{ + Description: "Path in config map where trial template is located", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_Experiment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Structure of the Experiment custom resource.", + 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentCondition describes the state of the experiment at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of experiment 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: "", + }, + }, + "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: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + 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"), + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentList contains a list of Experiments", + 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("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Experiment", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentSpec is the specification of an Experiment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "parameters": { + SchemaProps: spec.SchemaProps{ + Description: "List of hyperparameter configurations.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), + }, + }, + }, + }, + }, + "objective": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the objective of the experiment.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), + }, + }, + "algorithm": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the suggestion algorithm.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), + }, + }, + "earlyStopping": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the early stopping algorithm.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), + }, + }, + "trialTemplate": { + SchemaProps: spec.SchemaProps{ + Description: "Template for each run of the trial.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"), + }, + }, + "parallelTrialCount": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials can be processed in parallel. Defaults to 3", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxTrialCount": { + SchemaProps: spec.SchemaProps{ + Description: "Max completed trials to mark experiment as succeeded", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "maxFailedTrialCount": { + SchemaProps: spec.SchemaProps{ + Description: "Max failed trials to mark experiment as failed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "metricsCollectorSpec": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the specification of the metrics collector", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), + }, + }, + "nasConfig": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig"), + }, + }, + "resumePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "Describes resuming policy which usually take effect after experiment terminated. Default value is Never.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.NasConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialTemplate"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ExperimentStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ExperimentStatus is the current status of an Experiment.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastReconcileTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "List of observed runtime conditions for this Experiment.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition"), + }, + }, + }, + }, + }, + "currentOptimalTrial": { + SchemaProps: spec.SchemaProps{ + Description: "Current optimal trial parameters and observations.", + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial"), + }, + }, + "runningTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which are running.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "pendingTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which are pending.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "failedTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have already failed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "succeededTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have already succeeded.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "killedTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have been killed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "earlyStoppedTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have been early stopped.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "metricsUnavailableTrialList": { + SchemaProps: spec.SchemaProps{ + Description: "List of trial names which have been metrics unavailable", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "trials": { + SchemaProps: spec.SchemaProps{ + Description: "Trials is the total number of trials owned by the experiment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsSucceeded": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials have succeeded.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsFailed": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials have failed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsKilled": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials have been killed.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsPending": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently pending.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsRunning": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently running.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialsEarlyStopped": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently early stopped.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "trialMetricsUnavailable": { + SchemaProps: spec.SchemaProps{ + Description: "How many trials are currently metrics unavailable.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ExperimentCondition", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.OptimalTrial", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_experiments_v1beta1_FeasibleSpace(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "max": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "min": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "list": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "step": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "distribution": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_GraphConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GraphConfig contains a config of DAG", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "numLayers": { + SchemaProps: spec.SchemaProps{ + Type: []string{"integer"}, + Format: "int32", + }, + }, + "inputSizes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + "outputSizes": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_NasConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "NasConfig contains config for NAS job", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "graphConfig": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig"), + }, + }, + "operations": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.GraphConfig", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.Operation"}, + } +} + +func schema_apis_controller_experiments_v1beta1_Operation(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Operation contains type of operation in DAG", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "operationType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "parameters": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ParameterSpec"}, + } +} + +func schema_apis_controller_experiments_v1beta1_OptimalTrial(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "OptimalTrial is the metrics and assignments of the best trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "bestTrialName": { + SchemaProps: spec.SchemaProps{ + Description: "BestTrialName is the name of the best trial.", + Type: []string{"string"}, + Format: "", + }, + }, + "parameterAssignments": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs for hyperparameters and assignment values.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), + }, + }, + }, + }, + }, + "observation": { + SchemaProps: spec.SchemaProps{ + Description: "Observation for this trial", + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, + } +} + +func schema_apis_controller_experiments_v1beta1_ParameterSpec(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: "", + }, + }, + "parameterType": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "feasibleSpace": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.FeasibleSpace"}, + } +} + +func schema_apis_controller_experiments_v1beta1_TrialParameterSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialParameterSpec describes parameters that must be replaced in trial template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the parameter that must be replaced in trial template", + Type: []string{"string"}, + Format: "", + }, + }, + "description": { + SchemaProps: spec.SchemaProps{ + Description: "Description of the parameter", + Type: []string{"string"}, + Format: "", + }, + }, + "reference": { + SchemaProps: spec.SchemaProps{ + Description: "Reference to the parameter in search space", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_apis_controller_experiments_v1beta1_TrialSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialSource represent the source for trial template Only one source can be specified", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "trialSpec": { + SchemaProps: spec.SchemaProps{ + Description: "TrialSpec represents trial template in unstructured format", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap spec represents a reference to ConfigMap", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_apis_controller_experiments_v1beta1_TrialTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialTemplate describes structure of trial template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "retain": { + SchemaProps: spec.SchemaProps{ + Description: "Retain indicates that trial resources must be not cleanup", + Type: []string{"boolean"}, + Format: "", + }, + }, + "trialSpec": { + SchemaProps: spec.SchemaProps{ + Description: "TrialSpec represents trial template in unstructured format", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + "configMap": { + SchemaProps: spec.SchemaProps{ + Description: "ConfigMap spec represents a reference to ConfigMap", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource"), + }, + }, + "trialParameters": { + SchemaProps: spec.SchemaProps{ + Description: "List of parameters that are used in trial template", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec"), + }, + }, + }, + }, + }, + "primaryPodLabels": { + SchemaProps: spec.SchemaProps{ + Description: "Labels that determines if pod needs to be injected by Katib sidecar container. If PrimaryPodLabels is omitted, metrics collector wraps all Trial's pods.", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "primaryContainerName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of training container where actual model training is running", + Type: []string{"string"}, + Format: "", + }, + }, + "successCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + "failureCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.ConfigMapSource", "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1.TrialParameterSpec", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_Suggestion(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Suggestion represents the structure of a Suggestion resource.", + 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionSpec", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionCondition describes the state of the Suggestion at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of Suggestion 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: "", + }, + }, + "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: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + 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"), + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionList contains a list of Suggestion", + 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("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.Suggestion", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionSpec is the specification of a Suggestion.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithm": { + SchemaProps: spec.SchemaProps{ + Description: "Algorithm describes HP or NAS algorithm that suggestion is used.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec"), + }, + }, + "earlyStopping": { + SchemaProps: spec.SchemaProps{ + Description: "EarlyStopping describes early stopping algorithm that suggestion is used.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"), + }, + }, + "requests": { + SchemaProps: spec.SchemaProps{ + Description: "Number of suggestions requested.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "resumePolicy": { + SchemaProps: spec.SchemaProps{ + Description: "ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is Never.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingSpec"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_SuggestionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "SuggestionStatus is the current status of a Suggestion.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "algorithmSettings": { + SchemaProps: spec.SchemaProps{ + Description: "AlgorithmSettings defines HP or NAS algorithm settings which suggestion gRPC service returns. These settings overwrites Experiment's settings before the gRPC request. It can be empty if settings haven't been changed.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting"), + }, + }, + }, + }, + }, + "suggestionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Number of suggestion results", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "suggestions": { + SchemaProps: spec.SchemaProps{ + Description: "Suggestion results", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment"), + }, + }, + }, + }, + }, + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Suggestion was acknowledged by the Suggestion controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Suggestion was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastReconcileTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents last time when the Suggestion was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "List of observed runtime conditions for this Suggestion.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.AlgorithmSetting", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.SuggestionCondition", "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1.TrialAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_suggestions_v1beta1_TrialAssignment(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialAssignment is the assignment for one trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "parameterAssignments": { + SchemaProps: spec.SchemaProps{ + Description: "Suggestion results with Trial parameters", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), + }, + }, + }, + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the suggestion", + Type: []string{"string"}, + Format: "", + }, + }, + "earlyStoppingRules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules for early stopping techniques Contains rule name, value and comparison type", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), + }, + }, + }, + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Suggestion label metadata to attach to Trial job", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"}, + } +} + +func schema_apis_controller_trials_v1beta1_Trial(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Represents the structure of a Trial resource.", + 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialSpec", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialCondition describes the state of the trial at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of trial 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: "", + }, + }, + "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: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + 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"), + }, + }, + }, + Required: []string{"type", "status"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialList contains a list of Trials", + 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("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.Trial", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialSpec is the specification of a Trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "objective": { + SchemaProps: spec.SchemaProps{ + Description: "Describes the objective of the experiment.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec"), + }, + }, + "parameterAssignments": { + SchemaProps: spec.SchemaProps{ + Description: "Key-value pairs for hyperparameters and assignment values.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment"), + }, + }, + }, + }, + }, + "earlyStoppingRules": { + SchemaProps: spec.SchemaProps{ + Description: "Rules for early stopping techniques. Each rule should be met to early stop Trial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule"), + }, + }, + }, + }, + }, + "runSpec": { + SchemaProps: spec.SchemaProps{ + Description: "Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. Kubeflow Training Operator) handle the rest.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"), + }, + }, + "retainRun": { + SchemaProps: spec.SchemaProps{ + Description: "Whether to retain the trial run object after completed.", + Type: []string{"boolean"}, + Format: "", + }, + }, + "metricsCollector": { + SchemaProps: spec.SchemaProps{ + Description: "Describes how metrics will be collected", + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec"), + }, + }, + "primaryPodLabels": { + SchemaProps: spec.SchemaProps{ + Description: "Label that determines if pod needs to be injected by Katib sidecar container", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "primaryContainerName": { + SchemaProps: spec.SchemaProps{ + Description: "Name of training container where actual model training is running", + Type: []string{"string"}, + Format: "", + }, + }, + "successCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + "failureCondition": { + SchemaProps: spec.SchemaProps{ + Description: "Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")#", + Type: []string{"string"}, + Format: "", + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "Labels that provide additional metadata for services (e.g. Suggestions tracking)", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.EarlyStoppingRule", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.MetricsCollectorSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ObjectiveSpec", "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.ParameterAssignment", "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.Unstructured"}, + } +} + +func schema_apis_controller_trials_v1beta1_TrialStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrialStatus is the current status of a Trial.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "startTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "completionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastReconcileTime": { + SchemaProps: spec.SchemaProps{ + Description: "Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "List of observed runtime conditions for this Trial.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition"), + }, + }, + }, + }, + }, + "observation": { + SchemaProps: spec.SchemaProps{ + Description: "Results of the Trial - objectives and other metrics values.", + Ref: ref("github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1.Observation", "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1.TrialCondition", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } } From aa9c300466bd01017705a95d143b6184f6acfa7c Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Wed, 11 Dec 2024 08:11:50 +0000 Subject: [PATCH 16/20] fix: remove a blank line. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-openapigen.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/hack/update-openapigen.sh b/hack/update-openapigen.sh index 579e0ffbeb4..1646b725fe5 100755 --- a/hack/update-openapigen.sh +++ b/hack/update-openapigen.sh @@ -50,6 +50,5 @@ for VERSION in "${VERSION_LIST[@]}"; do "${KATIB_ROOT}/pkg/apis/controller/trials/${VERSION}" echo "Generating OpenAPI Swagger for ${VERSION} ..." - go run "${KATIB_ROOT}/hack/swagger/main.go" "${VERSION}-${SWAGGER_VERSION}" "${VERSION}" >"${SWAGGER_CODEGEN_FILE}" done From 000729d9d0287578bb34d3f6dff396460bf9a569 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Wed, 11 Dec 2024 10:56:53 +0000 Subject: [PATCH 17/20] fix: remove klog/v2 Signed-off-by: Electronic-Waste <2690692950@qq.com> --- cmd/db-manager/v1beta1/main.go | 2 +- cmd/metricscollector/v1beta1/file-metricscollector/main.go | 2 +- cmd/suggestion/goptuna/v1beta1/main.go | 2 +- go.mod | 3 ++- go.sum | 7 +++++-- hack/swagger/main.go | 2 +- pkg/db/v1beta1/common/connection.go | 2 +- pkg/db/v1beta1/db.go | 2 +- pkg/db/v1beta1/mysql/init.go | 2 +- pkg/db/v1beta1/mysql/mysql.go | 2 +- pkg/db/v1beta1/postgres/init.go | 2 +- pkg/db/v1beta1/postgres/postgres.go | 2 +- pkg/metricscollector/v1beta1/common/pns.go | 2 +- .../v1beta1/file-metricscollector/file-metricscollector.go | 2 +- pkg/suggestion/v1beta1/goptuna/service.go | 2 +- 15 files changed, 20 insertions(+), 16 deletions(-) diff --git a/cmd/db-manager/v1beta1/main.go b/cmd/db-manager/v1beta1/main.go index d219ff8bd06..17f949f0690 100644 --- a/cmd/db-manager/v1beta1/main.go +++ b/cmd/db-manager/v1beta1/main.go @@ -28,7 +28,7 @@ import ( api_pb "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" db "github.com/kubeflow/katib/pkg/db/v1beta1" "github.com/kubeflow/katib/pkg/db/v1beta1/common" - "k8s.io/klog/v2" + "k8s.io/klog" "google.golang.org/grpc" "google.golang.org/grpc/reflection" diff --git a/cmd/metricscollector/v1beta1/file-metricscollector/main.go b/cmd/metricscollector/v1beta1/file-metricscollector/main.go index 07898ec781f..c91a18060bc 100644 --- a/cmd/metricscollector/v1beta1/file-metricscollector/main.go +++ b/cmd/metricscollector/v1beta1/file-metricscollector/main.go @@ -53,7 +53,7 @@ import ( psutil "github.com/shirou/gopsutil/v3/process" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "k8s.io/klog/v2" + "k8s.io/klog" commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" api "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" diff --git a/cmd/suggestion/goptuna/v1beta1/main.go b/cmd/suggestion/goptuna/v1beta1/main.go index b76156660cf..719405d54cc 100644 --- a/cmd/suggestion/goptuna/v1beta1/main.go +++ b/cmd/suggestion/goptuna/v1beta1/main.go @@ -24,7 +24,7 @@ import ( api_v1_beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" suggestion "github.com/kubeflow/katib/pkg/suggestion/v1beta1/goptuna" "google.golang.org/grpc" - "k8s.io/klog/v2" + "k8s.io/klog" ) const ( diff --git a/go.mod b/go.mod index 3ee6131f3d7..5d4d26afe8c 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( k8s.io/apimachinery v0.30.7 k8s.io/client-go v0.30.7 k8s.io/code-generator v0.30.7 - k8s.io/klog/v2 v2.130.1 + k8s.io/klog v1.0.0 k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f sigs.k8s.io/controller-runtime v0.18.5 sigs.k8s.io/structured-merge-diff/v4 v4.4.1 @@ -146,6 +146,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.30.3 // indirect k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect + k8s.io/klog/v2 v2.120.1 // indirect k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect ) diff --git a/go.sum b/go.sum index fa553f56afc..50d36804444 100644 --- a/go.sum +++ b/go.sum @@ -213,6 +213,7 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -1239,8 +1240,10 @@ k8s.io/code-generator v0.30.7 h1:Vw8991AoEjwW3qjkJhsTJosrlCN+6+VA3KR7wU28Sc0= k8s.io/code-generator v0.30.7/go.mod h1:kMe4cE9rGqC9SoXwHqV7VaD4F8G7UL0BQF6NbRqxOdo= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-aggregator v0.30.3 h1:hy5zfQ7p6BuJgc/XtGp3GBh2MPfOj6b1n3raKKMHOQE= k8s.io/kube-aggregator v0.30.3/go.mod h1:2SP0IckvQoOwwZN8lmtWUnTZTgIpwOWvidWtxyqLwuk= k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f h1:0LQagt0gDpKqvIkAMPaRGcXawNMouPECM1+F9BVxEaM= diff --git a/hack/swagger/main.go b/hack/swagger/main.go index 5e69bc39051..eda8a9689bb 100644 --- a/hack/swagger/main.go +++ b/hack/swagger/main.go @@ -23,7 +23,7 @@ import ( "strings" "github.com/kubeflow/katib/pkg/apis/v1beta1" - "k8s.io/klog/v2" + "k8s.io/klog" "k8s.io/kube-openapi/pkg/common" "k8s.io/kube-openapi/pkg/validation/spec" ) diff --git a/pkg/db/v1beta1/common/connection.go b/pkg/db/v1beta1/common/connection.go index 5709d0594a2..2f65e19ce96 100644 --- a/pkg/db/v1beta1/common/connection.go +++ b/pkg/db/v1beta1/common/connection.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "k8s.io/klog/v2" + "k8s.io/klog" ) func OpenSQLConn(driverName string, dataSourceName string, interval time.Duration, diff --git a/pkg/db/v1beta1/db.go b/pkg/db/v1beta1/db.go index 19a16aad78e..d5834711023 100644 --- a/pkg/db/v1beta1/db.go +++ b/pkg/db/v1beta1/db.go @@ -23,7 +23,7 @@ import ( "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/db/v1beta1/mysql" "github.com/kubeflow/katib/pkg/db/v1beta1/postgres" - "k8s.io/klog/v2" + "k8s.io/klog" ) func NewKatibDBInterface(dbName string, connectTimeout time.Duration) (common.KatibDBInterface, error) { diff --git a/pkg/db/v1beta1/mysql/init.go b/pkg/db/v1beta1/mysql/init.go index 48587d2d449..fe2a2987f0b 100644 --- a/pkg/db/v1beta1/mysql/init.go +++ b/pkg/db/v1beta1/mysql/init.go @@ -19,7 +19,7 @@ package mysql import ( "fmt" - "k8s.io/klog/v2" + "k8s.io/klog" "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/util/v1beta1/env" diff --git a/pkg/db/v1beta1/mysql/mysql.go b/pkg/db/v1beta1/mysql/mysql.go index 4c25a188bed..b17aee8705f 100644 --- a/pkg/db/v1beta1/mysql/mysql.go +++ b/pkg/db/v1beta1/mysql/mysql.go @@ -23,7 +23,7 @@ import ( "time" _ "github.com/go-sql-driver/mysql" - "k8s.io/klog/v2" + "k8s.io/klog" v1beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" "github.com/kubeflow/katib/pkg/db/v1beta1/common" diff --git a/pkg/db/v1beta1/postgres/init.go b/pkg/db/v1beta1/postgres/init.go index 6318d0eb983..71c573128c2 100644 --- a/pkg/db/v1beta1/postgres/init.go +++ b/pkg/db/v1beta1/postgres/init.go @@ -19,7 +19,7 @@ package postgres import ( "fmt" - "k8s.io/klog/v2" + "k8s.io/klog" "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/util/v1beta1/env" diff --git a/pkg/db/v1beta1/postgres/postgres.go b/pkg/db/v1beta1/postgres/postgres.go index 808af5ad93c..af60d0b0efc 100644 --- a/pkg/db/v1beta1/postgres/postgres.go +++ b/pkg/db/v1beta1/postgres/postgres.go @@ -27,7 +27,7 @@ import ( v1beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" "github.com/kubeflow/katib/pkg/db/v1beta1/common" "github.com/kubeflow/katib/pkg/util/v1beta1/env" - "k8s.io/klog/v2" + "k8s.io/klog" ) const dbDriver = "postgres" diff --git a/pkg/metricscollector/v1beta1/common/pns.go b/pkg/metricscollector/v1beta1/common/pns.go index 08a657d6235..66a5a3f0bb5 100644 --- a/pkg/metricscollector/v1beta1/common/pns.go +++ b/pkg/metricscollector/v1beta1/common/pns.go @@ -25,7 +25,7 @@ import ( "time" psutil "github.com/shirou/gopsutil/v3/process" - "k8s.io/klog/v2" + "k8s.io/klog" ) // WaitPidsOpts is the input options for metrics collector diff --git a/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go b/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go index a9ddc9ba2cd..27b4520c4cb 100644 --- a/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go +++ b/pkg/metricscollector/v1beta1/file-metricscollector/file-metricscollector.go @@ -27,7 +27,7 @@ import ( "strings" "time" - "k8s.io/klog/v2" + "k8s.io/klog" commonv1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" v1beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" diff --git a/pkg/suggestion/v1beta1/goptuna/service.go b/pkg/suggestion/v1beta1/goptuna/service.go index 10cea4b3814..f9f17486b6f 100644 --- a/pkg/suggestion/v1beta1/goptuna/service.go +++ b/pkg/suggestion/v1beta1/goptuna/service.go @@ -24,7 +24,7 @@ import ( api_v1_beta1 "github.com/kubeflow/katib/pkg/apis/manager/v1beta1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "k8s.io/klog/v2" + "k8s.io/klog" ) const ( From 251c6f944c048b47c19743cda58d91d96d08cd07 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Thu, 9 Jan 2025 05:52:36 +0000 Subject: [PATCH 18/20] chore(codegen): add three dots in the comment. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/update-codegen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index f80fb984321..de1078337a4 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -35,7 +35,7 @@ kube::codegen::gen_helpers \ --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ "${KATIB_ROOT}/pkg/apis/config" -echo "Generating clients for v1beta1" +echo "Generating clients for v1beta1 ..." kube::codegen::gen_client \ --boilerplate "${KATIB_ROOT}/hack/boilerplate/boilerplate.go.txt" \ --output-dir "${KATIB_ROOT}/pkg/client/controller" \ From 0de551daeb9db9050f778889e1327b10e5ca985b Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Thu, 9 Jan 2025 06:11:41 +0000 Subject: [PATCH 19/20] fix(codegen): fix package dependency on k8s.io/code-generator. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- hack/tools.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hack/tools.go b/hack/tools.go index 4accf08943f..b821429c378 100644 --- a/hack/tools.go +++ b/hack/tools.go @@ -21,10 +21,6 @@ limitations under the License. package test import ( - _ "k8s.io/code-generator/cmd/client-gen" - _ "k8s.io/code-generator/cmd/deepcopy-gen" - _ "k8s.io/code-generator/cmd/defaulter-gen" - _ "k8s.io/code-generator/cmd/informer-gen" - _ "k8s.io/code-generator/cmd/lister-gen" + _ "k8s.io/code-generator" _ "k8s.io/kube-openapi/cmd/openapi-gen" ) From 01e41d4cd117c23d9604e36f52493f8b6c9caa70 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Fri, 10 Jan 2025 01:44:33 +0000 Subject: [PATCH 20/20] chore(Makefile): add go-mod-download. Signed-off-by: Electronic-Waste <2690692950@qq.com> --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 172116d525b..3d21c4ca4e0 100755 --- a/Makefile +++ b/Makefile @@ -79,6 +79,10 @@ endif sync-go-mod: go mod tidy -go $(GO_VERSION) +.PHONY: go-mod-download +go-mod-download: + go mod download + CONTROLLER_GEN = $(shell pwd)/bin/controller-gen .PHONY: controller-gen controller-gen: @@ -90,7 +94,7 @@ controller-gen: # 3. Generate Python SDK for Katib (hack/gen-python-sdk/gen-sdk.sh) # 4. Generate gRPC manager APIs (pkg/apis/manager/v1beta1/build.sh and pkg/apis/manager/health/build.sh) # 5. Generate Go mock codes -generate: controller-gen +generate: go-mod-download controller-gen ifndef HAS_MOCKGEN go install go.uber.org/mock/mockgen@$(MOCKGEN_VERSION) $(info "mockgen has been installed")