From 85b9c021152f65b1448c0531a25970a1adeaba1e Mon Sep 17 00:00:00 2001 From: Yuki Iwai Date: Mon, 31 Jul 2023 18:00:09 +0900 Subject: [PATCH] Drop Kubernetes v1.24 and support Kubernetes v1.27 Signed-off-by: Yuki Iwai --- .github/workflows/e2e-test-darts-cifar10.yaml | 2 +- .github/workflows/e2e-test-enas-cifar10.yaml | 2 +- .github/workflows/e2e-test-mxnet-mnist.yaml | 2 +- .github/workflows/e2e-test-pytorch-mnist.yaml | 2 +- .github/workflows/e2e-test-simple-pbt.yaml | 2 +- .../e2e-test-tf-mnist-with-summaries.yaml | 2 +- .../e2e-test-ui-random-search-postgres.yaml | 2 +- .github/workflows/test-go.yaml | 2 +- .gitignore | 3 + Makefile | 12 +- README.md | 4 +- examples/v1beta1/kind-cluster/README.md | 2 +- examples/v1beta1/kind-cluster/deploy.sh | 4 +- go.mod | 72 +++--- go.sum | 118 ++++++--- .../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/configmapsource.go | 57 +++++ .../experiments/v1beta1/experiment.go | 219 ++++++++++++++++ .../v1beta1/experimentcondition.go | 90 +++++++ .../experiments/v1beta1/experimentspec.go | 139 +++++++++++ .../experiments/v1beta1/experimentstatus.go | 233 ++++++++++++++++++ .../experiments/v1beta1/feasiblespace.go | 68 +++++ .../experiments/v1beta1/graphconfig.go | 61 +++++ .../experiments/v1beta1/nasconfig.go | 53 ++++ .../experiments/v1beta1/operation.go | 53 ++++ .../experiments/v1beta1/optimaltrial.go | 66 +++++ .../experiments/v1beta1/parameterspec.go | 61 +++++ .../experiments/v1beta1/trialparameterspec.go | 57 +++++ .../experiments/v1beta1/trialsource.go | 52 ++++ .../experiments/v1beta1/trialtemplate.go | 116 +++++++++ .../applyconfiguration/internal/internal.go | 62 +++++ .../suggestions/v1beta1/suggestion.go | 219 ++++++++++++++++ .../v1beta1/suggestioncondition.go | 90 +++++++ .../suggestions/v1beta1/suggestionspec.go | 71 ++++++ .../suggestions/v1beta1/suggestionstatus.go | 113 +++++++++ .../suggestions/v1beta1/trialassignment.go | 86 +++++++ .../trials/v1beta1/trial.go | 219 ++++++++++++++++ .../trials/v1beta1/trialcondition.go | 90 +++++++ .../trials/v1beta1/trialspec.go | 156 ++++++++++++ .../trials/v1beta1/trialstatus.go | 85 +++++++ .../controller/applyconfiguration/utils.go | 123 +++++++++ .../typed/experiments/v1beta1/experiment.go | 61 +++++ .../v1beta1/fake/fake_experiment.go | 53 +++- .../v1beta1/fake/fake_suggestion.go | 53 +++- .../typed/suggestions/v1beta1/suggestion.go | 61 +++++ .../typed/trials/v1beta1/fake/fake_trial.go | 53 +++- .../versioned/typed/trials/v1beta1/trial.go | 61 +++++ .../experiment/experiment_controller.go | 22 +- .../suggestion/suggestion_controller.go | 24 +- .../trial/trial_controller.go | 12 +- .../trial/trial_controller_suite_test.go | 1 + pkg/webhook/v1beta1/webhook.go | 5 +- 66 files changed, 3969 insertions(+), 139 deletions(-) create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/algorithmspec.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/collectorspec.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingrule.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingsetting.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingspec.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/filesystempath.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/filterspec.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/metric.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/metricscollectorspec.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/metricstrategy.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/objectivespec.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/observation.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/parameterassignment.go create mode 100644 pkg/client/controller/applyconfiguration/common/v1beta1/sourcespec.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/configmapsource.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/experiment.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentcondition.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentstatus.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/feasiblespace.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/graphconfig.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/nasconfig.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/operation.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/parameterspec.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/trialparameterspec.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/trialsource.go create mode 100644 pkg/client/controller/applyconfiguration/experiments/v1beta1/trialtemplate.go create mode 100644 pkg/client/controller/applyconfiguration/internal/internal.go create mode 100644 pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestion.go create mode 100644 pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestioncondition.go create mode 100644 pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go create mode 100644 pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go create mode 100644 pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go create mode 100644 pkg/client/controller/applyconfiguration/trials/v1beta1/trial.go create mode 100644 pkg/client/controller/applyconfiguration/trials/v1beta1/trialcondition.go create mode 100644 pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go create mode 100644 pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go create mode 100644 pkg/client/controller/applyconfiguration/utils.go diff --git a/.github/workflows/e2e-test-darts-cifar10.yaml b/.github/workflows/e2e-test-darts-cifar10.yaml index a2a39485547..73e4b976e62 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.24.16", "v1.25.12", "v1.26.6"] + kubernetes-version: ["v1.25.12", "v1.26.6", "v1.27.3"] # Comma Delimited experiments: ["darts-cpu"] diff --git a/.github/workflows/e2e-test-enas-cifar10.yaml b/.github/workflows/e2e-test-enas-cifar10.yaml index 07ce5b76b73..0e95531b48f 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.24.16", "v1.25.12", "v1.26.6"] + kubernetes-version: ["v1.25.12", "v1.26.6", "v1.27.3"] # Comma Delimited experiments: ["enas-cpu"] diff --git a/.github/workflows/e2e-test-mxnet-mnist.yaml b/.github/workflows/e2e-test-mxnet-mnist.yaml index d79d00c00ff..fadecbca4fc 100644 --- a/.github/workflows/e2e-test-mxnet-mnist.yaml +++ b/.github/workflows/e2e-test-mxnet-mnist.yaml @@ -33,7 +33,7 @@ jobs: strategy: fail-fast: false matrix: - kubernetes-version: ["v1.24.16", "v1.25.12", "v1.26.6"] + kubernetes-version: ["v1.25.12", "v1.26.6", "v1.27.3"] # Comma Delimited experiments: # suggestion-hyperopt diff --git a/.github/workflows/e2e-test-pytorch-mnist.yaml b/.github/workflows/e2e-test-pytorch-mnist.yaml index ea8a15e4139..30c02a12d2d 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.24.16", "v1.25.12", "v1.26.6"] + kubernetes-version: ["v1.25.12", "v1.26.6", "v1.27.3"] # Comma Delimited experiments: - "file-metrics-collector,pytorchjob-mnist" diff --git a/.github/workflows/e2e-test-simple-pbt.yaml b/.github/workflows/e2e-test-simple-pbt.yaml index 30526852bfc..79be92ca73f 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.24.16", "v1.25.12", "v1.26.6"] + kubernetes-version: ["v1.25.12", "v1.26.6", "v1.27.3"] # 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 5c71a876bd9..b6b0752af16 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.24.16", "v1.25.12", "v1.26.6"] + kubernetes-version: ["v1.25.12", "v1.26.6", "v1.27.3"] # Comma Delimited experiments: ["tfjob-mnist-with-summaries"] diff --git a/.github/workflows/e2e-test-ui-random-search-postgres.yaml b/.github/workflows/e2e-test-ui-random-search-postgres.yaml index d2c6e71b6d6..a85657d376a 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.24.16", "v1.25.12", "v1.26.6"] + kubernetes-version: ["v1.25.12", "v1.26.6", "v1.27.3"] diff --git a/.github/workflows/test-go.yaml b/.github/workflows/test-go.yaml index d38479fdbf1..04a403ca334 100644 --- a/.github/workflows/test-go.yaml +++ b/.github/workflows/test-go.yaml @@ -64,4 +64,4 @@ jobs: fail-fast: false matrix: # Detail: `setup-envtest list --arch amd64` - kubernetes-version: ["1.24.2", "1.25.0", "1.26.1"] + kubernetes-version: ["1.25.0", "1.26.1", "1.27.1"] diff --git a/.gitignore b/.gitignore index 3e41b2b726a..bc554ee03a4 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,9 @@ pkg/metricscollector/v1beta1/file-metricscollector/testdata ## Output of the go coverage tool, specifically when used with LiteIDE *.out +# Dependency CRDs for the suite test +dep-crds + # VS Code ignore files .vscode/ diff --git a/Makefile b/Makefile index 5c636007192..42a47f9fc47 100755 --- a/Makefile +++ b/Makefile @@ -7,7 +7,8 @@ HAS_MOCKGEN := $(shell command -v mockgen;) COMMIT := v1beta1-$(shell git rev-parse --short=7 HEAD) KATIB_REGISTRY := docker.io/kubeflowkatib CPU_ARCH ?= amd64 -ENVTEST_K8S_VERSION ?= 1.26 +ENVTEST_K8S_VERSION ?= 1.27 +TRAINING_OPERATOR_VERSION ?= v1.6.0 MOCKGEN_VERSION ?= $(shell grep 'github.com/golang/mock' go.mod | cut -d ' ' -f 2) GO_VERSION=$(shell grep '^go' go.mod | cut -d ' ' -f 2) @@ -23,7 +24,7 @@ test: envtest envtest: ifndef HAS_SETUP_ENVTEST - go install sigs.k8s.io/controller-runtime/tools/setup-envtest@2c3a6fa2996c026b284c7fe2b055274cd9a556bc #v0.14.6 + go install sigs.k8s.io/controller-runtime/tools/setup-envtest@935faeba70039b5403616e73f109f4b6b1115b9f #v0.15.0 $(info "setup-envtest has been installed") endif $(info "setup-envtest has already installed") @@ -170,3 +171,10 @@ pytest: prepare-pytest prepare-pytest-testdata PYTHONPATH=$(PYTHONPATH) pytest ./test/unit/v1beta1/suggestion PYTHONPATH=$(PYTHONPATH) pytest ./test/unit/v1beta1/earlystopping PYTHONPATH=$(PYTHONPATH) pytest ./test/unit/v1beta1/metricscollector + +.PHONY: training-operator-crd +training-operator-crd: + GOPATH=/tmp go install github.com/kubeflow/training-operator/cmd/training-operator.v1@$(TRAINING_OPERATOR_VERSION) + mkdir -p $(shell pwd)/dep-crds/training-operator/ + cp -f /tmp/pkg/mod/github.com/kubeflow/training-operator@$(TRAINING_OPERATOR_VERSION)/manifests/base/crds/* $(shell pwd)/dep-crds/training-operator/ + rm -rf $(shell pwd)/dep-crds/training-operator/kustomization.yaml diff --git a/README.md b/README.md index 4c1b96d76d5..270c8ad2afc 100644 --- a/README.md +++ b/README.md @@ -154,8 +154,8 @@ Follow the next steps to install Katib standalone. This is the minimal requirements to install Katib: -- Kubernetes >= 1.24 -- `kubectl` >= 1.24 +- Kubernetes >= 1.25 +- `kubectl` >= 1.25 ## Latest Version diff --git a/examples/v1beta1/kind-cluster/README.md b/examples/v1beta1/kind-cluster/README.md index ff7dd512326..a391e64f26f 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.24 +- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) >= 1.25 ## Installation diff --git a/examples/v1beta1/kind-cluster/deploy.sh b/examples/v1beta1/kind-cluster/deploy.sh index be673d59125..032f0a26d0f 100755 --- a/examples/v1beta1/kind-cluster/deploy.sh +++ b/examples/v1beta1/kind-cluster/deploy.sh @@ -36,8 +36,8 @@ if [ -z "$(command -v kubectl)" ]; then exit 1 fi -# Step 1. Create Kind cluster with Kubernetes v1.26.6 -kind create cluster --image kindest/node:v1.26.6 +# Step 1. Create Kind cluster with Kubernetes v1.27.3 +kind create cluster --image kindest/node:v1.27.3 echo -e "\nKind cluster has been created\n" # Step 2. Set context for kubectl diff --git a/go.mod b/go.mod index 75ba895d7ad..4c1f3abc632 100644 --- a/go.mod +++ b/go.mod @@ -8,28 +8,29 @@ require ( github.com/c-bata/goptuna v0.8.0 github.com/go-sql-driver/mysql v1.5.0 github.com/golang/mock v1.6.0 - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/google/go-containerregistry v0.9.0 github.com/google/go-containerregistry/pkg/authn/k8schain v0.0.0-20211222182933-7c19fa370dbd github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/hpcloud/tail v1.0.1-0.20180514194441-a1dbeea552b7 github.com/lib/pq v1.10.6 github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a - github.com/onsi/gomega v1.24.1 - github.com/prometheus/client_golang v1.14.0 + github.com/onsi/gomega v1.27.7 + github.com/prometheus/client_golang v1.15.1 github.com/shirou/gopsutil/v3 v3.22.5 github.com/spf13/cobra v1.6.0 github.com/spf13/viper v1.9.0 github.com/tidwall/gjson v1.14.1 - golang.org/x/net v0.8.0 + golang.org/x/net v0.10.0 google.golang.org/grpc v1.53.0 - k8s.io/api v0.26.7 - k8s.io/apimachinery v0.26.7 - k8s.io/client-go v0.26.7 - k8s.io/code-generator v0.26.7 + k8s.io/api v0.27.4 + k8s.io/apimachinery v0.27.4 + k8s.io/client-go v0.27.4 + k8s.io/code-generator v0.27.4 k8s.io/klog v1.0.0 - k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 - sigs.k8s.io/controller-runtime v0.14.6 + k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f + sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 ) require ( @@ -54,14 +55,14 @@ require ( github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-logr/zapr v1.2.3 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/zapr v1.2.4 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.1 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.2.0 // indirect + github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/gnostic v0.5.7-v3refs // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -76,7 +77,7 @@ 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 v1.0.2 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // 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 @@ -87,10 +88,10 @@ 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.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.42.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect github.com/spf13/afero v1.6.0 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -106,19 +107,19 @@ require ( go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect golang.org/x/crypto v0.1.0 // indirect - golang.org/x/mod v0.9.0 // indirect - golang.org/x/oauth2 v0.4.0 // indirect - golang.org/x/sync v0.1.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/term v0.6.0 // indirect - golang.org/x/text v0.8.0 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/oauth2 v0.5.0 // indirect + golang.org/x/sync v0.2.0 // indirect + golang.org/x/sys v0.8.0 // indirect + golang.org/x/term v0.8.0 // indirect + golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.6.0 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.9.1 // indirect + gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect gonum.org/v1/gonum v0.8.2 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.63.2 // indirect @@ -126,14 +127,13 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.1.0 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect + k8s.io/apiextensions-apiserver v0.27.2 // indirect k8s.io/cloud-provider v0.21.0 // indirect - k8s.io/component-base v0.26.1 // indirect + k8s.io/component-base v0.27.2 // indirect k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect - k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/klog/v2 v2.90.1 // indirect k8s.io/legacy-cloud-providers v0.21.0 // indirect - k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index f8fdd1b11fd..9926e8574aa 100644 --- a/go.sum +++ b/go.sum @@ -437,30 +437,35 @@ github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= 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.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +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.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= -github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/jsonreference v0.20.1 h1:FBLnyygC4/IZZr893oiomc9XaghoveYTrLC1F86HID8= +github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +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-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= 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-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= @@ -494,6 +499,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -532,8 +539,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= @@ -597,6 +605,7 @@ 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/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= @@ -801,8 +810,8 @@ 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 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= @@ -838,7 +847,6 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= @@ -878,6 +886,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.2 h1:hAHbPm5IJGijwng3PWk09JkG9WeqChjprR5s9bBZ+OM= github.com/matttproud/golang_protobuf_extensions v1.0.2/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/mgechev/revive v1.1.2/go.mod h1:bnXsMr+ZTH09V5rssEI+jHAZ4z+ZdyhgO/zsy3EhK+0= @@ -956,7 +966,7 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -964,8 +974,10 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= -github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= +github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -1029,6 +1041,8 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.1 h1:8tXpTmJbyH5lydzFPoxSIJ0J46jdh3tylbvM1xCv0LI= +github.com/prometheus/client_golang v1.15.1/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 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= @@ -1036,6 +1050,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1: github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= 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= @@ -1046,6 +1062,8 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= +github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 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= @@ -1060,6 +1078,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= @@ -1077,6 +1097,7 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So 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.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= @@ -1115,6 +1136,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sivchari/tenv v1.4.7/go.mod h1:5nF+bITvkebQVanjU6IuMbvIot/7ReNsUV7I5NbprB0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1162,6 +1185,8 @@ github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= @@ -1173,7 +1198,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= 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/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= @@ -1280,6 +1307,7 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= @@ -1373,6 +1401,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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= @@ -1438,6 +1468,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= 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= @@ -1458,6 +1490,8 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= 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= @@ -1472,6 +1506,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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= @@ -1583,15 +1619,20 @@ golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= 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= @@ -1603,6 +1644,8 @@ 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.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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= @@ -1719,8 +1762,10 @@ 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.6/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= 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= @@ -1729,6 +1774,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= +gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20190226202314-149afe6ec0b6/go.mod h1:jevfED4GnIEnJrWW55YmY9DMhajHcnkqVnEXmEtMyNI= gonum.org/v1/gonum v0.0.0-20190902003836-43865b531bee/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= @@ -1898,6 +1945,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= 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= @@ -1906,6 +1955,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= @@ -1985,17 +2035,19 @@ k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.21.0/go.mod h1:+YbrhBBGgsxbF6o6Kj4KJPJnBmAKuXDeS3E18bgHNVU= k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= -k8s.io/api v0.26.7 h1:Lf4iEBEJb5OFNmawtBfSZV/UNi9riSJ0t1qdhyZqI40= -k8s.io/api v0.26.7/go.mod h1:Vk9bMadzA49UHPmHB//lX7VRCQSXGoVwfLd3Sc1SSXI= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= +k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= +k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.26.7 h1:590jSBwaSHCAFCqltaEogY/zybFlhGsnLteLpuF2wig= -k8s.io/apimachinery v0.26.7/go.mod h1:qYzLkrQ9lhrZRh0jNKo2cfvf/R1/kQONnSiyB7NUJU0= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= @@ -2005,18 +2057,20 @@ k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.21.0/go.mod h1:nNBytTF9qPFDEhoqgEPaarobC8QPae13bElIVHzIglA= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E= -k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo= +k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= +k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= k8s.io/cloud-provider v0.21.0 h1:NSTS+czpv6LQAaIpY/VUghsT4oj62hYmQPErkDKTzKU= k8s.io/cloud-provider v0.21.0/go.mod h1:z17TQgu3JgUFjcgby8sj5X86YdVK5Pbt+jm/eYMZU9M= -k8s.io/code-generator v0.26.7 h1:bZkIAVLFfhYOfMXb2nRb0xKFmBTI6o2phX/4Q0ay87g= -k8s.io/code-generator v0.26.7/go.mod h1:seNkA/wYpeG1GT1REW1xHk4MCjQcVbx6FFAXKwCgdlE= +k8s.io/code-generator v0.27.4 h1:bw2xFEBnthhCSC7Bt6FFHhPTfWX21IJ30GXxOzywsFE= +k8s.io/code-generator v0.27.4/go.mod h1:DPung1sI5vBgn4AGKtlPRQAyagj/ir/4jI55ipZHVww= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/component-base v0.27.2 h1:neju+7s/r5O4x4/txeUONNTS9r1HsPbyoPBAtHsDCpo= +k8s.io/component-base v0.27.2/go.mod h1:5UPk7EjfgrfgRIuDBFtsEFAe4DAvP3U+M8RTzoSJkpo= k8s.io/controller-manager v0.21.0/go.mod h1:Ohy0GRNRKPVjB8C8G+dV+4aPn26m8HYUI6ejloUBvUA= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -2032,18 +2086,18 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= -k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= +k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+OGxg8HsuBr/5f6tVAjDu6E= -k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= +k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/legacy-cloud-providers v0.21.0 h1:iWf5xaX9yvYT5mkz8UB96UtISQ5IkrWeuMPMhRp01ZY= k8s.io/legacy-cloud-providers v0.21.0/go.mod h1:bNxo7gDg+PGkBmT/MFZswLTWdSWK9kAlS1s8DJca5q4= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 h1:KTgPnR10d5zhztWptI952TNtt/4u5h3IzDXkdIMuo2Y= -k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= +k8s.io/utils v0.0.0-20230209194617-a36077c30491/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= @@ -2061,8 +2115,10 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyz sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= +sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +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.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go b/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go new file mode 100644 index 00000000000..4fba0d09e86 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmsetting.go @@ -0,0 +1,48 @@ +/* +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 new file mode 100644 index 00000000000..099f7bc4944 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/algorithmspec.go @@ -0,0 +1,53 @@ +/* +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 new file mode 100644 index 00000000000..532caaa4eb1 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/collectorspec.go @@ -0,0 +1,53 @@ +/* +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 new file mode 100644 index 00000000000..6e5883f13fa --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingrule.go @@ -0,0 +1,70 @@ +/* +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 new file mode 100644 index 00000000000..cc529f10fe7 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingsetting.go @@ -0,0 +1,48 @@ +/* +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 new file mode 100644 index 00000000000..e8755a76b06 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/earlystoppingspec.go @@ -0,0 +1,53 @@ +/* +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 new file mode 100644 index 00000000000..634943c1314 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/filesystempath.go @@ -0,0 +1,61 @@ +/* +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 new file mode 100644 index 00000000000..e5fa98c995b --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/filterspec.go @@ -0,0 +1,41 @@ +/* +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 new file mode 100644 index 00000000000..f8437349a62 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/metric.go @@ -0,0 +1,66 @@ +/* +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 new file mode 100644 index 00000000000..74919f36f36 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/metricscollectorspec.go @@ -0,0 +1,48 @@ +/* +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 new file mode 100644 index 00000000000..93e0a13358e --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/metricstrategy.go @@ -0,0 +1,52 @@ +/* +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 new file mode 100644 index 00000000000..eff376e20ec --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/objectivespec.go @@ -0,0 +1,86 @@ +/* +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 new file mode 100644 index 00000000000..0d40846837b --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/observation.go @@ -0,0 +1,44 @@ +/* +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 new file mode 100644 index 00000000000..2a49007c020 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/parameterassignment.go @@ -0,0 +1,48 @@ +/* +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 new file mode 100644 index 00000000000..792fd4220cd --- /dev/null +++ b/pkg/client/controller/applyconfiguration/common/v1beta1/sourcespec.go @@ -0,0 +1,61 @@ +/* +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/configmapsource.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/configmapsource.go new file mode 100644 index 00000000000..29b1922a2f5 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/configmapsource.go @@ -0,0 +1,57 @@ +/* +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 + +// ConfigMapSourceApplyConfiguration represents an declarative configuration of the ConfigMapSource type for use +// with apply. +type ConfigMapSourceApplyConfiguration struct { + ConfigMapName *string `json:"configMapName,omitempty"` + ConfigMapNamespace *string `json:"configMapNamespace,omitempty"` + TemplatePath *string `json:"templatePath,omitempty"` +} + +// ConfigMapSourceApplyConfiguration constructs an declarative configuration of the ConfigMapSource type for use with +// apply. +func ConfigMapSource() *ConfigMapSourceApplyConfiguration { + return &ConfigMapSourceApplyConfiguration{} +} + +// WithConfigMapName sets the ConfigMapName 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 ConfigMapName field is set to the value of the last call. +func (b *ConfigMapSourceApplyConfiguration) WithConfigMapName(value string) *ConfigMapSourceApplyConfiguration { + b.ConfigMapName = &value + return b +} + +// WithConfigMapNamespace sets the ConfigMapNamespace 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 ConfigMapNamespace field is set to the value of the last call. +func (b *ConfigMapSourceApplyConfiguration) WithConfigMapNamespace(value string) *ConfigMapSourceApplyConfiguration { + b.ConfigMapNamespace = &value + return b +} + +// WithTemplatePath sets the TemplatePath 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 TemplatePath field is set to the value of the last call. +func (b *ConfigMapSourceApplyConfiguration) WithTemplatePath(value string) *ConfigMapSourceApplyConfiguration { + b.TemplatePath = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/experiment.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experiment.go new file mode 100644 index 00000000000..88128263083 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experiment.go @@ -0,0 +1,219 @@ +/* +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 ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ExperimentApplyConfiguration represents an declarative configuration of the Experiment type for use +// with apply. +type ExperimentApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ExperimentSpecApplyConfiguration `json:"spec,omitempty"` + Status *ExperimentStatusApplyConfiguration `json:"status,omitempty"` +} + +// Experiment constructs an declarative configuration of the Experiment type for use with +// apply. +func Experiment(name, namespace string) *ExperimentApplyConfiguration { + b := &ExperimentApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Experiment") + b.WithAPIVersion("experiment.kubeflow.org/v1beta1") + 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 *ExperimentApplyConfiguration) WithKind(value string) *ExperimentApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithAPIVersion(value string) *ExperimentApplyConfiguration { + b.APIVersion = &value + return b +} + +// 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 *ExperimentApplyConfiguration) WithName(value string) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithGenerateName(value string) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithNamespace(value string) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithUID(value types.UID) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithResourceVersion(value string) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithGeneration(value int64) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ExperimentApplyConfiguration) WithLabels(entries map[string]string) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ExperimentApplyConfiguration) WithAnnotations(entries map[string]string) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. +func (b *ExperimentApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers 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 Finalizers field. +func (b *ExperimentApplyConfiguration) WithFinalizers(values ...string) *ExperimentApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *ExperimentApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithSpec(value *ExperimentSpecApplyConfiguration) *ExperimentApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *ExperimentApplyConfiguration) WithStatus(value *ExperimentStatusApplyConfiguration) *ExperimentApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentcondition.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentcondition.go new file mode 100644 index 00000000000..9e14827eb48 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentcondition.go @@ -0,0 +1,90 @@ +/* +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/experiments/v1beta1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// ExperimentConditionApplyConfiguration represents an declarative configuration of the ExperimentCondition type for use +// with apply. +type ExperimentConditionApplyConfiguration struct { + Type *v1beta1.ExperimentConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` +} + +// ExperimentConditionApplyConfiguration constructs an declarative configuration of the ExperimentCondition type for use with +// apply. +func ExperimentCondition() *ExperimentConditionApplyConfiguration { + return &ExperimentConditionApplyConfiguration{} +} + +// 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 *ExperimentConditionApplyConfiguration) WithType(value v1beta1.ExperimentConditionType) *ExperimentConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *ExperimentConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *ExperimentConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithReason sets the Reason 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 Reason field is set to the value of the last call. +func (b *ExperimentConditionApplyConfiguration) WithReason(value string) *ExperimentConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message 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 Message field is set to the value of the last call. +func (b *ExperimentConditionApplyConfiguration) WithMessage(value string) *ExperimentConditionApplyConfiguration { + b.Message = &value + return b +} + +// WithLastUpdateTime sets the LastUpdateTime 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 LastUpdateTime field is set to the value of the last call. +func (b *ExperimentConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *ExperimentConditionApplyConfiguration { + b.LastUpdateTime = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. +func (b *ExperimentConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ExperimentConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go new file mode 100644 index 00000000000..95f11e62882 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentspec.go @@ -0,0 +1,139 @@ +/* +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 ( + 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"` +} + +// ExperimentSpecApplyConfiguration constructs an declarative configuration of the ExperimentSpec type for use with +// apply. +func ExperimentSpec() *ExperimentSpecApplyConfiguration { + return &ExperimentSpecApplyConfiguration{} +} + +// WithParameters adds the given value to the Parameters 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 Parameters field. +func (b *ExperimentSpecApplyConfiguration) WithParameters(values ...*ParameterSpecApplyConfiguration) *ExperimentSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithParameters") + } + b.Parameters = append(b.Parameters, *values[i]) + } + return b +} + +// 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 + 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 + 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 + return b +} + +// WithTrialTemplate sets the TrialTemplate 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 TrialTemplate field is set to the value of the last call. +func (b *ExperimentSpecApplyConfiguration) WithTrialTemplate(value *TrialTemplateApplyConfiguration) *ExperimentSpecApplyConfiguration { + b.TrialTemplate = value + return b +} + +// WithParallelTrialCount sets the ParallelTrialCount 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 ParallelTrialCount field is set to the value of the last call. +func (b *ExperimentSpecApplyConfiguration) WithParallelTrialCount(value int32) *ExperimentSpecApplyConfiguration { + b.ParallelTrialCount = &value + return b +} + +// WithMaxTrialCount sets the MaxTrialCount 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 MaxTrialCount field is set to the value of the last call. +func (b *ExperimentSpecApplyConfiguration) WithMaxTrialCount(value int32) *ExperimentSpecApplyConfiguration { + b.MaxTrialCount = &value + return b +} + +// WithMaxFailedTrialCount sets the MaxFailedTrialCount 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 MaxFailedTrialCount field is set to the value of the last call. +func (b *ExperimentSpecApplyConfiguration) WithMaxFailedTrialCount(value int32) *ExperimentSpecApplyConfiguration { + b.MaxFailedTrialCount = &value + return b +} + +// 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 + return b +} + +// WithNasConfig sets the NasConfig 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 NasConfig field is set to the value of the last call. +func (b *ExperimentSpecApplyConfiguration) WithNasConfig(value *NasConfigApplyConfiguration) *ExperimentSpecApplyConfiguration { + b.NasConfig = value + return b +} + +// WithResumePolicy sets the ResumePolicy 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 ResumePolicy field is set to the value of the last call. +func (b *ExperimentSpecApplyConfiguration) WithResumePolicy(value experimentsv1beta1.ResumePolicyType) *ExperimentSpecApplyConfiguration { + b.ResumePolicy = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentstatus.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentstatus.go new file mode 100644 index 00000000000..23681bdb5aa --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/experimentstatus.go @@ -0,0 +1,233 @@ +/* +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/apimachinery/pkg/apis/meta/v1" +) + +// ExperimentStatusApplyConfiguration represents an declarative configuration of the ExperimentStatus type for use +// with apply. +type ExperimentStatusApplyConfiguration struct { + StartTime *v1.Time `json:"startTime,omitempty"` + CompletionTime *v1.Time `json:"completionTime,omitempty"` + LastReconcileTime *v1.Time `json:"lastReconcileTime,omitempty"` + Conditions []ExperimentConditionApplyConfiguration `json:"conditions,omitempty"` + CurrentOptimalTrial *OptimalTrialApplyConfiguration `json:"currentOptimalTrial,omitempty"` + RunningTrialList []string `json:"runningTrialList,omitempty"` + PendingTrialList []string `json:"pendingTrialList,omitempty"` + FailedTrialList []string `json:"failedTrialList,omitempty"` + SucceededTrialList []string `json:"succeededTrialList,omitempty"` + KilledTrialList []string `json:"killedTrialList,omitempty"` + EarlyStoppedTrialList []string `json:"earlyStoppedTrialList,omitempty"` + MetricsUnavailableTrialList []string `json:"metricsUnavailableTrialList,omitempty"` + Trials *int32 `json:"trials,omitempty"` + TrialsSucceeded *int32 `json:"trialsSucceeded,omitempty"` + TrialsFailed *int32 `json:"trialsFailed,omitempty"` + TrialsKilled *int32 `json:"trialsKilled,omitempty"` + TrialsPending *int32 `json:"trialsPending,omitempty"` + TrialsRunning *int32 `json:"trialsRunning,omitempty"` + TrialsEarlyStopped *int32 `json:"trialsEarlyStopped,omitempty"` + TrialMetricsUnavailable *int32 `json:"trialMetricsUnavailable,omitempty"` +} + +// ExperimentStatusApplyConfiguration constructs an declarative configuration of the ExperimentStatus type for use with +// apply. +func ExperimentStatus() *ExperimentStatusApplyConfiguration { + return &ExperimentStatusApplyConfiguration{} +} + +// WithStartTime sets the StartTime 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 StartTime field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithStartTime(value v1.Time) *ExperimentStatusApplyConfiguration { + b.StartTime = &value + return b +} + +// WithCompletionTime sets the CompletionTime 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 CompletionTime field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithCompletionTime(value v1.Time) *ExperimentStatusApplyConfiguration { + b.CompletionTime = &value + return b +} + +// WithLastReconcileTime sets the LastReconcileTime 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 LastReconcileTime field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithLastReconcileTime(value v1.Time) *ExperimentStatusApplyConfiguration { + b.LastReconcileTime = &value + return b +} + +// WithConditions adds the given value to the Conditions 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 Conditions field. +func (b *ExperimentStatusApplyConfiguration) WithConditions(values ...*ExperimentConditionApplyConfiguration) *ExperimentStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithCurrentOptimalTrial sets the CurrentOptimalTrial 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 CurrentOptimalTrial field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithCurrentOptimalTrial(value *OptimalTrialApplyConfiguration) *ExperimentStatusApplyConfiguration { + b.CurrentOptimalTrial = value + return b +} + +// WithRunningTrialList adds the given value to the RunningTrialList 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 RunningTrialList field. +func (b *ExperimentStatusApplyConfiguration) WithRunningTrialList(values ...string) *ExperimentStatusApplyConfiguration { + for i := range values { + b.RunningTrialList = append(b.RunningTrialList, values[i]) + } + return b +} + +// WithPendingTrialList adds the given value to the PendingTrialList 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 PendingTrialList field. +func (b *ExperimentStatusApplyConfiguration) WithPendingTrialList(values ...string) *ExperimentStatusApplyConfiguration { + for i := range values { + b.PendingTrialList = append(b.PendingTrialList, values[i]) + } + return b +} + +// WithFailedTrialList adds the given value to the FailedTrialList 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 FailedTrialList field. +func (b *ExperimentStatusApplyConfiguration) WithFailedTrialList(values ...string) *ExperimentStatusApplyConfiguration { + for i := range values { + b.FailedTrialList = append(b.FailedTrialList, values[i]) + } + return b +} + +// WithSucceededTrialList adds the given value to the SucceededTrialList 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 SucceededTrialList field. +func (b *ExperimentStatusApplyConfiguration) WithSucceededTrialList(values ...string) *ExperimentStatusApplyConfiguration { + for i := range values { + b.SucceededTrialList = append(b.SucceededTrialList, values[i]) + } + return b +} + +// WithKilledTrialList adds the given value to the KilledTrialList 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 KilledTrialList field. +func (b *ExperimentStatusApplyConfiguration) WithKilledTrialList(values ...string) *ExperimentStatusApplyConfiguration { + for i := range values { + b.KilledTrialList = append(b.KilledTrialList, values[i]) + } + return b +} + +// WithEarlyStoppedTrialList adds the given value to the EarlyStoppedTrialList 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 EarlyStoppedTrialList field. +func (b *ExperimentStatusApplyConfiguration) WithEarlyStoppedTrialList(values ...string) *ExperimentStatusApplyConfiguration { + for i := range values { + b.EarlyStoppedTrialList = append(b.EarlyStoppedTrialList, values[i]) + } + return b +} + +// WithMetricsUnavailableTrialList adds the given value to the MetricsUnavailableTrialList 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 MetricsUnavailableTrialList field. +func (b *ExperimentStatusApplyConfiguration) WithMetricsUnavailableTrialList(values ...string) *ExperimentStatusApplyConfiguration { + for i := range values { + b.MetricsUnavailableTrialList = append(b.MetricsUnavailableTrialList, values[i]) + } + return b +} + +// WithTrials sets the Trials 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 Trials field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrials(value int32) *ExperimentStatusApplyConfiguration { + b.Trials = &value + return b +} + +// WithTrialsSucceeded sets the TrialsSucceeded 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 TrialsSucceeded field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrialsSucceeded(value int32) *ExperimentStatusApplyConfiguration { + b.TrialsSucceeded = &value + return b +} + +// WithTrialsFailed sets the TrialsFailed 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 TrialsFailed field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrialsFailed(value int32) *ExperimentStatusApplyConfiguration { + b.TrialsFailed = &value + return b +} + +// WithTrialsKilled sets the TrialsKilled 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 TrialsKilled field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrialsKilled(value int32) *ExperimentStatusApplyConfiguration { + b.TrialsKilled = &value + return b +} + +// WithTrialsPending sets the TrialsPending 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 TrialsPending field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrialsPending(value int32) *ExperimentStatusApplyConfiguration { + b.TrialsPending = &value + return b +} + +// WithTrialsRunning sets the TrialsRunning 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 TrialsRunning field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrialsRunning(value int32) *ExperimentStatusApplyConfiguration { + b.TrialsRunning = &value + return b +} + +// WithTrialsEarlyStopped sets the TrialsEarlyStopped 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 TrialsEarlyStopped field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrialsEarlyStopped(value int32) *ExperimentStatusApplyConfiguration { + b.TrialsEarlyStopped = &value + return b +} + +// WithTrialMetricsUnavailable sets the TrialMetricsUnavailable 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 TrialMetricsUnavailable field is set to the value of the last call. +func (b *ExperimentStatusApplyConfiguration) WithTrialMetricsUnavailable(value int32) *ExperimentStatusApplyConfiguration { + b.TrialMetricsUnavailable = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/feasiblespace.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/feasiblespace.go new file mode 100644 index 00000000000..0026c91b45b --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/feasiblespace.go @@ -0,0 +1,68 @@ +/* +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 + +// FeasibleSpaceApplyConfiguration represents an declarative configuration of the FeasibleSpace type for use +// with apply. +type FeasibleSpaceApplyConfiguration struct { + Max *string `json:"max,omitempty"` + Min *string `json:"min,omitempty"` + List []string `json:"list,omitempty"` + Step *string `json:"step,omitempty"` +} + +// FeasibleSpaceApplyConfiguration constructs an declarative configuration of the FeasibleSpace type for use with +// apply. +func FeasibleSpace() *FeasibleSpaceApplyConfiguration { + return &FeasibleSpaceApplyConfiguration{} +} + +// 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 *FeasibleSpaceApplyConfiguration) WithMax(value string) *FeasibleSpaceApplyConfiguration { + b.Max = &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 *FeasibleSpaceApplyConfiguration) WithMin(value string) *FeasibleSpaceApplyConfiguration { + b.Min = &value + return b +} + +// WithList adds the given value to the List 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 List field. +func (b *FeasibleSpaceApplyConfiguration) WithList(values ...string) *FeasibleSpaceApplyConfiguration { + for i := range values { + b.List = append(b.List, values[i]) + } + return b +} + +// WithStep sets the Step 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 Step field is set to the value of the last call. +func (b *FeasibleSpaceApplyConfiguration) WithStep(value string) *FeasibleSpaceApplyConfiguration { + b.Step = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/graphconfig.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/graphconfig.go new file mode 100644 index 00000000000..aa52c283c8b --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/graphconfig.go @@ -0,0 +1,61 @@ +/* +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 + +// GraphConfigApplyConfiguration represents an declarative configuration of the GraphConfig type for use +// with apply. +type GraphConfigApplyConfiguration struct { + NumLayers *int32 `json:"numLayers,omitempty"` + InputSizes []int32 `json:"inputSizes,omitempty"` + OutputSizes []int32 `json:"outputSizes,omitempty"` +} + +// GraphConfigApplyConfiguration constructs an declarative configuration of the GraphConfig type for use with +// apply. +func GraphConfig() *GraphConfigApplyConfiguration { + return &GraphConfigApplyConfiguration{} +} + +// WithNumLayers sets the NumLayers 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 NumLayers field is set to the value of the last call. +func (b *GraphConfigApplyConfiguration) WithNumLayers(value int32) *GraphConfigApplyConfiguration { + b.NumLayers = &value + return b +} + +// WithInputSizes adds the given value to the InputSizes 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 InputSizes field. +func (b *GraphConfigApplyConfiguration) WithInputSizes(values ...int32) *GraphConfigApplyConfiguration { + for i := range values { + b.InputSizes = append(b.InputSizes, values[i]) + } + return b +} + +// WithOutputSizes adds the given value to the OutputSizes 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 OutputSizes field. +func (b *GraphConfigApplyConfiguration) WithOutputSizes(values ...int32) *GraphConfigApplyConfiguration { + for i := range values { + b.OutputSizes = append(b.OutputSizes, values[i]) + } + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/nasconfig.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/nasconfig.go new file mode 100644 index 00000000000..a0956ababf7 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/nasconfig.go @@ -0,0 +1,53 @@ +/* +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 + +// NasConfigApplyConfiguration represents an declarative configuration of the NasConfig type for use +// with apply. +type NasConfigApplyConfiguration struct { + GraphConfig *GraphConfigApplyConfiguration `json:"graphConfig,omitempty"` + Operations []OperationApplyConfiguration `json:"operations,omitempty"` +} + +// NasConfigApplyConfiguration constructs an declarative configuration of the NasConfig type for use with +// apply. +func NasConfig() *NasConfigApplyConfiguration { + return &NasConfigApplyConfiguration{} +} + +// WithGraphConfig sets the GraphConfig 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 GraphConfig field is set to the value of the last call. +func (b *NasConfigApplyConfiguration) WithGraphConfig(value *GraphConfigApplyConfiguration) *NasConfigApplyConfiguration { + b.GraphConfig = value + return b +} + +// WithOperations adds the given value to the Operations 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 Operations field. +func (b *NasConfigApplyConfiguration) WithOperations(values ...*OperationApplyConfiguration) *NasConfigApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOperations") + } + b.Operations = append(b.Operations, *values[i]) + } + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/operation.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/operation.go new file mode 100644 index 00000000000..5e65144281c --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/operation.go @@ -0,0 +1,53 @@ +/* +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 + +// OperationApplyConfiguration represents an declarative configuration of the Operation type for use +// with apply. +type OperationApplyConfiguration struct { + OperationType *string `json:"operationType,omitempty"` + Parameters []ParameterSpecApplyConfiguration `json:"parameters,omitempty"` +} + +// OperationApplyConfiguration constructs an declarative configuration of the Operation type for use with +// apply. +func Operation() *OperationApplyConfiguration { + return &OperationApplyConfiguration{} +} + +// WithOperationType sets the OperationType 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 OperationType field is set to the value of the last call. +func (b *OperationApplyConfiguration) WithOperationType(value string) *OperationApplyConfiguration { + b.OperationType = &value + return b +} + +// WithParameters adds the given value to the Parameters 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 Parameters field. +func (b *OperationApplyConfiguration) WithParameters(values ...*ParameterSpecApplyConfiguration) *OperationApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithParameters") + } + b.Parameters = append(b.Parameters, *values[i]) + } + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go new file mode 100644 index 00000000000..43b8f7714a1 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/optimaltrial.go @@ -0,0 +1,66 @@ +/* +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/client/controller/applyconfiguration/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"` +} + +// OptimalTrialApplyConfiguration constructs an declarative configuration of the OptimalTrial type for use with +// apply. +func OptimalTrial() *OptimalTrialApplyConfiguration { + return &OptimalTrialApplyConfiguration{} +} + +// WithBestTrialName sets the BestTrialName 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 BestTrialName field is set to the value of the last call. +func (b *OptimalTrialApplyConfiguration) WithBestTrialName(value string) *OptimalTrialApplyConfiguration { + b.BestTrialName = &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 *OptimalTrialApplyConfiguration) WithParameterAssignments(values ...*v1beta1.ParameterAssignmentApplyConfiguration) *OptimalTrialApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithParameterAssignments") + } + b.ParameterAssignments = append(b.ParameterAssignments, *values[i]) + } + return b +} + +// 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 + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/parameterspec.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/parameterspec.go new file mode 100644 index 00000000000..9fc2655050d --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/parameterspec.go @@ -0,0 +1,61 @@ +/* +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/experiments/v1beta1" +) + +// ParameterSpecApplyConfiguration represents an declarative configuration of the ParameterSpec type for use +// with apply. +type ParameterSpecApplyConfiguration struct { + Name *string `json:"name,omitempty"` + ParameterType *v1beta1.ParameterType `json:"parameterType,omitempty"` + FeasibleSpace *FeasibleSpaceApplyConfiguration `json:"feasibleSpace,omitempty"` +} + +// ParameterSpecApplyConfiguration constructs an declarative configuration of the ParameterSpec type for use with +// apply. +func ParameterSpec() *ParameterSpecApplyConfiguration { + return &ParameterSpecApplyConfiguration{} +} + +// 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 *ParameterSpecApplyConfiguration) WithName(value string) *ParameterSpecApplyConfiguration { + b.Name = &value + return b +} + +// WithParameterType sets the ParameterType 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 ParameterType field is set to the value of the last call. +func (b *ParameterSpecApplyConfiguration) WithParameterType(value v1beta1.ParameterType) *ParameterSpecApplyConfiguration { + b.ParameterType = &value + return b +} + +// WithFeasibleSpace sets the FeasibleSpace 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 FeasibleSpace field is set to the value of the last call. +func (b *ParameterSpecApplyConfiguration) WithFeasibleSpace(value *FeasibleSpaceApplyConfiguration) *ParameterSpecApplyConfiguration { + b.FeasibleSpace = value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialparameterspec.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialparameterspec.go new file mode 100644 index 00000000000..cd87d9cb6ea --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialparameterspec.go @@ -0,0 +1,57 @@ +/* +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 + +// TrialParameterSpecApplyConfiguration represents an declarative configuration of the TrialParameterSpec type for use +// with apply. +type TrialParameterSpecApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Reference *string `json:"reference,omitempty"` +} + +// TrialParameterSpecApplyConfiguration constructs an declarative configuration of the TrialParameterSpec type for use with +// apply. +func TrialParameterSpec() *TrialParameterSpecApplyConfiguration { + return &TrialParameterSpecApplyConfiguration{} +} + +// 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 *TrialParameterSpecApplyConfiguration) WithName(value string) *TrialParameterSpecApplyConfiguration { + b.Name = &value + return b +} + +// WithDescription sets the Description 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 Description field is set to the value of the last call. +func (b *TrialParameterSpecApplyConfiguration) WithDescription(value string) *TrialParameterSpecApplyConfiguration { + b.Description = &value + return b +} + +// WithReference sets the Reference 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 Reference field is set to the value of the last call. +func (b *TrialParameterSpecApplyConfiguration) WithReference(value string) *TrialParameterSpecApplyConfiguration { + b.Reference = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialsource.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialsource.go new file mode 100644 index 00000000000..8523ebc6a36 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialsource.go @@ -0,0 +1,52 @@ +/* +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 ( + unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" +) + +// TrialSourceApplyConfiguration represents an declarative configuration of the TrialSource type for use +// with apply. +type TrialSourceApplyConfiguration struct { + TrialSpec *unstructured.Unstructured `json:"trialSpec,omitempty"` + ConfigMap *ConfigMapSourceApplyConfiguration `json:"configMap,omitempty"` +} + +// TrialSourceApplyConfiguration constructs an declarative configuration of the TrialSource type for use with +// apply. +func TrialSource() *TrialSourceApplyConfiguration { + return &TrialSourceApplyConfiguration{} +} + +// WithTrialSpec sets the TrialSpec 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 TrialSpec field is set to the value of the last call. +func (b *TrialSourceApplyConfiguration) WithTrialSpec(value unstructured.Unstructured) *TrialSourceApplyConfiguration { + b.TrialSpec = &value + return b +} + +// WithConfigMap sets the ConfigMap 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 ConfigMap field is set to the value of the last call. +func (b *TrialSourceApplyConfiguration) WithConfigMap(value *ConfigMapSourceApplyConfiguration) *TrialSourceApplyConfiguration { + b.ConfigMap = value + return b +} diff --git a/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialtemplate.go b/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialtemplate.go new file mode 100644 index 00000000000..cd14bd5d043 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/experiments/v1beta1/trialtemplate.go @@ -0,0 +1,116 @@ +/* +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 ( + unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" +) + +// TrialTemplateApplyConfiguration represents an declarative configuration of the TrialTemplate type for use +// with apply. +type TrialTemplateApplyConfiguration struct { + Retain *bool `json:"retain,omitempty"` + TrialSourceApplyConfiguration `json:",inline"` + TrialParameters []TrialParameterSpecApplyConfiguration `json:"trialParameters,omitempty"` + PrimaryPodLabels map[string]string `json:"primaryPodLabels,omitempty"` + PrimaryContainerName *string `json:"primaryContainerName,omitempty"` + SuccessCondition *string `json:"successCondition,omitempty"` + FailureCondition *string `json:"failureCondition,omitempty"` +} + +// TrialTemplateApplyConfiguration constructs an declarative configuration of the TrialTemplate type for use with +// apply. +func TrialTemplate() *TrialTemplateApplyConfiguration { + return &TrialTemplateApplyConfiguration{} +} + +// WithRetain sets the Retain 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 Retain field is set to the value of the last call. +func (b *TrialTemplateApplyConfiguration) WithRetain(value bool) *TrialTemplateApplyConfiguration { + b.Retain = &value + return b +} + +// WithTrialSpec sets the TrialSpec 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 TrialSpec field is set to the value of the last call. +func (b *TrialTemplateApplyConfiguration) WithTrialSpec(value unstructured.Unstructured) *TrialTemplateApplyConfiguration { + b.TrialSpec = &value + return b +} + +// WithConfigMap sets the ConfigMap 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 ConfigMap field is set to the value of the last call. +func (b *TrialTemplateApplyConfiguration) WithConfigMap(value *ConfigMapSourceApplyConfiguration) *TrialTemplateApplyConfiguration { + b.ConfigMap = value + return b +} + +// WithTrialParameters adds the given value to the TrialParameters 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 TrialParameters field. +func (b *TrialTemplateApplyConfiguration) WithTrialParameters(values ...*TrialParameterSpecApplyConfiguration) *TrialTemplateApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithTrialParameters") + } + b.TrialParameters = append(b.TrialParameters, *values[i]) + } + return b +} + +// WithPrimaryPodLabels puts the entries into the PrimaryPodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PrimaryPodLabels field, +// overwriting an existing map entries in PrimaryPodLabels field with the same key. +func (b *TrialTemplateApplyConfiguration) WithPrimaryPodLabels(entries map[string]string) *TrialTemplateApplyConfiguration { + if b.PrimaryPodLabels == nil && len(entries) > 0 { + b.PrimaryPodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PrimaryPodLabels[k] = v + } + return b +} + +// WithPrimaryContainerName sets the PrimaryContainerName 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 PrimaryContainerName field is set to the value of the last call. +func (b *TrialTemplateApplyConfiguration) WithPrimaryContainerName(value string) *TrialTemplateApplyConfiguration { + b.PrimaryContainerName = &value + return b +} + +// WithSuccessCondition sets the SuccessCondition 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 SuccessCondition field is set to the value of the last call. +func (b *TrialTemplateApplyConfiguration) WithSuccessCondition(value string) *TrialTemplateApplyConfiguration { + b.SuccessCondition = &value + return b +} + +// WithFailureCondition sets the FailureCondition 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 FailureCondition field is set to the value of the last call. +func (b *TrialTemplateApplyConfiguration) WithFailureCondition(value string) *TrialTemplateApplyConfiguration { + b.FailureCondition = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/internal/internal.go b/pkg/client/controller/applyconfiguration/internal/internal.go new file mode 100644 index 00000000000..a5a7728af3b --- /dev/null +++ b/pkg/client/controller/applyconfiguration/internal/internal.go @@ -0,0 +1,62 @@ +/* +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 internal + +import ( + "fmt" + "sync" + + typed "sigs.k8s.io/structured-merge-diff/v4/typed" +) + +func Parser() *typed.Parser { + parserOnce.Do(func() { + var err error + parser, err = typed.NewParser(schemaYAML) + if err != nil { + panic(fmt.Sprintf("Failed to parse schema: %v", err)) + } + }) + return parser +} + +var parserOnce sync.Once +var parser *typed.Parser +var schemaYAML = typed.YAMLObject(`types: +- name: __untyped_atomic_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic +- name: __untyped_deduced_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +`) diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestion.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestion.go new file mode 100644 index 00000000000..2672ab9c9d8 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestion.go @@ -0,0 +1,219 @@ +/* +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 ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// SuggestionApplyConfiguration represents an declarative configuration of the Suggestion type for use +// with apply. +type SuggestionApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *SuggestionSpecApplyConfiguration `json:"spec,omitempty"` + Status *SuggestionStatusApplyConfiguration `json:"status,omitempty"` +} + +// Suggestion constructs an declarative configuration of the Suggestion type for use with +// apply. +func Suggestion(name, namespace string) *SuggestionApplyConfiguration { + b := &SuggestionApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Suggestion") + b.WithAPIVersion("suggestion.kubeflow.org/v1beta1") + 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 *SuggestionApplyConfiguration) WithKind(value string) *SuggestionApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithAPIVersion(value string) *SuggestionApplyConfiguration { + b.APIVersion = &value + return b +} + +// 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 *SuggestionApplyConfiguration) WithName(value string) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithGenerateName(value string) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithNamespace(value string) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithUID(value types.UID) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithResourceVersion(value string) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithGeneration(value int64) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *SuggestionApplyConfiguration) WithLabels(entries map[string]string) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *SuggestionApplyConfiguration) WithAnnotations(entries map[string]string) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. +func (b *SuggestionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers 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 Finalizers field. +func (b *SuggestionApplyConfiguration) WithFinalizers(values ...string) *SuggestionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *SuggestionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithSpec(value *SuggestionSpecApplyConfiguration) *SuggestionApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *SuggestionApplyConfiguration) WithStatus(value *SuggestionStatusApplyConfiguration) *SuggestionApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestioncondition.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestioncondition.go new file mode 100644 index 00000000000..31c2af4aac7 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestioncondition.go @@ -0,0 +1,90 @@ +/* +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/suggestions/v1beta1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// SuggestionConditionApplyConfiguration represents an declarative configuration of the SuggestionCondition type for use +// with apply. +type SuggestionConditionApplyConfiguration struct { + Type *v1beta1.SuggestionConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` +} + +// SuggestionConditionApplyConfiguration constructs an declarative configuration of the SuggestionCondition type for use with +// apply. +func SuggestionCondition() *SuggestionConditionApplyConfiguration { + return &SuggestionConditionApplyConfiguration{} +} + +// 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 *SuggestionConditionApplyConfiguration) WithType(value v1beta1.SuggestionConditionType) *SuggestionConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *SuggestionConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *SuggestionConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithReason sets the Reason 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 Reason field is set to the value of the last call. +func (b *SuggestionConditionApplyConfiguration) WithReason(value string) *SuggestionConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message 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 Message field is set to the value of the last call. +func (b *SuggestionConditionApplyConfiguration) WithMessage(value string) *SuggestionConditionApplyConfiguration { + b.Message = &value + return b +} + +// WithLastUpdateTime sets the LastUpdateTime 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 LastUpdateTime field is set to the value of the last call. +func (b *SuggestionConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *SuggestionConditionApplyConfiguration { + b.LastUpdateTime = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. +func (b *SuggestionConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *SuggestionConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go new file mode 100644 index 00000000000..fbe7bfd67e4 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionspec.go @@ -0,0 +1,71 @@ +/* +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 ( + 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"` +} + +// SuggestionSpecApplyConfiguration constructs an declarative configuration of the SuggestionSpec type for use with +// apply. +func SuggestionSpec() *SuggestionSpecApplyConfiguration { + return &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 + 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 + return b +} + +// WithRequests sets the Requests 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 Requests field is set to the value of the last call. +func (b *SuggestionSpecApplyConfiguration) WithRequests(value int32) *SuggestionSpecApplyConfiguration { + b.Requests = &value + return b +} + +// WithResumePolicy sets the ResumePolicy 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 ResumePolicy field is set to the value of the last call. +func (b *SuggestionSpecApplyConfiguration) WithResumePolicy(value experimentsv1beta1.ResumePolicyType) *SuggestionSpecApplyConfiguration { + b.ResumePolicy = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go new file mode 100644 index 00000000000..0f88a84429a --- /dev/null +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/suggestionstatus.go @@ -0,0 +1,113 @@ +/* +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/client/controller/applyconfiguration/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"` +} + +// SuggestionStatusApplyConfiguration constructs an declarative configuration of the SuggestionStatus type for use with +// apply. +func SuggestionStatus() *SuggestionStatusApplyConfiguration { + return &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 { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithAlgorithmSettings") + } + b.AlgorithmSettings = append(b.AlgorithmSettings, *values[i]) + } + return b +} + +// WithSuggestionCount sets the SuggestionCount 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 SuggestionCount field is set to the value of the last call. +func (b *SuggestionStatusApplyConfiguration) WithSuggestionCount(value int32) *SuggestionStatusApplyConfiguration { + b.SuggestionCount = &value + return b +} + +// WithSuggestions adds the given value to the Suggestions 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 Suggestions field. +func (b *SuggestionStatusApplyConfiguration) WithSuggestions(values ...*TrialAssignmentApplyConfiguration) *SuggestionStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSuggestions") + } + b.Suggestions = append(b.Suggestions, *values[i]) + } + return b +} + +// WithStartTime sets the StartTime 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 StartTime field is set to the value of the last call. +func (b *SuggestionStatusApplyConfiguration) WithStartTime(value v1.Time) *SuggestionStatusApplyConfiguration { + b.StartTime = &value + return b +} + +// WithCompletionTime sets the CompletionTime 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 CompletionTime field is set to the value of the last call. +func (b *SuggestionStatusApplyConfiguration) WithCompletionTime(value v1.Time) *SuggestionStatusApplyConfiguration { + b.CompletionTime = &value + return b +} + +// WithLastReconcileTime sets the LastReconcileTime 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 LastReconcileTime field is set to the value of the last call. +func (b *SuggestionStatusApplyConfiguration) WithLastReconcileTime(value v1.Time) *SuggestionStatusApplyConfiguration { + b.LastReconcileTime = &value + return b +} + +// WithConditions adds the given value to the Conditions 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 Conditions field. +func (b *SuggestionStatusApplyConfiguration) WithConditions(values ...*SuggestionConditionApplyConfiguration) *SuggestionStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go new file mode 100644 index 00000000000..261e31a6b28 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/suggestions/v1beta1/trialassignment.go @@ -0,0 +1,86 @@ +/* +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/client/controller/applyconfiguration/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"` +} + +// TrialAssignmentApplyConfiguration constructs an declarative configuration of the TrialAssignment type for use with +// apply. +func TrialAssignment() *TrialAssignmentApplyConfiguration { + return &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 { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithParameterAssignments") + } + b.ParameterAssignments = append(b.ParameterAssignments, *values[i]) + } + return b +} + +// 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 *TrialAssignmentApplyConfiguration) WithName(value string) *TrialAssignmentApplyConfiguration { + b.Name = &value + return b +} + +// 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 { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithEarlyStoppingRules") + } + b.EarlyStoppingRules = append(b.EarlyStoppingRules, *values[i]) + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TrialAssignmentApplyConfiguration) WithLabels(entries map[string]string) *TrialAssignmentApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} diff --git a/pkg/client/controller/applyconfiguration/trials/v1beta1/trial.go b/pkg/client/controller/applyconfiguration/trials/v1beta1/trial.go new file mode 100644 index 00000000000..e20ab668646 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/trials/v1beta1/trial.go @@ -0,0 +1,219 @@ +/* +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 ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// TrialApplyConfiguration represents an declarative configuration of the Trial type for use +// with apply. +type TrialApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *TrialSpecApplyConfiguration `json:"spec,omitempty"` + Status *TrialStatusApplyConfiguration `json:"status,omitempty"` +} + +// Trial constructs an declarative configuration of the Trial type for use with +// apply. +func Trial(name, namespace string) *TrialApplyConfiguration { + b := &TrialApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("Trial") + b.WithAPIVersion("trial.kubeflow.org/v1beta1") + 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 *TrialApplyConfiguration) WithKind(value string) *TrialApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithAPIVersion(value string) *TrialApplyConfiguration { + b.APIVersion = &value + return b +} + +// 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 *TrialApplyConfiguration) WithName(value string) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithGenerateName(value string) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithNamespace(value string) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID 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 UID field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithUID(value types.UID) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithResourceVersion(value string) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation 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 Generation field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithGeneration(value int64) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithCreationTimestamp(value metav1.Time) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TrialApplyConfiguration) WithLabels(entries map[string]string) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *TrialApplyConfiguration) WithAnnotations(entries map[string]string) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field. +func (b *TrialApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers 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 Finalizers field. +func (b *TrialApplyConfiguration) WithFinalizers(values ...string) *TrialApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *TrialApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec 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 Spec field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithSpec(value *TrialSpecApplyConfiguration) *TrialApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *TrialApplyConfiguration) WithStatus(value *TrialStatusApplyConfiguration) *TrialApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/controller/applyconfiguration/trials/v1beta1/trialcondition.go b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialcondition.go new file mode 100644 index 00000000000..a698d9e32a0 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialcondition.go @@ -0,0 +1,90 @@ +/* +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/trials/v1beta1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// TrialConditionApplyConfiguration represents an declarative configuration of the TrialCondition type for use +// with apply. +type TrialConditionApplyConfiguration struct { + Type *v1beta1.TrialConditionType `json:"type,omitempty"` + Status *v1.ConditionStatus `json:"status,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` + LastUpdateTime *metav1.Time `json:"lastUpdateTime,omitempty"` + LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` +} + +// TrialConditionApplyConfiguration constructs an declarative configuration of the TrialCondition type for use with +// apply. +func TrialCondition() *TrialConditionApplyConfiguration { + return &TrialConditionApplyConfiguration{} +} + +// 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 *TrialConditionApplyConfiguration) WithType(value v1beta1.TrialConditionType) *TrialConditionApplyConfiguration { + b.Type = &value + return b +} + +// WithStatus sets the Status 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 Status field is set to the value of the last call. +func (b *TrialConditionApplyConfiguration) WithStatus(value v1.ConditionStatus) *TrialConditionApplyConfiguration { + b.Status = &value + return b +} + +// WithReason sets the Reason 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 Reason field is set to the value of the last call. +func (b *TrialConditionApplyConfiguration) WithReason(value string) *TrialConditionApplyConfiguration { + b.Reason = &value + return b +} + +// WithMessage sets the Message 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 Message field is set to the value of the last call. +func (b *TrialConditionApplyConfiguration) WithMessage(value string) *TrialConditionApplyConfiguration { + b.Message = &value + return b +} + +// WithLastUpdateTime sets the LastUpdateTime 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 LastUpdateTime field is set to the value of the last call. +func (b *TrialConditionApplyConfiguration) WithLastUpdateTime(value metav1.Time) *TrialConditionApplyConfiguration { + b.LastUpdateTime = &value + return b +} + +// WithLastTransitionTime sets the LastTransitionTime 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 LastTransitionTime field is set to the value of the last call. +func (b *TrialConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *TrialConditionApplyConfiguration { + b.LastTransitionTime = &value + return b +} diff --git a/pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go new file mode 100644 index 00000000000..bbe4a54535e --- /dev/null +++ b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialspec.go @@ -0,0 +1,156 @@ +/* +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/client/controller/applyconfiguration/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"` +} + +// TrialSpecApplyConfiguration constructs an declarative configuration of the TrialSpec type for use with +// apply. +func TrialSpec() *TrialSpecApplyConfiguration { + return &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 + 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 { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithParameterAssignments") + } + b.ParameterAssignments = append(b.ParameterAssignments, *values[i]) + } + return b +} + +// 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 { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithEarlyStoppingRules") + } + b.EarlyStoppingRules = append(b.EarlyStoppingRules, *values[i]) + } + return b +} + +// WithRunSpec sets the RunSpec 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 RunSpec field is set to the value of the last call. +func (b *TrialSpecApplyConfiguration) WithRunSpec(value unstructured.Unstructured) *TrialSpecApplyConfiguration { + b.RunSpec = &value + return b +} + +// WithRetainRun sets the RetainRun 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 RetainRun field is set to the value of the last call. +func (b *TrialSpecApplyConfiguration) WithRetainRun(value bool) *TrialSpecApplyConfiguration { + b.RetainRun = &value + return b +} + +// 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 + return b +} + +// WithPrimaryPodLabels puts the entries into the PrimaryPodLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the PrimaryPodLabels field, +// overwriting an existing map entries in PrimaryPodLabels field with the same key. +func (b *TrialSpecApplyConfiguration) WithPrimaryPodLabels(entries map[string]string) *TrialSpecApplyConfiguration { + if b.PrimaryPodLabels == nil && len(entries) > 0 { + b.PrimaryPodLabels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.PrimaryPodLabels[k] = v + } + return b +} + +// WithPrimaryContainerName sets the PrimaryContainerName 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 PrimaryContainerName field is set to the value of the last call. +func (b *TrialSpecApplyConfiguration) WithPrimaryContainerName(value string) *TrialSpecApplyConfiguration { + b.PrimaryContainerName = &value + return b +} + +// WithSuccessCondition sets the SuccessCondition 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 SuccessCondition field is set to the value of the last call. +func (b *TrialSpecApplyConfiguration) WithSuccessCondition(value string) *TrialSpecApplyConfiguration { + b.SuccessCondition = &value + return b +} + +// WithFailureCondition sets the FailureCondition 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 FailureCondition field is set to the value of the last call. +func (b *TrialSpecApplyConfiguration) WithFailureCondition(value string) *TrialSpecApplyConfiguration { + b.FailureCondition = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *TrialSpecApplyConfiguration) WithLabels(entries map[string]string) *TrialSpecApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} diff --git a/pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go new file mode 100644 index 00000000000..fc5ef7959d4 --- /dev/null +++ b/pkg/client/controller/applyconfiguration/trials/v1beta1/trialstatus.go @@ -0,0 +1,85 @@ +/* +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 ( + commonv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/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"` +} + +// TrialStatusApplyConfiguration constructs an declarative configuration of the TrialStatus type for use with +// apply. +func TrialStatus() *TrialStatusApplyConfiguration { + return &TrialStatusApplyConfiguration{} +} + +// WithStartTime sets the StartTime 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 StartTime field is set to the value of the last call. +func (b *TrialStatusApplyConfiguration) WithStartTime(value v1.Time) *TrialStatusApplyConfiguration { + b.StartTime = &value + return b +} + +// WithCompletionTime sets the CompletionTime 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 CompletionTime field is set to the value of the last call. +func (b *TrialStatusApplyConfiguration) WithCompletionTime(value v1.Time) *TrialStatusApplyConfiguration { + b.CompletionTime = &value + return b +} + +// WithLastReconcileTime sets the LastReconcileTime 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 LastReconcileTime field is set to the value of the last call. +func (b *TrialStatusApplyConfiguration) WithLastReconcileTime(value v1.Time) *TrialStatusApplyConfiguration { + b.LastReconcileTime = &value + return b +} + +// WithConditions adds the given value to the Conditions 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 Conditions field. +func (b *TrialStatusApplyConfiguration) WithConditions(values ...*TrialConditionApplyConfiguration) *TrialStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// 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 + return b +} diff --git a/pkg/client/controller/applyconfiguration/utils.go b/pkg/client/controller/applyconfiguration/utils.go new file mode 100644 index 00000000000..ec0879c015f --- /dev/null +++ b/pkg/client/controller/applyconfiguration/utils.go @@ -0,0 +1,123 @@ +/* +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 applyconfiguration + +import ( + v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/common/v1beta1" + experimentsv1beta1 "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" + 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" +) + +// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no +// 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=suggestion.kubeflow.org, Version=v1beta1 + case suggestionsv1beta1.SchemeGroupVersion.WithKind("Suggestion"): + return &applyconfigurationsuggestionsv1beta1.SuggestionApplyConfiguration{} + case suggestionsv1beta1.SchemeGroupVersion.WithKind("SuggestionCondition"): + return &applyconfigurationsuggestionsv1beta1.SuggestionConditionApplyConfiguration{} + case suggestionsv1beta1.SchemeGroupVersion.WithKind("SuggestionSpec"): + return &applyconfigurationsuggestionsv1beta1.SuggestionSpecApplyConfiguration{} + case suggestionsv1beta1.SchemeGroupVersion.WithKind("SuggestionStatus"): + return &applyconfigurationsuggestionsv1beta1.SuggestionStatusApplyConfiguration{} + case suggestionsv1beta1.SchemeGroupVersion.WithKind("TrialAssignment"): + return &applyconfigurationsuggestionsv1beta1.TrialAssignmentApplyConfiguration{} + + // Group=trial.kubeflow.org, Version=v1beta1 + case trialsv1beta1.SchemeGroupVersion.WithKind("Trial"): + return &applyconfigurationtrialsv1beta1.TrialApplyConfiguration{} + case trialsv1beta1.SchemeGroupVersion.WithKind("TrialCondition"): + return &applyconfigurationtrialsv1beta1.TrialConditionApplyConfiguration{} + case trialsv1beta1.SchemeGroupVersion.WithKind("TrialSpec"): + return &applyconfigurationtrialsv1beta1.TrialSpecApplyConfiguration{} + case trialsv1beta1.SchemeGroupVersion.WithKind("TrialStatus"): + return &applyconfigurationtrialsv1beta1.TrialStatusApplyConfiguration{} + + } + return nil +} diff --git a/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/experiment.go b/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/experiment.go index 1e094381008..7caadab206b 100644 --- a/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/experiment.go +++ b/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/experiment.go @@ -20,9 +20,12 @@ package v1beta1 import ( "context" + json "encoding/json" + "fmt" "time" v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" + experimentsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/experiments/v1beta1" scheme "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -47,6 +50,8 @@ type ExperimentInterface interface { List(ctx context.Context, opts v1.ListOptions) (*v1beta1.ExperimentList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Experiment, err error) + Apply(ctx context.Context, experiment *experimentsv1beta1.ExperimentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Experiment, err error) + ApplyStatus(ctx context.Context, experiment *experimentsv1beta1.ExperimentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Experiment, err error) ExperimentExpansion } @@ -193,3 +198,59 @@ func (c *experiments) Patch(ctx context.Context, name string, pt types.PatchType Into(result) return } + +// Apply takes the given apply declarative configuration, applies it and returns the applied experiment. +func (c *experiments) Apply(ctx context.Context, experiment *experimentsv1beta1.ExperimentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Experiment, err error) { + if experiment == nil { + return nil, fmt.Errorf("experiment provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(experiment) + if err != nil { + return nil, err + } + name := experiment.Name + if name == nil { + return nil, fmt.Errorf("experiment.Name must be provided to Apply") + } + result = &v1beta1.Experiment{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("experiments"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *experiments) ApplyStatus(ctx context.Context, experiment *experimentsv1beta1.ExperimentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Experiment, err error) { + if experiment == nil { + return nil, fmt.Errorf("experiment provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(experiment) + if err != nil { + return nil, err + } + + name := experiment.Name + if name == nil { + return nil, fmt.Errorf("experiment.Name must be provided to Apply") + } + + result = &v1beta1.Experiment{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("experiments"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/fake/fake_experiment.go b/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/fake/fake_experiment.go index 8d833f749bf..19a06ee8b41 100644 --- a/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/fake/fake_experiment.go +++ b/pkg/client/controller/clientset/versioned/typed/experiments/v1beta1/fake/fake_experiment.go @@ -20,11 +20,13 @@ package fake import ( "context" + json "encoding/json" + "fmt" v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/experiments/v1beta1" + experimentsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/experiments/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +38,9 @@ type FakeExperiments struct { ns string } -var experimentsResource = schema.GroupVersionResource{Group: "experiment.kubeflow.org", Version: "v1beta1", Resource: "experiments"} +var experimentsResource = v1beta1.SchemeGroupVersion.WithResource("experiments") -var experimentsKind = schema.GroupVersionKind{Group: "experiment.kubeflow.org", Version: "v1beta1", Kind: "Experiment"} +var experimentsKind = v1beta1.SchemeGroupVersion.WithKind("Experiment") // Get takes name of the experiment, and returns the corresponding experiment object, and an error if there is any. func (c *FakeExperiments) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Experiment, err error) { @@ -140,3 +142,48 @@ func (c *FakeExperiments) Patch(ctx context.Context, name string, pt types.Patch } return obj.(*v1beta1.Experiment), err } + +// Apply takes the given apply declarative configuration, applies it and returns the applied experiment. +func (c *FakeExperiments) Apply(ctx context.Context, experiment *experimentsv1beta1.ExperimentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Experiment, err error) { + if experiment == nil { + return nil, fmt.Errorf("experiment provided to Apply must not be nil") + } + data, err := json.Marshal(experiment) + if err != nil { + return nil, err + } + name := experiment.Name + if name == nil { + return nil, fmt.Errorf("experiment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(experimentsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Experiment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Experiment), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeExperiments) ApplyStatus(ctx context.Context, experiment *experimentsv1beta1.ExperimentApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Experiment, err error) { + if experiment == nil { + return nil, fmt.Errorf("experiment provided to Apply must not be nil") + } + data, err := json.Marshal(experiment) + if err != nil { + return nil, err + } + name := experiment.Name + if name == nil { + return nil, fmt.Errorf("experiment.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(experimentsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Experiment{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Experiment), err +} diff --git a/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/fake/fake_suggestion.go b/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/fake/fake_suggestion.go index 4e7ac63cd99..e42b830f944 100644 --- a/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/fake/fake_suggestion.go +++ b/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/fake/fake_suggestion.go @@ -20,11 +20,13 @@ package fake import ( "context" + json "encoding/json" + "fmt" v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1" + suggestionsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/suggestions/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +38,9 @@ type FakeSuggestions struct { ns string } -var suggestionsResource = schema.GroupVersionResource{Group: "suggestion.kubeflow.org", Version: "v1beta1", Resource: "suggestions"} +var suggestionsResource = v1beta1.SchemeGroupVersion.WithResource("suggestions") -var suggestionsKind = schema.GroupVersionKind{Group: "suggestion.kubeflow.org", Version: "v1beta1", Kind: "Suggestion"} +var suggestionsKind = v1beta1.SchemeGroupVersion.WithKind("Suggestion") // Get takes name of the suggestion, and returns the corresponding suggestion object, and an error if there is any. func (c *FakeSuggestions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Suggestion, err error) { @@ -140,3 +142,48 @@ func (c *FakeSuggestions) Patch(ctx context.Context, name string, pt types.Patch } return obj.(*v1beta1.Suggestion), err } + +// Apply takes the given apply declarative configuration, applies it and returns the applied suggestion. +func (c *FakeSuggestions) Apply(ctx context.Context, suggestion *suggestionsv1beta1.SuggestionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Suggestion, err error) { + if suggestion == nil { + return nil, fmt.Errorf("suggestion provided to Apply must not be nil") + } + data, err := json.Marshal(suggestion) + if err != nil { + return nil, err + } + name := suggestion.Name + if name == nil { + return nil, fmt.Errorf("suggestion.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(suggestionsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Suggestion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Suggestion), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeSuggestions) ApplyStatus(ctx context.Context, suggestion *suggestionsv1beta1.SuggestionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Suggestion, err error) { + if suggestion == nil { + return nil, fmt.Errorf("suggestion provided to Apply must not be nil") + } + data, err := json.Marshal(suggestion) + if err != nil { + return nil, err + } + name := suggestion.Name + if name == nil { + return nil, fmt.Errorf("suggestion.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(suggestionsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Suggestion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Suggestion), err +} diff --git a/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/suggestion.go b/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/suggestion.go index e4b41546849..6c3e0d88f20 100644 --- a/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/suggestion.go +++ b/pkg/client/controller/clientset/versioned/typed/suggestions/v1beta1/suggestion.go @@ -20,9 +20,12 @@ package v1beta1 import ( "context" + json "encoding/json" + "fmt" "time" v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/suggestions/v1beta1" + suggestionsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/suggestions/v1beta1" scheme "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -47,6 +50,8 @@ type SuggestionInterface interface { List(ctx context.Context, opts v1.ListOptions) (*v1beta1.SuggestionList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Suggestion, err error) + Apply(ctx context.Context, suggestion *suggestionsv1beta1.SuggestionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Suggestion, err error) + ApplyStatus(ctx context.Context, suggestion *suggestionsv1beta1.SuggestionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Suggestion, err error) SuggestionExpansion } @@ -193,3 +198,59 @@ func (c *suggestions) Patch(ctx context.Context, name string, pt types.PatchType Into(result) return } + +// Apply takes the given apply declarative configuration, applies it and returns the applied suggestion. +func (c *suggestions) Apply(ctx context.Context, suggestion *suggestionsv1beta1.SuggestionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Suggestion, err error) { + if suggestion == nil { + return nil, fmt.Errorf("suggestion provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(suggestion) + if err != nil { + return nil, err + } + name := suggestion.Name + if name == nil { + return nil, fmt.Errorf("suggestion.Name must be provided to Apply") + } + result = &v1beta1.Suggestion{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("suggestions"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *suggestions) ApplyStatus(ctx context.Context, suggestion *suggestionsv1beta1.SuggestionApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Suggestion, err error) { + if suggestion == nil { + return nil, fmt.Errorf("suggestion provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(suggestion) + if err != nil { + return nil, err + } + + name := suggestion.Name + if name == nil { + return nil, fmt.Errorf("suggestion.Name must be provided to Apply") + } + + result = &v1beta1.Suggestion{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("suggestions"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/fake/fake_trial.go b/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/fake/fake_trial.go index c03b94f8444..5b2243cd82a 100644 --- a/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/fake/fake_trial.go +++ b/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/fake/fake_trial.go @@ -20,11 +20,13 @@ package fake import ( "context" + json "encoding/json" + "fmt" v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1" + trialsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/trials/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +38,9 @@ type FakeTrials struct { ns string } -var trialsResource = schema.GroupVersionResource{Group: "trial.kubeflow.org", Version: "v1beta1", Resource: "trials"} +var trialsResource = v1beta1.SchemeGroupVersion.WithResource("trials") -var trialsKind = schema.GroupVersionKind{Group: "trial.kubeflow.org", Version: "v1beta1", Kind: "Trial"} +var trialsKind = v1beta1.SchemeGroupVersion.WithKind("Trial") // Get takes name of the trial, and returns the corresponding trial object, and an error if there is any. func (c *FakeTrials) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Trial, err error) { @@ -140,3 +142,48 @@ func (c *FakeTrials) Patch(ctx context.Context, name string, pt types.PatchType, } return obj.(*v1beta1.Trial), err } + +// Apply takes the given apply declarative configuration, applies it and returns the applied trial. +func (c *FakeTrials) Apply(ctx context.Context, trial *trialsv1beta1.TrialApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Trial, err error) { + if trial == nil { + return nil, fmt.Errorf("trial provided to Apply must not be nil") + } + data, err := json.Marshal(trial) + if err != nil { + return nil, err + } + name := trial.Name + if name == nil { + return nil, fmt.Errorf("trial.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(trialsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Trial{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Trial), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeTrials) ApplyStatus(ctx context.Context, trial *trialsv1beta1.TrialApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Trial, err error) { + if trial == nil { + return nil, fmt.Errorf("trial provided to Apply must not be nil") + } + data, err := json.Marshal(trial) + if err != nil { + return nil, err + } + name := trial.Name + if name == nil { + return nil, fmt.Errorf("trial.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(trialsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Trial{}) + + if obj == nil { + return nil, err + } + return obj.(*v1beta1.Trial), err +} diff --git a/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/trial.go b/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/trial.go index 5e8ba20c2b7..1ff49ee5163 100644 --- a/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/trial.go +++ b/pkg/client/controller/clientset/versioned/typed/trials/v1beta1/trial.go @@ -20,9 +20,12 @@ package v1beta1 import ( "context" + json "encoding/json" + "fmt" "time" v1beta1 "github.com/kubeflow/katib/pkg/apis/controller/trials/v1beta1" + trialsv1beta1 "github.com/kubeflow/katib/pkg/client/controller/applyconfiguration/trials/v1beta1" scheme "github.com/kubeflow/katib/pkg/client/controller/clientset/versioned/scheme" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" @@ -47,6 +50,8 @@ type TrialInterface interface { List(ctx context.Context, opts v1.ListOptions) (*v1beta1.TrialList, error) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Trial, err error) + Apply(ctx context.Context, trial *trialsv1beta1.TrialApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Trial, err error) + ApplyStatus(ctx context.Context, trial *trialsv1beta1.TrialApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Trial, err error) TrialExpansion } @@ -193,3 +198,59 @@ func (c *trials) Patch(ctx context.Context, name string, pt types.PatchType, dat Into(result) return } + +// Apply takes the given apply declarative configuration, applies it and returns the applied trial. +func (c *trials) Apply(ctx context.Context, trial *trialsv1beta1.TrialApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Trial, err error) { + if trial == nil { + return nil, fmt.Errorf("trial provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(trial) + if err != nil { + return nil, err + } + name := trial.Name + if name == nil { + return nil, fmt.Errorf("trial.Name must be provided to Apply") + } + result = &v1beta1.Trial{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("trials"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *trials) ApplyStatus(ctx context.Context, trial *trialsv1beta1.TrialApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Trial, err error) { + if trial == nil { + return nil, fmt.Errorf("trial provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(trial) + if err != nil { + return nil, err + } + + name := trial.Name + if name == nil { + return nil, fmt.Errorf("trial.Name must be provided to Apply") + } + + result = &v1beta1.Trial{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("trials"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/controller.v1beta1/experiment/experiment_controller.go b/pkg/controller.v1beta1/experiment/experiment_controller.go index 92b95b9c810..8e7fea16a87 100644 --- a/pkg/controller.v1beta1/experiment/experiment_controller.go +++ b/pkg/controller.v1beta1/experiment/experiment_controller.go @@ -114,33 +114,19 @@ 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{Type: &experimentsv1beta1.Experiment{}}, &handler.EnqueueRequestForObject{}) + err := c.Watch(source.Kind(mgr.GetCache(), &experimentsv1beta1.Experiment{}), &handler.EnqueueRequestForObject{}) if err != nil { log.Error(err, "Experiment watch failed") return err } // Watch for trials for the experiments - err = c.Watch( - &source.Kind{Type: &trialsv1beta1.Trial{}}, - &handler.EnqueueRequestForOwner{ - IsController: true, - OwnerType: &experimentsv1beta1.Experiment{}, - }) - - if err != nil { + eventHandler := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &experimentsv1beta1.Experiment{}, handler.OnlyControllerOwner()) + if err = c.Watch(source.Kind(mgr.GetCache(), &trialsv1beta1.Trial{}), eventHandler); err != nil { log.Error(err, "Trial watch failed") return err } - - err = c.Watch( - &source.Kind{Type: &suggestionsv1beta1.Suggestion{}}, - &handler.EnqueueRequestForOwner{ - IsController: true, - OwnerType: &experimentsv1beta1.Experiment{}, - }) - - if err != nil { + if err = c.Watch(source.Kind(mgr.GetCache(), &suggestionsv1beta1.Suggestion{}), eventHandler); 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 2d555587517..dce70104d30 100644 --- a/pkg/controller.v1beta1/suggestion/suggestion_controller.go +++ b/pkg/controller.v1beta1/suggestion/suggestion_controller.go @@ -75,32 +75,18 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { return err } - err = c.Watch(&source.Kind{Type: &suggestionsv1beta1.Suggestion{}}, &handler.EnqueueRequestForObject{}) - if err != nil { + if err = c.Watch(source.Kind(mgr.GetCache(), &suggestionsv1beta1.Suggestion{}), &handler.EnqueueRequestForObject{}); err != nil { return err } - err = c.Watch(&source.Kind{Type: &appsv1.Deployment{}}, &handler.EnqueueRequestForOwner{ - IsController: true, - OwnerType: &suggestionsv1beta1.Suggestion{}, - }) - if err != nil { + eventHandler := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &suggestionsv1beta1.Suggestion{}, handler.OnlyControllerOwner()) + if err = c.Watch(source.Kind(mgr.GetCache(), &appsv1.Deployment{}), eventHandler); err != nil { return err } - - err = c.Watch(&source.Kind{Type: &corev1.Service{}}, &handler.EnqueueRequestForOwner{ - IsController: true, - OwnerType: &suggestionsv1beta1.Suggestion{}, - }) - if err != nil { + if err = c.Watch(source.Kind(mgr.GetCache(), &corev1.Service{}), eventHandler); err != nil { return err } - - err = c.Watch(&source.Kind{Type: &corev1.PersistentVolumeClaim{}}, &handler.EnqueueRequestForOwner{ - IsController: true, - OwnerType: &suggestionsv1beta1.Suggestion{}, - }) - if err != nil { + if err = c.Watch(source.Kind(mgr.GetCache(), &corev1.PersistentVolumeClaim{}), eventHandler); err != nil { return err } diff --git a/pkg/controller.v1beta1/trial/trial_controller.go b/pkg/controller.v1beta1/trial/trial_controller.go index 2245bb16cfa..fc5d91496ab 100644 --- a/pkg/controller.v1beta1/trial/trial_controller.go +++ b/pkg/controller.v1beta1/trial/trial_controller.go @@ -88,8 +88,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch for changes in Trial - err = c.Watch(&source.Kind{Type: &trialsv1beta1.Trial{}}, &handler.EnqueueRequestForObject{}) - if err != nil { + if err = c.Watch(source.Kind(mgr.GetCache(), &trialsv1beta1.Trial{}), &handler.EnqueueRequestForObject{}); err != nil { log.Error(err, "Trial watch error") return err } @@ -114,13 +113,8 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { // Watch for the CRD changes. unstructuredJob := &unstructured.Unstructured{} unstructuredJob.SetGroupVersionKind(gvk) - err = c.Watch( - &source.Kind{Type: unstructuredJob}, - &handler.EnqueueRequestForOwner{ - IsController: true, - OwnerType: &trialsv1beta1.Trial{}, - }) - if err != nil { + eventHandler := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &trialsv1beta1.Trial{}, handler.OnlyControllerOwner()) + if err = c.Watch(source.Kind(mgr.GetCache(), unstructuredJob), eventHandler); err != nil { return err } log.Info("Job watch added successfully", diff --git a/pkg/controller.v1beta1/trial/trial_controller_suite_test.go b/pkg/controller.v1beta1/trial/trial_controller_suite_test.go index 9db1de4ac9d..ec27d99e9c2 100644 --- a/pkg/controller.v1beta1/trial/trial_controller_suite_test.go +++ b/pkg/controller.v1beta1/trial/trial_controller_suite_test.go @@ -51,6 +51,7 @@ func TestMain(m *testing.M) { ControlPlaneStopTimeout: controlPlaneStopTimeout, CRDDirectoryPaths: []string{ filepath.Join("..", "..", "..", "manifests", "v1beta1", "components", "crd"), + filepath.Join("..", "..", "..", "dep-crds", "training-operator"), }, } var err error diff --git a/pkg/webhook/v1beta1/webhook.go b/pkg/webhook/v1beta1/webhook.go index e5ac6e607de..86a0583b063 100644 --- a/pkg/webhook/v1beta1/webhook.go +++ b/pkg/webhook/v1beta1/webhook.go @@ -28,10 +28,11 @@ import ( func AddToManager(mgr manager.Manager, port int) error { // Create a webhook server. - hookServer := &webhook.Server{ + + hookServer := webhook.NewServer(webhook.Options{ Port: port, CertDir: "/tmp/cert", - } + }) if err := mgr.Add(hookServer); err != nil { return fmt.Errorf("Add webhook server to the manager failed: %v", err) }