From 046961de0af65f20a61c569888952dea4256bd36 Mon Sep 17 00:00:00 2001 From: Yue Yang Date: Fri, 8 Jul 2022 18:37:39 +0800 Subject: [PATCH] feat: update API requests with OpenAPI generated client (#2926) * feat: OpenAPI to TypeScript API Client and Forms Signed-off-by: Yue Yang * fix: license checker Signed-off-by: Yue Yang * fix: go (verify) Signed-off-by: Yue Yang * chore: add comments Signed-off-by: Yue Yang * chore: reuse kubebuilder marks Signed-off-by: Yue Yang * chore: update according to RFC Signed-off-by: Yue Yang * chore: prevent ui:form appearing in crds Signed-off-by: Yue Yang * fix: add missing actions Signed-off-by: Yue Yang * chore: update lockfile Signed-off-by: Yue Yang * chore: support PhysicalMachineChaos Signed-off-by: Yue Yang * chore: merge commands into codegen Signed-off-by: Yue Yang * fix: license checker Signed-off-by: Yue Yang * fix: ci Signed-off-by: Yue Yang * fix: supplement another ignore check Signed-off-by: Yue Yang * chore: update package info Signed-off-by: Yue Yang * chore: update README Signed-off-by: Yue Yang * chore: update Signed-off-by: Yue Yang * chore: gen HTTPChaos Signed-off-by: Yue Yang * chore: update changelog Signed-off-by: Yue Yang * fix: remove nested ignores Signed-off-by: Yue Yang * fix: remove remaining markers Signed-off-by: Yue Yang * fix: typo Signed-off-by: Yue Yang * fix: supplement comments Signed-off-by: Yue Yang * feat: update API requests with OpenAPI generated Signed-off-by: Yue Yang * fix: ci Signed-off-by: Yue Yang * fix: swag Signed-off-by: Yue Yang * chore: update Signed-off-by: Yue Yang * chore: update Signed-off-by: Yue Yang * chore: update Signed-off-by: Yue Yang * chore: upgrade swag to v1.8.3 Signed-off-by: Yue Yang * chore: update CHANGELOG Signed-off-by: Yue Yang * fix: update dev-env Signed-off-by: Yue Yang * fix: update swag init Signed-off-by: Yue Yang * test: transform auto-bind Signed-off-by: Yue Yang * fix: pass the right params Signed-off-by: Yue Yang * fix: follow the revive suggestion Signed-off-by: Yue Yang * fix: go mod Signed-off-by: Yue Yang * fix: #3386 Signed-off-by: Yue Yang * chore: go mod tidy Signed-off-by: Yue Yang * fix(ci): make tidy Signed-off-by: Yue Yang --- CHANGELOG.md | 1 + Makefile | 4 +- cmd/chaos-dashboard/main.go | 2 +- e2e-test/go.mod | 16 +- e2e-test/go.sum | 23 +- go.mod | 45 +- go.sum | 141 +- hack/generate_swagger_spec.sh | 2 +- images/dev-env/Dockerfile | 4 +- pkg/dashboard/apiserver/archive/archive.go | 88 +- .../apiserver/archive/archive_test.go | 35 +- pkg/dashboard/apiserver/common/common.go | 121 +- pkg/dashboard/apiserver/event/event.go | 14 +- .../apiserver/experiment/experiment.go | 80 +- pkg/dashboard/apiserver/schedule/schedule.go | 76 +- pkg/dashboard/apiserver/template/template.go | 72 +- pkg/dashboard/apiserver/types/types.go | 109 + pkg/dashboard/apiserver/utils/gin.go | 3 + pkg/dashboard/apiserver/workflow/workflow.go | 11 +- pkg/dashboard/swaggerdocs/docs.go | 2547 +++++++-- pkg/dashboard/swaggerdocs/placeholder.go | 6 +- pkg/dashboard/swaggerdocs/swagger.json | 2488 ++++++++- pkg/dashboard/swaggerdocs/swagger.yaml | 3408 +++++++++++- ui/app/package.json | 6 +- ui/app/src/@types/mui.d.ts | 1 - ui/app/src/api/archives.ts | 32 - ui/app/src/api/archives.type.ts | 25 - ui/app/src/api/auth.ts | 3 +- ui/app/src/api/common.ts | 50 - ui/app/src/api/common.type.ts | 28 - ui/app/src/api/events.ts | 31 - ui/app/src/api/events.type.ts | 36 - ui/app/src/api/experiments.ts | 47 - ui/app/src/api/experiments.type.ts | 40 - ui/app/src/api/http.ts | 5 +- ui/app/src/api/index.ts | 67 +- ui/app/src/api/schedules.ts | 51 - ui/app/src/api/schedules.type.ts | 28 - ui/app/src/api/workflows.ts | 29 +- ui/app/src/components/AutoForm/data.ts | 1 - ui/app/src/components/DataTable/index.tsx | 4 +- ui/app/src/components/EventsChart/index.tsx | 5 +- ui/app/src/components/EventsTable/index.tsx | 23 +- .../src/components/EventsTimeline/index.tsx | 11 +- .../src/components/FormField/LabelField.tsx | 1 - .../src/components/FormField/SelectField.tsx | 2 +- ui/app/src/components/FormField/Submit.tsx | 3 +- ui/app/src/components/FormField/TextField.tsx | 2 +- .../components/FormField/TextTextField.tsx | 10 +- ui/app/src/components/FormikEffect/index.tsx | 3 +- ui/app/src/components/MoreOptions/index.tsx | 8 +- .../NewExperimentNext/LoadFrom/RadioLabel.tsx | 2 - .../NewExperimentNext/LoadFrom/index.test.tsx | 10 +- .../NewExperimentNext/LoadFrom/index.tsx | 47 +- .../components/NewExperimentNext/Step3.tsx | 4 +- .../NewExperimentNext/data/basic.ts | 2 +- .../NewExperimentNext/form/Kernel.tsx | 11 +- .../form/TargetGenerated.tsx | 18 +- ui/app/src/components/NewWorkflow/index.tsx | 52 +- .../NewWorkflowNext/SubmitWorkflow.tsx | 2 +- ui/app/src/components/NotFound/index.tsx | 3 +- .../components/ObjectConfiguration/index.tsx | 22 +- .../src/components/ObjectListItem/index.tsx | 33 +- ui/app/src/components/RBACGenerator/index.tsx | 10 +- ui/app/src/components/Schedule/types.tsx | 5 +- ui/app/src/components/Scope/Mode.tsx | 3 +- .../src/components/Scope/ScopePodsTable.tsx | 9 +- ui/app/src/components/Scope/index.test.tsx | 6 +- ui/app/src/components/Search/index.tsx | 50 +- ui/app/src/components/StatusLabel/index.tsx | 2 +- ui/app/src/components/T/index.tsx | 1 - ui/app/src/components/Token/index.tsx | 3 +- .../src/components/TopContainer/Namespace.tsx | 12 +- ui/app/src/components/TopContainer/Navbar.tsx | 11 +- .../src/components/TopContainer/Sidebar.tsx | 27 +- ui/app/src/components/TopContainer/index.tsx | 2 +- ui/app/src/formik/JVMChaos.ts | 35 +- ui/app/src/formik/PhysicalMachineChaos.ts | 8 +- ui/app/src/formik/actions.ts | 2 +- ui/app/src/lib/cytoscape.ts | 5 +- ui/app/src/lib/d3/eventsChart.tsx | 29 +- ui/app/src/lib/hooks.ts | 2 - ui/app/src/lib/luxon.ts | 1 - ui/app/src/lib/search.ts | 17 +- ui/app/src/openapi/api.ts | 4868 +++++++++++++++-- ui/app/src/openapi/base.ts | 5 +- ui/app/src/openapi/common.ts | 7 +- ui/app/src/openapi/configuration.ts | 2 +- ui/app/src/openapi/index.ts | 2 +- ui/app/src/pages/Archives/Single.tsx | 25 +- ui/app/src/pages/Archives/index.tsx | 66 +- ui/app/src/pages/Dashboard/Predefined.tsx | 5 +- ui/app/src/pages/Dashboard/TotalStatus.tsx | 9 +- ui/app/src/pages/Dashboard/Welcome.tsx | 14 +- ui/app/src/pages/Dashboard/index.tsx | 48 +- ui/app/src/pages/Events/index.tsx | 6 +- ui/app/src/pages/Experiments/Single.tsx | 21 +- ui/app/src/pages/Experiments/index.tsx | 55 +- ui/app/src/pages/Schedules/New.tsx | 3 +- ui/app/src/pages/Schedules/Single.tsx | 21 +- ui/app/src/pages/Schedules/index.tsx | 54 +- ui/app/src/pages/Settings/Token.tsx | 19 +- ui/app/src/pages/Settings/index.tsx | 18 +- ui/app/src/pages/Workflows/Single.tsx | 28 +- ui/app/src/pages/Workflows/index.tsx | 29 +- ui/app/src/slices/experiments.ts | 31 +- ui/app/src/slices/globalStatus.ts | 18 +- ui/app/src/slices/settings.ts | 2 +- ui/app/src/slices/workflows.ts | 1 - ui/app/src/theme.ts | 2 - .../mui-extends/.storybook/ThemeProvider.jsx | 3 - .../mui-extends/.storybook/ThemeProvider.tsx | 3 - .../mui-extends/.storybook/preview.jsx | 1 + ui/packages/mui-extends/src/@types/mui.d.ts | 1 - .../mui-extends/src/Checkbox/index.tsx | 3 +- .../mui-extends/src/ConfirmDialog/index.tsx | 1 - .../mui-extends/src/OutlinedInput/index.tsx | 2 - ui/packages/mui-extends/src/Paper/index.tsx | 1 - .../mui-extends/src/PaperTop/index.tsx | 3 +- .../mui-extends/src/SelectField/index.tsx | 1 - ui/packages/mui-extends/src/Space/index.tsx | 1 - .../mui-extends/src/TextField/index.tsx | 1 - .../form/AutocompleteField.stories.tsx | 3 +- .../stories/form/Checkbox.stories.tsx | 3 +- .../stories/form/TextField.stories.tsx | 3 +- ui/packages/openapi/factory.js | 3 +- ui/packages/openapi/factory.test.js | 3 +- ui/packages/openapi/index.js | 13 +- ui/packages/openapi/openapiconfig.json | 3 +- ui/yarn.lock | 5 + 130 files changed, 13058 insertions(+), 2652 deletions(-) create mode 100644 pkg/dashboard/apiserver/types/types.go delete mode 100644 ui/app/src/api/archives.ts delete mode 100644 ui/app/src/api/archives.type.ts delete mode 100644 ui/app/src/api/common.ts delete mode 100644 ui/app/src/api/common.type.ts delete mode 100644 ui/app/src/api/events.ts delete mode 100644 ui/app/src/api/events.type.ts delete mode 100644 ui/app/src/api/experiments.ts delete mode 100644 ui/app/src/api/experiments.type.ts delete mode 100644 ui/app/src/api/schedules.ts delete mode 100644 ui/app/src/api/schedules.type.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index ad54cce455..ba35df6b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/ - Helm charts: Relax allowedHostPaths in chaos-daemon PSP [#3350](https://github.com/chaos-mesh/chaos-mesh/pull/3350) - Run build image ci on self-hosted machine [#3429](https://github.com/chaos-mesh/chaos-mesh/pull/3429) - Simplified logic and add test case about finalizers. [#3422](https://github.com/chaos-mesh/chaos-mesh/pull/3422) +- Update API requests with OpenAPI generated client [#2926](https://github.com/chaos-mesh/chaos-mesh/pull/2926) ### Deprecated diff --git a/Makefile b/Makefile index bd1de3307b..7acbe83d15 100644 --- a/Makefile +++ b/Makefile @@ -356,9 +356,9 @@ install.sh: SHELL:=$(RUN_IN_DEV_SHELL) install.sh: images/dev-env/.dockerbuilt ./hack/update_install_script.sh -swagger_spec:SHELL:=$(RUN_IN_DEV_SHELL) +swagger_spec: SHELL:=$(RUN_IN_DEV_SHELL) swagger_spec: images/dev-env/.dockerbuilt - swag init -g cmd/chaos-dashboard/main.go --output pkg/dashboard/swaggerdocs + swag init -g cmd/chaos-dashboard/main.go --output pkg/dashboard/swaggerdocs --pd --parseInternal .PHONY: all clean test install manifests groupimports fmt vet tidy image \ docker-push lint generate config \ diff --git a/cmd/chaos-dashboard/main.go b/cmd/chaos-dashboard/main.go index c65b3332ae..90572b22e0 100644 --- a/cmd/chaos-dashboard/main.go +++ b/cmd/chaos-dashboard/main.go @@ -39,7 +39,7 @@ import ( ) // @title Chaos Mesh Dashboard API -// @version 2.0 +// @version 2.2 // @description Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report. // @contact.name GitHub Issues diff --git a/e2e-test/go.mod b/e2e-test/go.mod index 9e4d03f5d4..b4b91b61bf 100644 --- a/e2e-test/go.mod +++ b/e2e-test/go.mod @@ -29,8 +29,6 @@ require ( github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect @@ -49,8 +47,8 @@ require ( github.com/go-logr/logr v1.2.0 // indirect github.com/go-logr/zapr v1.2.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.5 // indirect - github.com/go-openapi/swag v0.19.14 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/swag v0.21.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -68,7 +66,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect - github.com/mailru/easyjson v0.7.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/moby/spdystream v0.2.0 // indirect @@ -89,7 +87,7 @@ require ( github.com/russross/blackfriday v1.5.2 // indirect github.com/spf13/cobra v1.2.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.7.0 // indirect + github.com/stretchr/testify v1.7.2 // indirect github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect go.opentelemetry.io/contrib v0.20.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0 // indirect @@ -106,7 +104,7 @@ require ( go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect - golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect + golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect @@ -116,11 +114,11 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect google.golang.org/grpc v1.40.0 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiserver v0.23.1 // indirect k8s.io/component-helpers v0.23.1 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect diff --git a/e2e-test/go.sum b/e2e-test/go.sum index 3b6973f401..382871db6f 100644 --- a/e2e-test/go.sum +++ b/e2e-test/go.sum @@ -77,9 +77,7 @@ github.com/Microsoft/hcsshim v0.8.22/go.mod h1:91uVCVzvX2QD16sMCenoxxXo6L1wJnLMX github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -242,11 +240,13 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 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/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +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/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.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-ozzo/ozzo-validation v3.5.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= 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/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= @@ -438,8 +438,9 @@ 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 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= 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/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -613,8 +614,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -804,8 +806,9 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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= @@ -1121,8 +1124,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1154,8 +1158,9 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= diff --git a/go.mod b/go.mod index a7cc8a139b..9a1fa661d3 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/Azure/go-autorest/autorest/azure/auth v0.5.11 github.com/Azure/go-autorest/autorest/to v0.4.0 github.com/DATA-DOG/go-sqlmock v1.5.0 - github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 github.com/antonmedv/expr v1.8.9 github.com/aws/aws-sdk-go-v2 v1.3.2 github.com/aws/aws-sdk-go-v2/config v1.1.1 @@ -25,10 +24,10 @@ require ( github.com/fatih/color v1.9.0 github.com/ghodss/yaml v1.0.0 github.com/gin-contrib/pprof v1.3.0 - github.com/gin-gonic/gin v1.7.2 + github.com/gin-gonic/gin v1.8.1 github.com/go-logr/logr v1.2.0 github.com/go-logr/zapr v1.2.0 - github.com/go-playground/validator/v10 v10.4.1 + github.com/go-playground/validator/v10 v10.11.0 github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.2.0 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 @@ -57,10 +56,10 @@ require ( github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd github.com/spf13/cobra v1.2.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.7.0 - github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 - github.com/swaggo/gin-swagger v1.2.0 - github.com/swaggo/swag v1.6.7 + github.com/stretchr/testify v1.7.2 + github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe + github.com/swaggo/gin-swagger v1.5.0 + github.com/swaggo/swag v1.8.3 github.com/vektah/gqlparser/v2 v2.4.1 github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 go.uber.org/fx v1.17.1 @@ -71,11 +70,11 @@ require ( golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac - golang.org/x/tools v0.1.11-0.20220322213029-87a8611856c1 + golang.org/x/tools v0.1.11 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.46.0 google.golang.org/grpc v1.40.0 - google.golang.org/protobuf v1.27.1 + google.golang.org/protobuf v1.28.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.23.1 k8s.io/apimachinery v0.23.1 @@ -105,8 +104,6 @@ require ( github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect github.com/Microsoft/go-winio v0.5.0 // indirect github.com/Microsoft/hcsshim v0.8.23 // indirect - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2 // indirect @@ -142,15 +139,16 @@ require ( github.com/go-errors/errors v1.0.1 // 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.19.5 // indirect - github.com/go-openapi/spec v0.19.5 // indirect - github.com/go-openapi/swag v0.19.14 // indirect - github.com/go-playground/locales v0.13.0 // indirect - github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/spec v0.20.6 // indirect + github.com/go-openapi/swag v0.21.1 // indirect + github.com/go-playground/locales v0.14.0 // indirect + github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-sql-driver/mysql v1.4.1 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/go-test/deep v1.0.8 // indirect github.com/gobuffalo/flect v0.2.0 // indirect + github.com/goccy/go-json v0.9.7 // indirect github.com/godbus/dbus/v5 v5.0.4 // indirect github.com/gogo/googleapis v1.4.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -173,12 +171,12 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.11.13 // indirect github.com/kr/fs v0.1.0 // indirect - github.com/leodido/go-urn v1.2.0 // indirect + github.com/leodido/go-urn v1.2.1 // indirect github.com/lib/pq v1.2.0 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect - github.com/mailru/easyjson v0.7.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.4 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.9 // indirect github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect @@ -199,6 +197,7 @@ require ( github.com/opencontainers/runc v1.0.2 // indirect github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect github.com/opencontainers/selinux v1.8.2 // indirect + github.com/pelletier/go-toml/v2 v2.0.2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pingcap/check v0.0.0-20191216031241-8a5a85928f12 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect @@ -214,7 +213,7 @@ require ( github.com/stretchr/objx v0.2.0 // indirect github.com/tklauser/go-sysconf v0.3.9 // indirect github.com/tklauser/numcpus v0.3.0 // indirect - github.com/ugorji/go/codec v1.1.7 // indirect + github.com/ugorji/go/codec v1.2.7 // indirect github.com/urfave/cli/v2 v2.4.0 // indirect github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect @@ -224,8 +223,8 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/dig v1.14.1 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect + golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect golang.org/x/text v0.3.7 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect @@ -234,7 +233,7 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.23.0 // indirect k8s.io/component-base v0.23.1 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect diff --git a/go.sum b/go.sum index efb2ccbc19..9ca13b15fe 100644 --- a/go.sum +++ b/go.sum @@ -125,22 +125,19 @@ github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:m github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= +github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -480,20 +477,18 @@ github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSy github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/gzip v0.0.1 h1:ezvKOL6jH+jlzdHNE4h9h8q8uMpDQjyl0NN0Jd7jozc= -github.com/gin-contrib/gzip v0.0.1/go.mod h1:fGBJBCdt6qCZuCAOwWuFhBB4OOq9EFqlo5dEaFhhu5w= +github.com/gin-contrib/gzip v0.0.5 h1:mhnVU32YnnBh2LPH2iqRqsA/eR7SAqRaD388jL2s/j0= +github.com/gin-contrib/gzip v0.0.5/go.mod h1:OPIK6HR0Um2vNmBUTlayD7qle4yVVRZT0PyhdUigrKk= github.com/gin-contrib/pprof v1.3.0 h1:G9eK6HnbkSqDZBYbzG4wrjCsA4e+cvYAHUZw6W+W9K0= github.com/gin-contrib/pprof v1.3.0/go.mod h1:waMjT1H9b179t3CxuG1cV3DHpga6ybizwfBaM5OXaB0= -github.com/gin-contrib/sse v0.0.0-20170109093832-22d885f9ecc7/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.3.0/go.mod h1:7cKuhb5qV2ggCFctp2fJQ+ErvciLZrIeoOSOm6mUr7Y= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/gin-gonic/gin v1.6.2/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.2 h1:Tg03T9yM2xa8j6I3Z3oqLaQRSmKvxPd6g/2HJ6zICFA= -github.com/gin-gonic/gin v1.7.2/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= +github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= +github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= +github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= @@ -517,36 +512,35 @@ github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQ github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= 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.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -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/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -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.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/spec v0.19.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.4/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.19.5 h1:Xm0Ao53uqnk9QE/LlYV5DEU09UAgpliA85QoT9LzqPw= -github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +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/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ= +github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= 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.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= +github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= +github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/overalls v0.0.0-20180201144345-22ec1a223b7c/go.mod h1:UqxAgEOt89sCiXlrc/ycnx00LVvUO/eS8tMUkWX4R7w= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= +github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= +github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= +github.com/go-playground/validator/v10 v10.11.0 h1:0W+xRM511GY47Yy3bZUbJVitCNg2BOGlCyvTqsp/xIw= +github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -563,6 +557,8 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/goccy/go-json v0.9.7 h1:IcB+Aqpx/iMHu5Yooh7jEzJk1JZ7Pjtmys2ukPr7EeM= +github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -778,7 +774,6 @@ github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8Hm github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -821,18 +816,19 @@ 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/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leanovate/gopter v0.2.8/go.mod h1:gNcbPWNEWRe4lm+bycKqxUYoH5uoVje5SkOJ3uoLer8= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= +github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= @@ -846,12 +842,12 @@ github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 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 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= 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/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= @@ -864,11 +860,11 @@ github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HN github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= @@ -937,7 +933,6 @@ github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= @@ -1003,6 +998,11 @@ github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= @@ -1010,6 +1010,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.3.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= @@ -1027,6 +1029,7 @@ github.com/pingcap/failpoint v0.0.0-20200210140405-f8f9fb234798/go.mod h1:DNS3Qg github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= github.com/pingcap/log v0.0.0-20200117041106-d28c14d3b1cd h1:CV3VsP3Z02MVtdpTMfEgRJ4T9NGgGTxdHpJerent7rM= github.com/pingcap/log v0.0.0-20200117041106-d28c14d3b1cd/go.mod h1:4rbK1p9ILyIfb6hU7OG2CiWSqMXnp3JMbiaVJ6mvoY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1088,6 +1091,9 @@ github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzG github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/romana/ipset v1.0.0 h1:CELryXKTlypCeW/fqqUee/bBIfwjvFn4jBGnWV+UuOY= github.com/romana/ipset v1.0.0/go.mod h1:AeXLBaoBOJKSqnrqAkmNgoNaF6PjtERU9jijfTA6AV4= github.com/romana/rlog v0.0.0-20171115192701-f018bc92e7d7 h1:jkvpcEatpwuMF5O5LVxTnehj6YZ/aEZN4NWD/Xml4pI= @@ -1175,16 +1181,17 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14 h1:PyYN9JH5jY9j6av01SpfRMb+1DWg/i3MbGOKPxJ2wjM= -github.com/swaggo/files v0.0.0-20190704085106-630677cd5c14/go.mod h1:gxQT6pBGRuIGunNf/+tSOB5OHvguWi8Tbt82WOkf35E= -github.com/swaggo/gin-swagger v1.2.0 h1:YskZXEiv51fjOMTsXrOetAjrMDfFaXD79PEoQBOe2W0= -github.com/swaggo/gin-swagger v1.2.0/go.mod h1:qlH2+W7zXGZkczuL+r2nEBR2JTT+/lX05Nn6vPhc7OI= -github.com/swaggo/swag v1.5.1/go.mod h1:1Bl9F/ZBpVWh22nY0zmYyASPO1lI/zIwRDrpZU+tv8Y= -github.com/swaggo/swag v1.6.7 h1:e8GC2xDllJZr3omJkm9YfmK0Y56+rMO3cg0JBKNz09s= -github.com/swaggo/swag v1.6.7/go.mod h1:xDhTyuFIujYiN3DKWC/H/83xcfHp+UE/IzWWampG7Zc= +github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe h1:K8pHPVoTgxFJt1lXuIzzOX7zZhZFldJQK/CgKx9BFIc= +github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w= +github.com/swaggo/gin-swagger v1.5.0 h1:hlLbxPj6qvbtX2wpbsZuOIlcnPRCUDGccA0zMKVNpME= +github.com/swaggo/gin-swagger v1.5.0/go.mod h1:3mKpZClKx7mnUGsiwJeEkNhnr1VHMkMaTAXIoFYUXrA= +github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ= +github.com/swaggo/swag v1.8.3 h1:3pZSSCQ//gAH88lfmxM3Cd1+JCsxV8Md6f36b9hrZ5s= +github.com/swaggo/swag v1.8.3/go.mod h1:jMLeXOOmYyjk8PvHTsXBdrubsNd9gUJTTCzL5iBnseg= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1200,17 +1207,14 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.5-pre/go.mod h1:FwP/aQVg39TXzItUBMwnWp9T9gPQnXw4Poh4/oBQZ/0= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.5-pre/go.mod h1:tULtS6Gy1AE1yCENaw4Vb//HLH5njI2tfCQDUqRd8fI= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= +github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/cli/v2 v2.4.0 h1:m2pxjjDFgDxSPtO8WSdbndj17Wu2y8vOT86wE/tjr+I= github.com/urfave/cli/v2 v2.4.0/go.mod h1:NX9W0zmTvedE5oDoOMs2RTC8RvdK98NTYZE5LbaEYPg= @@ -1320,7 +1324,6 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1378,12 +1381,11 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 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= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1397,7 +1399,6 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1433,6 +1434,7 @@ golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1440,8 +1442,9 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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= @@ -1477,7 +1480,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1490,7 +1492,6 @@ golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1560,6 +1561,7 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1569,10 +1571,12 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1610,10 +1614,7 @@ golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190611222205-d73e1c7e250b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1668,9 +1669,10 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.11-0.20220322213029-87a8611856c1 h1:7pRxY7wImc7ZuraadLIgpQciyWy5Lca9AfC0wRGeWyE= -golang.org/x/tools v0.1.11-0.20220322213029-87a8611856c1/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11 h1:loJ25fNOEhSXfHrpoGj91eCUThwdNX6u24rO1xnNteY= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1808,8 +1810,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.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/gometalinter.v2 v2.0.12/go.mod h1:NDRytsqEZyolNuAgTzJkZMkSQM7FIKyzVzGhjB/qfYo= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1818,13 +1821,12 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= 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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= @@ -1854,8 +1856,9 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= diff --git a/hack/generate_swagger_spec.sh b/hack/generate_swagger_spec.sh index d23235e6de..d9ad7a7199 100755 --- a/hack/generate_swagger_spec.sh +++ b/hack/generate_swagger_spec.sh @@ -32,7 +32,7 @@ echo "+ Install swaggo/swag" go install github.com/swaggo/swag/cmd/swag echo "+ Generate swagger spec" -swag init -g cmd/chaos-dashboard/main.go --output pkg/dashboard/swaggerdocs +swag init -g cmd/chaos-dashboard/main.go --output pkg/dashboard/swaggerdocs --pd --parseInternal echo "+ Update go mod" go mod tidy diff --git a/images/dev-env/Dockerfile b/images/dev-env/Dockerfile index 12b8db628e..dca89777d5 100644 --- a/images/dev-env/Dockerfile +++ b/images/dev-env/Dockerfile @@ -20,7 +20,7 @@ RUN go install github.com/golang/protobuf/protoc-gen-go@v1.4.2 RUN go install github.com/axw/gocov/gocov@v1.0.0 RUN go install github.com/AlekSi/gocov-xml@v0.0.0-20190121064608-3a14fb1c4737 RUN go install github.com/matm/gocov-html@v0.0.0-20200509184451-71874e2e203b -RUN go install github.com/swaggo/swag/cmd/swag@v1.6.7 +RUN go install github.com/swaggo/swag/cmd/swag@v1.8.3 RUN go install github.com/onsi/ginkgo/ginkgo@v1.16.4 RUN go install github.com/apache/skywalking-eyes/cmd/license-eye@v0.2.0 @@ -34,7 +34,7 @@ ARG HTTP_PROXY ENV http_proxy $HTTP_PROXY ENV https_proxy $HTTPS_PROXY -RUN apt-get update && \ +RUN apt-get update && \ apt-get install unzip git build-essential curl python musl musl-dev python3 -y && \ rm -rf /var/lib/apt/lists/* diff --git a/pkg/dashboard/apiserver/archive/archive.go b/pkg/dashboard/apiserver/archive/archive.go index 215c6483fd..3a7898e384 100644 --- a/pkg/dashboard/apiserver/archive/archive.go +++ b/pkg/dashboard/apiserver/archive/archive.go @@ -30,6 +30,7 @@ import ( "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" config "github.com/chaos-mesh/chaos-mesh/pkg/config/dashboard" + "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/types" u "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/utils" "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/core" ) @@ -82,15 +83,6 @@ func Register(r *gin.RouterGroup, s *Service) { endpoint.DELETE("/workflows", s.batchDeleteWorkflow) } -// Archive defines the basic information of an archive. -type Archive = core.ObjectBase - -// Detail represents an archive instance. -type Detail struct { - Archive - KubeObject core.KubeObjectDesc `json:"kube_object"` -} - // @Summary Get archived chaos experiments. // @Description Get archived chaos experiments. // @Tags archives @@ -98,9 +90,9 @@ type Detail struct { // @Param namespace query string false "namespace" // @Param name query string false "name" // @Param kind query string false "kind" Enums(PodChaos, IOChaos, NetworkChaos, TimeChaos, KernelChaos, StressChaos) -// @Success 200 {array} Archive +// @Success 200 {array} types.Archive // @Router /archives [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) list(c *gin.Context) { kind := c.Query("kind") name := c.Query("name") @@ -117,10 +109,10 @@ func (s *Service) list(c *gin.Context) { return } - archives := make([]Archive, 0) + archives := make([]types.Archive, 0) for _, meta := range metas { - archives = append(archives, Archive{ + archives = append(archives, types.Archive{ UID: meta.UID, Kind: meta.Kind, Namespace: meta.Namespace, @@ -137,9 +129,9 @@ func (s *Service) list(c *gin.Context) { // @Tags archives // @Produce json // @Param uid path string true "the archive uid" -// @Success 200 {object} Detail -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} types.ArchiveDetail +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /archives/{uid} [get] func (s *Service) get(c *gin.Context) { uid := c.Param("uid") @@ -157,8 +149,8 @@ func (s *Service) get(c *gin.Context) { chaos := v1alpha1.AllKinds()[exp.Kind].SpawnObject() _ = json.Unmarshal([]byte(exp.Experiment), chaos) - c.JSON(http.StatusOK, &Detail{ - Archive: Archive{ + c.JSON(http.StatusOK, &types.ArchiveDetail{ + Archive: types.Archive{ UID: exp.UID, Kind: exp.Kind, Name: exp.Name, @@ -186,8 +178,8 @@ func (s *Service) get(c *gin.Context) { // @Tags archives // @Produce json // @Param uid path string true "uid" -// @Success 200 {object} utils.Response -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 500 {object} u.APIError // @Router /archives/{uid} [delete] func (s *Service) delete(c *gin.Context) { var ( @@ -226,8 +218,8 @@ func (s *Service) delete(c *gin.Context) { // @Tags archives // @Produce json // @Param uids query string true "uids" -// @Success 200 {object} utils.Response -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 500 {object} u.APIError // @Router /archives [delete] func (s *Service) batchDelete(c *gin.Context) { var ( @@ -263,9 +255,9 @@ func (s *Service) batchDelete(c *gin.Context) { // @Produce json // @Param namespace query string false "namespace" // @Param name query string false "name" -// @Success 200 {array} Archive +// @Success 200 {array} types.Archive // @Router /archives/schedules [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) listSchedule(c *gin.Context) { name := c.Query("name") ns := c.Query("namespace") @@ -277,10 +269,10 @@ func (s *Service) listSchedule(c *gin.Context) { return } - archives := make([]Archive, 0) + archives := make([]types.Archive, 0) for _, meta := range metas { - archives = append(archives, Archive{ + archives = append(archives, types.Archive{ UID: meta.UID, Kind: meta.Kind, Namespace: meta.Namespace, @@ -297,13 +289,13 @@ func (s *Service) listSchedule(c *gin.Context) { // @Tags archives // @Produce json // @Param uid path string true "uid" -// @Success 200 {object} Detail -// @Failure 500 {object} utils.APIError +// @Success 200 {object} types.ArchiveDetail +// @Failure 500 {object} u.APIError // @Router /archives/schedules/{uid} [get] func (s *Service) detailSchedule(c *gin.Context) { var ( err error - detail Detail + detail types.ArchiveDetail ) uid := c.Param("uid") @@ -332,8 +324,8 @@ func (s *Service) detailSchedule(c *gin.Context) { return } - detail = Detail{ - Archive: Archive{ + detail = types.ArchiveDetail{ + Archive: types.Archive{ UID: exp.UID, Kind: exp.Kind, Name: exp.Name, @@ -363,8 +355,8 @@ func (s *Service) detailSchedule(c *gin.Context) { // @Tags archives // @Produce json // @Param uid path string true "uid" -// @Success 200 {object} utils.Response -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 500 {object} u.APIError // @Router /archives/schedules/{uid} [delete] func (s *Service) deleteSchedule(c *gin.Context) { var ( @@ -403,8 +395,8 @@ func (s *Service) deleteSchedule(c *gin.Context) { // @Tags archives // @Produce json // @Param uids query string true "uids" -// @Success 200 {object} utils.Response -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 500 {object} u.APIError // @Router /archives/schedules [delete] func (s *Service) batchDeleteSchedule(c *gin.Context) { var ( @@ -440,9 +432,9 @@ func (s *Service) batchDeleteSchedule(c *gin.Context) { // @Produce json // @Param namespace query string false "namespace" // @Param name query string false "name" -// @Success 200 {array} Archive +// @Success 200 {array} types.Archive // @Router /archives/workflows [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) listWorkflow(c *gin.Context) { name := c.Query("name") ns := c.Query("namespace") @@ -454,10 +446,10 @@ func (s *Service) listWorkflow(c *gin.Context) { return } - archives := make([]Archive, 0) + archives := make([]types.Archive, 0) for _, meta := range metas { - archives = append(archives, Archive{ + archives = append(archives, types.Archive{ UID: meta.UID, Kind: v1alpha1.KindWorkflow, Namespace: meta.Namespace, @@ -474,13 +466,13 @@ func (s *Service) listWorkflow(c *gin.Context) { // @Tags archives // @Produce json // @Param uid path string true "uid" -// @Success 200 {object} Detail -// @Failure 500 {object} utils.APIError +// @Success 200 {object} types.ArchiveDetail +// @Failure 500 {object} u.APIError // @Router /archives/workflows/{uid} [get] func (s *Service) detailWorkflow(c *gin.Context) { var ( err error - detail Detail + detail types.ArchiveDetail ) uid := c.Param("uid") @@ -509,8 +501,8 @@ func (s *Service) detailWorkflow(c *gin.Context) { return } - detail = Detail{ - Archive: Archive{ + detail = types.ArchiveDetail{ + Archive: types.Archive{ UID: meta.UID, Kind: v1alpha1.KindWorkflow, Name: meta.Name, @@ -540,8 +532,8 @@ func (s *Service) detailWorkflow(c *gin.Context) { // @Tags archives // @Produce json // @Param uid path string true "uid" -// @Success 200 {object} utils.Response -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 500 {object} u.APIError // @Router /archives/workflows/{uid} [delete] func (s *Service) deleteWorkflow(c *gin.Context) { var ( @@ -568,8 +560,8 @@ func (s *Service) deleteWorkflow(c *gin.Context) { // @Tags archives // @Produce json // @Param uids query string true "uids" -// @Success 200 {object} utils.Response -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 500 {object} u.APIError // @Router /archives/workflows [delete] func (s *Service) batchDeleteWorkflow(c *gin.Context) { var ( diff --git a/pkg/dashboard/apiserver/archive/archive_test.go b/pkg/dashboard/apiserver/archive/archive_test.go index e81efa7993..97435953fe 100644 --- a/pkg/dashboard/apiserver/archive/archive_test.go +++ b/pkg/dashboard/apiserver/archive/archive_test.go @@ -34,6 +34,7 @@ import ( "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" config "github.com/chaos-mesh/chaos-mesh/pkg/config/dashboard" + "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/types" "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/core" pkgmock "github.com/chaos-mesh/chaos-mesh/pkg/mock" ) @@ -50,7 +51,7 @@ type MockScheduleStore struct { func TestEvent(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "Archive Suite") + RunSpecs(t, "types.Archive Suite") } func (m *MockExperimentStore) ListMeta(ctx context.Context, kind, namespace, name string, archived bool) ([]*core.ExperimentMeta, error) { @@ -358,7 +359,7 @@ var _ = Describe("event", func() { Context("List", func() { It("success", func() { - response := []Archive{ + response := []types.Archive{ { UID: "testUID", Kind: "testKind", @@ -387,8 +388,8 @@ var _ = Describe("event", func() { Context("Detail", func() { It("testPodChaos", func() { chaos := &v1alpha1.PodChaos{} - response := Detail{ - Archive: Archive{ + response := types.ArchiveDetail{ + Archive: types.Archive{ UID: "testPodChaos", Kind: v1alpha1.KindPodChaos, Namespace: "testNamespace", @@ -420,8 +421,8 @@ var _ = Describe("event", func() { It("testIOChaos", func() { chaos := &v1alpha1.IOChaos{} - response := Detail{ - Archive: Archive{ + response := types.ArchiveDetail{ + Archive: types.Archive{ UID: "testIOChaos", Kind: v1alpha1.KindIOChaos, Namespace: "testNamespace", @@ -453,8 +454,8 @@ var _ = Describe("event", func() { It("testNetworkChaos", func() { chaos := &v1alpha1.NetworkChaos{} - response := Detail{ - Archive: Archive{ + response := types.ArchiveDetail{ + Archive: types.Archive{ UID: "testNetworkChaos", Kind: v1alpha1.KindNetworkChaos, Namespace: "testNamespace", @@ -486,8 +487,8 @@ var _ = Describe("event", func() { It("testTimeChaos", func() { chaos := &v1alpha1.TimeChaos{} - response := Detail{ - Archive: Archive{ + response := types.ArchiveDetail{ + Archive: types.Archive{ UID: "testTimeChaos", Kind: v1alpha1.KindTimeChaos, Namespace: "testNamespace", @@ -519,8 +520,8 @@ var _ = Describe("event", func() { It("testKernelChaos", func() { chaos := &v1alpha1.KernelChaos{} - response := Detail{ - Archive: Archive{ + response := types.ArchiveDetail{ + Archive: types.Archive{ UID: "testKernelChaos", Kind: v1alpha1.KindKernelChaos, Namespace: "testNamespace", @@ -552,8 +553,8 @@ var _ = Describe("event", func() { It("testStressChaos", func() { chaos := &v1alpha1.StressChaos{} - response := Detail{ - Archive: Archive{ + response := types.ArchiveDetail{ + Archive: types.Archive{ UID: "testStressChaos", Kind: v1alpha1.KindStressChaos, Namespace: "testNamespace", @@ -608,7 +609,7 @@ var _ = Describe("event", func() { Context("ListSchedule", func() { It("success", func() { - response := []Archive{ + response := []types.Archive{ { UID: "testUID", Kind: "testKind", @@ -637,8 +638,8 @@ var _ = Describe("event", func() { Context("DetailSchedule", func() { It("testPodChaos", func() { sch := &v1alpha1.Schedule{} - response := Detail{ - Archive: Archive{ + response := types.ArchiveDetail{ + Archive: types.Archive{ UID: "testPodChaos", Kind: v1alpha1.KindPodChaos, Namespace: "testNamespace", diff --git a/pkg/dashboard/apiserver/common/common.go b/pkg/dashboard/apiserver/common/common.go index 961bdec96b..abf87328ce 100644 --- a/pkg/dashboard/apiserver/common/common.go +++ b/pkg/dashboard/apiserver/common/common.go @@ -32,7 +32,8 @@ import ( "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" "github.com/chaos-mesh/chaos-mesh/pkg/clientpool" config "github.com/chaos-mesh/chaos-mesh/pkg/config/dashboard" - "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/utils" + apiservertypes "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/types" + u "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/utils" "github.com/chaos-mesh/chaos-mesh/pkg/selector/physicalmachine" "github.com/chaos-mesh/chaos-mesh/pkg/selector/pod" ) @@ -103,21 +104,6 @@ roleRef: ` ) -// Pod defines the basic information of a pod -type Pod struct { - Name string `json:"name"` - IP string `json:"ip"` - Namespace string `json:"namespace"` - State string `json:"state"` -} - -// PhysicalMachine defines the basic information of a physicalMachine -type PhysicalMachine struct { - Name string `json:"name"` - Namespace string `json:"namespace"` - Address string `json:"address"` -} - // Service defines a handler service for cluster common objects. type Service struct { // this kubeCli use the local token, used for list namespace of the K8s cluster @@ -158,33 +144,33 @@ func Register(r *gin.RouterGroup, s *Service) { // @Tags common // @Produce json // @Param request body v1alpha1.PodSelectorSpec true "Request body" -// @Success 200 {array} Pod +// @Success 200 {array} apiservertypes.Pod +// @Failure 500 {object} u.APIError // @Router /common/pods [post] -// @Failure 500 {object} utils.APIError func (s *Service) listPods(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) if err != nil { - _ = c.Error(utils.ErrBadRequest.WrapWithNoMessage(err)) + _ = c.Error(u.ErrBadRequest.WrapWithNoMessage(err)) return } selector := v1alpha1.PodSelectorSpec{} if err := c.ShouldBindJSON(&selector); err != nil { c.Status(http.StatusBadRequest) - _ = c.Error(utils.ErrBadRequest.WrapWithNoMessage(err)) + _ = c.Error(u.ErrBadRequest.WrapWithNoMessage(err)) return } ctx := context.TODO() filteredPods, err := pod.SelectPods(ctx, kubeCli, nil, selector, s.conf.ClusterScoped, s.conf.TargetNamespace, s.conf.EnableFilterNamespace) if err != nil { c.Status(http.StatusInternalServerError) - _ = c.Error(utils.ErrInternalServer.WrapWithNoMessage(err)) + _ = c.Error(u.ErrInternalServer.WrapWithNoMessage(err)) return } - pods := make([]Pod, 0, len(filteredPods)) + pods := make([]apiservertypes.Pod, 0, len(filteredPods)) for _, pod := range filteredPods { - pods = append(pods, Pod{ + pods = append(pods, apiservertypes.Pod{ Name: pod.Name, IP: pod.Status.PodIP, Namespace: pod.Namespace, @@ -202,15 +188,14 @@ func (s *Service) listPods(c *gin.Context) { // @Produce json // @Success 200 {array} string // @Router /common/namespaces [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) listNamespaces(c *gin.Context) { - var namespaces sort.StringSlice var nsList v1.NamespaceList if err := s.kubeCli.List(context.Background(), &nsList); err != nil { c.Status(http.StatusInternalServerError) - _ = c.Error(utils.ErrInternalServer.WrapWithNoMessage(err)) + _ = c.Error(u.ErrInternalServer.WrapWithNoMessage(err)) return } namespaces = make(sort.StringSlice, 0, len(nsList.Items)) @@ -228,16 +213,15 @@ func (s *Service) listNamespaces(c *gin.Context) { // @Produce json // @Success 200 {array} string // @Router /common/chaos-available-namespaces [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getChaosAvailableNamespaces(c *gin.Context) { - var namespaces sort.StringSlice if s.conf.ClusterScoped { var nsList v1.NamespaceList if err := s.kubeCli.List(context.Background(), &nsList); err != nil { c.Status(http.StatusInternalServerError) - _ = c.Error(utils.ErrInternalServer.WrapWithNoMessage(err)) + _ = c.Error(u.ErrInternalServer.WrapWithNoMessage(err)) return } namespaces = make(sort.StringSlice, 0, len(nsList.Items)) @@ -258,7 +242,7 @@ func (s *Service) getChaosAvailableNamespaces(c *gin.Context) { // @Produce json // @Success 200 {array} string // @Router /common/kinds [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getKinds(c *gin.Context) { var kinds []string @@ -271,22 +255,18 @@ func (s *Service) getKinds(c *gin.Context) { c.JSON(http.StatusOK, kinds) } -// MapSlice defines a common map -type MapSlice map[string][]string - // @Summary Get the labels of the pods in the specified namespace from Kubernetes cluster. // @Description Get the labels of the pods in the specified namespace from Kubernetes cluster. // @Tags common // @Produce json // @Param podNamespaceList query string true "The pod's namespace list, split by ," -// @Success 200 {object} MapSlice +// @Success 200 {object} u.MapStringSliceResponse // @Router /common/labels [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getLabels(c *gin.Context) { - kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) if err != nil { - _ = c.Error(utils.ErrBadRequest.WrapWithNoMessage(err)) + _ = c.Error(u.ErrBadRequest.WrapWithNoMessage(err)) return } @@ -294,7 +274,7 @@ func (s *Service) getLabels(c *gin.Context) { if len(podNamespaceList) == 0 { c.Status(http.StatusInternalServerError) - _ = c.Error(utils.ErrInternalServer.WrapWithNoMessage(errors.New("podNamespaceList is required"))) + _ = c.Error(u.ErrInternalServer.WrapWithNoMessage(errors.New("podNamespaceList is required"))) return } @@ -306,11 +286,11 @@ func (s *Service) getLabels(c *gin.Context) { filteredPods, err := pod.SelectPods(ctx, kubeCli, nil, selector, s.conf.ClusterScoped, s.conf.TargetNamespace, s.conf.EnableFilterNamespace) if err != nil { c.Status(http.StatusInternalServerError) - _ = c.Error(utils.ErrInternalServer.WrapWithNoMessage(err)) + _ = c.Error(u.ErrInternalServer.WrapWithNoMessage(err)) return } - labels := make(map[string][]string) + labels := make(u.MapStringSliceResponse) for _, pod := range filteredPods { for k, v := range pod.Labels { if _, ok := labels[k]; ok { @@ -331,14 +311,13 @@ func (s *Service) getLabels(c *gin.Context) { // @Tags common // @Produce json // @Param podNamespaceList query string true "The pod's namespace list, split by ," -// @Success 200 {object} MapSlice +// @Success 200 {object} u.MapStringSliceResponse // @Router /common/annotations [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getAnnotations(c *gin.Context) { - kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) if err != nil { - _ = c.Error(utils.ErrBadRequest.WrapWithNoMessage(err)) + _ = c.Error(u.ErrBadRequest.WrapWithNoMessage(err)) return } @@ -346,7 +325,7 @@ func (s *Service) getAnnotations(c *gin.Context) { if len(podNamespaceList) == 0 { c.Status(http.StatusInternalServerError) - _ = c.Error(utils.ErrInternalServer.WrapWithNoMessage(errors.New("podNamespaceList is required"))) + _ = c.Error(u.ErrInternalServer.WrapWithNoMessage(errors.New("podNamespaceList is required"))) return } @@ -358,11 +337,11 @@ func (s *Service) getAnnotations(c *gin.Context) { filteredPods, err := pod.SelectPods(ctx, kubeCli, nil, selector, s.conf.ClusterScoped, s.conf.TargetNamespace, s.conf.EnableFilterNamespace) if err != nil { c.Status(http.StatusInternalServerError) - _ = c.Error(utils.ErrInternalServer.WrapWithNoMessage(err)) + _ = c.Error(u.ErrInternalServer.WrapWithNoMessage(err)) return } - annotations := make(map[string][]string) + annotations := make(u.MapStringSliceResponse) for _, pod := range filteredPods { for k, v := range pod.Annotations { if _, ok := annotations[k]; ok { @@ -384,7 +363,7 @@ func (s *Service) getAnnotations(c *gin.Context) { // @Produce json // @Success 200 {object} config.ChaosDashboardConfig // @Router /common/config [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getConfig(c *gin.Context) { c.JSON(http.StatusOK, s.conf) } @@ -393,9 +372,11 @@ func (s *Service) getConfig(c *gin.Context) { // @Description Get the rbac config according to the user's choice. // @Tags common // @Produce json -// @Success 200 {object} MapSlice +// @Param namespace query string false "The namespace of RBAC" +// @Param role query string false "The role of RBAC" +// @Success 200 {object} map[string]string // @Router /common/rbac-config [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getRbacConfig(c *gin.Context) { namespace := c.Query("namespace") roleType := c.Query("role") @@ -414,7 +395,7 @@ func (s *Service) getRbacConfig(c *gin.Context) { verbs = `"get", "list", "watch"` } else { c.Status(http.StatusBadRequest) - _ = c.Error(utils.ErrBadRequest.WrapWithNoMessage(errors.New("roleType is neither manager nor viewer"))) + _ = c.Error(u.ErrBadRequest.WrapWithNoMessage(errors.New("roleType is neither manager nor viewer"))) return } @@ -442,31 +423,31 @@ func (s *Service) getRbacConfig(c *gin.Context) { // @Tags common // @Produce json // @Param request body v1alpha1.PhysicalMachineSelectorSpec true "Request body" -// @Success 200 {array} PhysicalMachine +// @Success 200 {array} apiservertypes.PhysicalMachine +// @Failure 500 {object} u.APIError // @Router /common/physicalmachines [post] -// @Failure 500 {object} utils.APIError func (s *Service) listPhysicalMachines(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) if err != nil { - utils.SetAPIError(c, utils.ErrBadRequest.WrapWithNoMessage(err)) + u.SetAPIError(c, u.ErrBadRequest.WrapWithNoMessage(err)) return } selector := v1alpha1.PhysicalMachineSelectorSpec{} if err := c.ShouldBindJSON(&selector); err != nil { - utils.SetAPIError(c, utils.ErrBadRequest.WrapWithNoMessage(err)) + u.SetAPIError(c, u.ErrBadRequest.WrapWithNoMessage(err)) return } ctx := context.TODO() filtered, err := physicalmachine.SelectPhysicalMachines(ctx, kubeCli, nil, selector, s.conf.ClusterScoped, s.conf.TargetNamespace, s.conf.EnableFilterNamespace) if err != nil { - utils.SetAPIError(c, utils.ErrInternalServer.WrapWithNoMessage(err)) + u.SetAPIError(c, u.ErrInternalServer.WrapWithNoMessage(err)) return } - physicalMachines := make([]PhysicalMachine, 0, len(filtered)) + physicalMachines := make([]apiservertypes.PhysicalMachine, 0, len(filtered)) for _, pm := range filtered { - physicalMachines = append(physicalMachines, PhysicalMachine{ + physicalMachines = append(physicalMachines, apiservertypes.PhysicalMachine{ Name: pm.Name, Namespace: pm.Namespace, Address: pm.Spec.Address, @@ -481,21 +462,21 @@ func (s *Service) listPhysicalMachines(c *gin.Context) { // @Tags common // @Produce json // @Param physicalMachineNamespaceList query string true "The physicalMachine's namespace list, split by ," -// @Success 200 {object} MapSlice +// @Success 200 {object} u.MapStringSliceResponse // @Router /common/physicalmachine-labels [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getPhysicalMachineLabels(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) if err != nil { - utils.SetAPIError(c, utils.ErrBadRequest.WrapWithNoMessage(err)) + u.SetAPIError(c, u.ErrBadRequest.WrapWithNoMessage(err)) return } physicalMachineNamespaceList := c.Query("physicalMachineNamespaceList") if len(physicalMachineNamespaceList) == 0 { - utils.SetAPIError(c, utils.ErrInternalServer.WrapWithNoMessage(errors.New("physicalMachineNamespaceList is required"))) + u.SetAPIError(c, u.ErrInternalServer.WrapWithNoMessage(errors.New("physicalMachineNamespaceList is required"))) return } @@ -506,11 +487,11 @@ func (s *Service) getPhysicalMachineLabels(c *gin.Context) { ctx := context.TODO() filtered, err := physicalmachine.SelectPhysicalMachines(ctx, kubeCli, nil, selector, s.conf.ClusterScoped, s.conf.TargetNamespace, s.conf.EnableFilterNamespace) if err != nil { - utils.SetAPIError(c, utils.ErrInternalServer.WrapWithNoMessage(err)) + u.SetAPIError(c, u.ErrInternalServer.WrapWithNoMessage(err)) return } - labels := make(map[string][]string) + labels := make(u.MapStringSliceResponse) for _, obj := range filtered { for k, v := range obj.Labels { if _, ok := labels[k]; ok { @@ -531,21 +512,21 @@ func (s *Service) getPhysicalMachineLabels(c *gin.Context) { // @Tags common // @Produce json // @Param physicalMachineNamespaceList query string true "The physicalMachine's namespace list, split by ," -// @Success 200 {object} MapSlice +// @Success 200 {object} u.MapStringSliceResponse // @Router /common/physicalmachine-annotations [get] -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError func (s *Service) getPhysicalMachineAnnotations(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) if err != nil { - utils.SetAPIError(c, utils.ErrBadRequest.WrapWithNoMessage(err)) + u.SetAPIError(c, u.ErrBadRequest.WrapWithNoMessage(err)) return } physicalMachineNamespaceList := c.Query("physicalMachineNamespaceList") if len(physicalMachineNamespaceList) == 0 { - utils.SetAPIError(c, utils.ErrInternalServer.WrapWithNoMessage(errors.New("physicalMachineNamespaceList is required"))) + u.SetAPIError(c, u.ErrInternalServer.WrapWithNoMessage(errors.New("physicalMachineNamespaceList is required"))) return } selector := v1alpha1.PhysicalMachineSelectorSpec{} @@ -555,11 +536,11 @@ func (s *Service) getPhysicalMachineAnnotations(c *gin.Context) { ctx := context.TODO() filtered, err := physicalmachine.SelectPhysicalMachines(ctx, kubeCli, nil, selector, s.conf.ClusterScoped, s.conf.TargetNamespace, s.conf.EnableFilterNamespace) if err != nil { - utils.SetAPIError(c, utils.ErrInternalServer.WrapWithNoMessage(err)) + u.SetAPIError(c, u.ErrInternalServer.WrapWithNoMessage(err)) return } - annotations := make(map[string][]string) + annotations := make(u.MapStringSliceResponse) for _, obj := range filtered { for k, v := range obj.Annotations { if _, ok := annotations[k]; ok { diff --git a/pkg/dashboard/apiserver/event/event.go b/pkg/dashboard/apiserver/event/event.go index 528eb30bef..8cffc3eda4 100644 --- a/pkg/dashboard/apiserver/event/event.go +++ b/pkg/dashboard/apiserver/event/event.go @@ -78,9 +78,9 @@ const layout = "2006-01-02 15:04:05" // @Param namespace query string false "The namespace of the object" // @Param object_id query string false "The UID of the object" // @Param kind query string false "kind" Enums(PodChaos, IOChaos, NetworkChaos, TimeChaos, KernelChaos, StressChaos, AWSChaos, GCPChaos, DNSChaos, Schedule) -// @Param limit query string false "The max length of events list" +// @Param limit query number false "The max length of events list" // @Success 200 {array} core.Event -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError // @Router /events [get] func (s *Service) list(c *gin.Context) { ns := c.Query("namespace") @@ -120,9 +120,9 @@ func (s *Service) list(c *gin.Context) { // @Produce json // @Param namespace query string false "The namespace of the object" // @Param uid path string false "The UID of the Workflow" -// @Param limit query string false "The max length of events list" +// @Param limit query number false "The max length of events list" // @Success 200 {array} core.Event -// @Failure 500 {object} utils.APIError +// @Failure 500 {object} u.APIError // @Router /events/workflow/{uid} [get] func (s *Service) cascadeFetchEventsForWorkflow(c *gin.Context) { ctx := c.Request.Context() @@ -236,9 +236,9 @@ func (s *Service) cascadeFetchEventsForWorkflow(c *gin.Context) { // @Produce json // @Param id path uint true "The event ID" // @Success 200 {object} core.Event -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /events/{id} [get] func (s *Service) get(c *gin.Context) { id, ns := c.Param("id"), c.Query("namespace") diff --git a/pkg/dashboard/apiserver/experiment/experiment.go b/pkg/dashboard/apiserver/experiment/experiment.go index bca7eac764..4e639f529a 100644 --- a/pkg/dashboard/apiserver/experiment/experiment.go +++ b/pkg/dashboard/apiserver/experiment/experiment.go @@ -39,6 +39,7 @@ import ( "github.com/chaos-mesh/chaos-mesh/controllers/common/finalizers" "github.com/chaos-mesh/chaos-mesh/pkg/clientpool" config "github.com/chaos-mesh/chaos-mesh/pkg/config/dashboard" + apiservertypes "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/types" u "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/utils" "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/core" "github.com/chaos-mesh/chaos-mesh/pkg/status" @@ -82,19 +83,6 @@ func Register(r *gin.RouterGroup, s *Service) { endpoint.GET("/state", s.state) } -// Experiment defines the information of an experiment. -type Experiment struct { - core.ObjectBase - Status status.ChaosStatus `json:"status"` - FailedMessage string `json:"failed_message,omitempty"` -} - -// Detail adds KubeObjectDesc on Experiment. -type Detail struct { - Experiment - KubeObject core.KubeObjectDesc `json:"kube_object"` -} - // @Summary List chaos experiments. // @Description Get chaos experiments from k8s clusters in real time. // @Tags experiments @@ -103,9 +91,9 @@ type Detail struct { // @Param name query string false "filter exps by name" // @Param kind query string false "filter exps by kind" Enums(PodChaos, NetworkChaos, IOChaos, StressChaos, KernelChaos, TimeChaos, DNSChaos, AWSChaos, GCPChaos, JVMChaos, HTTPChaos) // @Param status query string false "filter exps by status" Enums(Injecting, Running, Finished, Paused) -// @Success 200 {array} Experiment -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {array} apiservertypes.Experiment +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments [get] func (s *Service) list(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -123,7 +111,7 @@ func (s *Service) list(c *gin.Context) { log.V(1).Info("Replace query namespace with", ns) } - exps := make([]*Experiment, 0) + exps := make([]*apiservertypes.Experiment, 0) for k, chaosKind := range v1alpha1.AllKinds() { if kind != "" && k != kind { continue @@ -143,7 +131,7 @@ func (s *Service) list(c *gin.Context) { continue } - exps = append(exps, &Experiment{ + exps = append(exps, &apiservertypes.Experiment{ ObjectBase: core.ObjectBase{ Namespace: item.GetNamespace(), Name: chaosName, @@ -170,8 +158,8 @@ func (s *Service) list(c *gin.Context) { // @Produce json // @Param chaos body map[string]interface{} true "the chaos definition" // @Success 200 {object} map[string]interface{} -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments [post] func (s *Service) create(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -214,15 +202,15 @@ func (s *Service) create(c *gin.Context) { // @Tags experiments // @Produce json // @Param uid path string true "the experiment uid" -// @Success 200 {object} Detail -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} apiservertypes.ExperimentDetail +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments/{uid} [get] func (s *Service) get(c *gin.Context) { var ( exp *core.Experiment - expDetail *Detail + expDetail *apiservertypes.ExperimentDetail ) kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -260,7 +248,7 @@ func (s *Service) get(c *gin.Context) { c.JSON(http.StatusOK, expDetail) } -func (s *Service) findChaosInCluster(c *gin.Context, kubeCli client.Client, namespacedName types.NamespacedName, chaos client.Object) *Detail { +func (s *Service) findChaosInCluster(c *gin.Context, kubeCli client.Client, namespacedName types.NamespacedName, chaos client.Object) *apiservertypes.ExperimentDetail { if err := kubeCli.Get(context.Background(), namespacedName, chaos); err != nil { u.SetAPImachineryError(c, err) @@ -276,8 +264,8 @@ func (s *Service) findChaosInCluster(c *gin.Context, kubeCli client.Client, name kind := gvk.Kind - return &Detail{ - Experiment: Experiment{ + return &apiservertypes.ExperimentDetail{ + Experiment: apiservertypes.Experiment{ ObjectBase: core.ObjectBase{ Namespace: reflect.ValueOf(chaos).MethodByName("GetNamespace").Call(nil)[0].String(), Name: reflect.ValueOf(chaos).MethodByName("GetName").Call(nil)[0].String(), @@ -309,10 +297,10 @@ func (s *Service) findChaosInCluster(c *gin.Context, kubeCli client.Client, name // @Produce json // @Param uid path string true "the experiment uid" // @Param force query string false "force" Enums(true, false) -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments/{uid} [delete] func (s *Service) delete(c *gin.Context) { var ( @@ -351,10 +339,10 @@ func (s *Service) delete(c *gin.Context) { // @Produce json // @Param uids query string true "the experiment uids, split with comma. Example: ?uids=uid1,uid2" // @Param force query string false "force" Enums(true, false) -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments [delete] func (s *Service) batchDelete(c *gin.Context) { var ( @@ -461,10 +449,10 @@ func forceClean(kubeCli client.Client, chaos client.Object) error { // @Tags experiments // @Produce json // @Param uid path string true "the experiment uid" -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments/pause/{uid} [put] func (s *Service) pause(c *gin.Context) { var exp *core.Experiment @@ -504,10 +492,10 @@ func (s *Service) pause(c *gin.Context) { // @Tags experiments // @Produce json // @Param uid path string true "the experiment uid" -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments/start/{uid} [put] func (s *Service) start(c *gin.Context) { var exp *core.Experiment @@ -565,8 +553,8 @@ func patchExperiment(kubeCli client.Client, exp *core.Experiment, annotations ma // @Produce json // @Param namespace query string false "namespace" // @Success 200 {object} status.AllChaosStatus -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /experiments/state [get] func (s *Service) state(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) diff --git a/pkg/dashboard/apiserver/schedule/schedule.go b/pkg/dashboard/apiserver/schedule/schedule.go index 41012b15e6..2135482e99 100644 --- a/pkg/dashboard/apiserver/schedule/schedule.go +++ b/pkg/dashboard/apiserver/schedule/schedule.go @@ -35,6 +35,7 @@ import ( "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" "github.com/chaos-mesh/chaos-mesh/pkg/clientpool" config "github.com/chaos-mesh/chaos-mesh/pkg/config/dashboard" + apiservertypes "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/types" u "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/utils" "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/core" "github.com/chaos-mesh/chaos-mesh/pkg/status" @@ -78,28 +79,15 @@ func Register(r *gin.RouterGroup, s *Service) { endpoint.PUT("/start/:uid", s.startSchedule) } -// Schedule defines the information of a schedule. -type Schedule struct { - core.ObjectBase - Status status.ScheduleStatus `json:"status"` -} - -// Detail adds KubeObjectDesc on Schedule. -type Detail struct { - Schedule - ExperimentUIDs []string `json:"experiment_uids"` - KubeObject core.KubeObjectDesc `json:"kube_object"` -} - // @Summary List chaos schedules. // @Description Get chaos schedules from k8s cluster in real time. // @Tags schedules // @Produce json // @Param namespace query string false "filter schedules by namespace" // @Param name query string false "filter schedules by name" -// @Success 200 {array} Schedule -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {array} apiservertypes.Schedule +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /schedules [get] func (s *Service) list(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -124,13 +112,13 @@ func (s *Service) list(c *gin.Context) { return } - sches := make([]*Schedule, 0) + sches := make([]*apiservertypes.Schedule, 0) for _, schedule := range ScheduleList.Items { if name != "" && schedule.Name != name { continue } - sches = append(sches, &Schedule{ + sches = append(sches, &apiservertypes.Schedule{ ObjectBase: core.ObjectBase{ Namespace: schedule.Namespace, Name: schedule.Name, @@ -156,8 +144,8 @@ func (s *Service) list(c *gin.Context) { // @Produce json // @Param schedule body v1alpha1.Schedule true "the schedule definition" // @Success 200 {object} v1alpha1.Schedule -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /schedules [post] func (s *Service) create(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -186,15 +174,15 @@ func (s *Service) create(c *gin.Context) { // @Tags schedules // @Produce json // @Param uid path string true "the schedule uid" -// @Success 200 {object} Detail -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} apiservertypes.ScheduleDetail +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /schedules/{uid} [get] func (s *Service) get(c *gin.Context) { var ( sch *core.Schedule - schDetail *Detail + schDetail *apiservertypes.ScheduleDetail ) kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -224,7 +212,7 @@ func (s *Service) get(c *gin.Context) { c.JSON(http.StatusOK, schDetail) } -func (s *Service) findScheduleInCluster(c *gin.Context, kubeCli client.Client, namespacedName types.NamespacedName) *Detail { +func (s *Service) findScheduleInCluster(c *gin.Context, kubeCli client.Client, namespacedName types.NamespacedName) *apiservertypes.ScheduleDetail { var sch v1alpha1.Schedule if err := kubeCli.Get(context.Background(), namespacedName, &sch); err != nil { @@ -274,8 +262,8 @@ func (s *Service) findScheduleInCluster(c *gin.Context, kubeCli client.Client, n UIDList = append(UIDList, string(item.GetUID())) } - return &Detail{ - Schedule: Schedule{ + return &apiservertypes.ScheduleDetail{ + Schedule: apiservertypes.Schedule{ ObjectBase: core.ObjectBase{ Namespace: sch.Namespace, Name: sch.Name, @@ -307,10 +295,10 @@ func (s *Service) findScheduleInCluster(c *gin.Context, kubeCli client.Client, n // @Tags schedules // @Produce json // @Param uid path string true "the schedule uid" -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /schedules/{uid} [delete] func (s *Service) delete(c *gin.Context) { var ( @@ -350,10 +338,10 @@ func (s *Service) delete(c *gin.Context) { // @Tags schedules // @Produce json // @Param uids query string true "the schedule uids, split with comma. Example: ?uids=uid1,uid2" -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /schedules [delete] func (s *Service) batchDelete(c *gin.Context) { var ( @@ -425,10 +413,10 @@ func checkAndDeleteSchedule(c *gin.Context, kubeCli client.Client, namespacedNam // @Tags schedules // @Produce json // @Param uid path string true "the schedule uid" -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /schedules/pause/{uid} [put] func (s *Service) pauseSchedule(c *gin.Context) { var sch *core.Schedule @@ -467,10 +455,10 @@ func (s *Service) pauseSchedule(c *gin.Context) { // @Tags schedules // @Produce json // @Param uid path string true "the schedule uid" -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /schedules/start/{uid} [put] func (s *Service) startSchedule(c *gin.Context) { var sch *core.Schedule diff --git a/pkg/dashboard/apiserver/template/template.go b/pkg/dashboard/apiserver/template/template.go index c893615c48..2ddd919efb 100644 --- a/pkg/dashboard/apiserver/template/template.go +++ b/pkg/dashboard/apiserver/template/template.go @@ -32,6 +32,7 @@ import ( "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" "github.com/chaos-mesh/chaos-mesh/pkg/clientpool" config "github.com/chaos-mesh/chaos-mesh/pkg/config/dashboard" + apiservertypes "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/types" u "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/apiserver/utils" ) @@ -56,36 +57,15 @@ func Register(r *gin.RouterGroup, s *Service) { statusCheckEndpoint.DELETE("/statuscheck", s.deleteStatusCheckTemplate) } -type StatusCheckTemplateBase struct { - Namespace string `json:"namespace"` - Name string `json:"name"` - UID string `json:"uid"` - Description string `json:"description,omitempty"` - Created string `json:"created_at"` -} - -// StatusCheckTemplateDetail represent details of StatusCheckTemplate. -type StatusCheckTemplateDetail struct { - StatusCheckTemplateBase `json:",inline,omitempty"` - Spec v1alpha1.StatusCheckTemplate `json:"spec"` -} - -type StatusCheckTemplate struct { - Namespace string `json:"namespace"` - Name string `json:"name"` - Description string `json:"description,omitempty"` - Spec v1alpha1.StatusCheckTemplate `json:"spec"` -} - // @Summary List status check templates. // @Description Get status check templates from k8s cluster in real time. // @Tags template // @Produce json // @Param namespace query string false "filter status check templates by namespace" // @Param name query string false "filter status check templates by name" -// @Success 200 {array} StatusCheckTemplateBase -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {array} apiservertypes.StatusCheckTemplateBase +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /templates/statuschecks [get] func (s *Service) listStatusCheckTemplate(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -112,7 +92,7 @@ func (s *Service) listStatusCheckTemplate(c *gin.Context) { return } - templates := make([]*StatusCheckTemplateBase, 0) + templates := make([]*apiservertypes.StatusCheckTemplateBase, 0) for _, cm := range configMapList.Items { templateName := v1alpha1.GetTemplateName(cm) if templateName == "" { @@ -123,7 +103,7 @@ func (s *Service) listStatusCheckTemplate(c *gin.Context) { continue } - templates = append(templates, &StatusCheckTemplateBase{ + templates = append(templates, &apiservertypes.StatusCheckTemplateBase{ Namespace: cm.Namespace, Name: templateName, UID: string(cm.UID), @@ -144,10 +124,10 @@ func (s *Service) listStatusCheckTemplate(c *gin.Context) { // @Tags templates // @Accept json // @Produce json -// @Param statuscheck body StatusCheckTemplate true "the status check definition" -// @Success 200 {object} StatusCheckTemplate -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Param statuscheck body apiservertypes.StatusCheckTemplate true "the status check definition" +// @Success 200 {object} apiservertypes.StatusCheckTemplate +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /templates/statuschecks [post] func (s *Service) createStatusCheckTemplate(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -156,7 +136,7 @@ func (s *Service) createStatusCheckTemplate(c *gin.Context) { return } - var template StatusCheckTemplate + var template apiservertypes.StatusCheckTemplate if err = u.ShouldBindBodyWithJSON(c, &template); err != nil { return } @@ -200,10 +180,10 @@ func (s *Service) createStatusCheckTemplate(c *gin.Context) { // @Produce json // @Param namespace query string true "the namespace of status check templates" // @Param name query string true "the name of status check templates" -// @Success 200 {object} StatusCheckTemplateDetail -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} apiservertypes.StatusCheckTemplateDetail +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /templates/statuschecks/statuscheck [get] func (s *Service) getStatusCheckTemplateDetail(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -242,8 +222,8 @@ func (s *Service) getStatusCheckTemplateDetail(c *gin.Context) { u.SetAPIError(c, u.ErrInternalServer.WrapWithNoMessage(err)) return } - detail := StatusCheckTemplateDetail{ - StatusCheckTemplateBase: StatusCheckTemplateBase{ + detail := apiservertypes.StatusCheckTemplateDetail{ + StatusCheckTemplateBase: apiservertypes.StatusCheckTemplateBase{ Namespace: cm.Namespace, Name: v1alpha1.GetTemplateName(cm), UID: string(cm.UID), @@ -259,10 +239,10 @@ func (s *Service) getStatusCheckTemplateDetail(c *gin.Context) { // @Description Update a status check template by namespaced name. // @Tags templates // @Produce json -// @Param request body StatusCheckTemplate true "Request body" -// @Success 200 {object} StatusCheckTemplate -// @Failure 400 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Param request body apiservertypes.StatusCheckTemplate true "Request body" +// @Success 200 {object} apiservertypes.StatusCheckTemplate +// @Failure 400 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /templates/statuschecks/statuscheck [put] func (s *Service) updateStatusCheckTemplate(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) @@ -271,7 +251,7 @@ func (s *Service) updateStatusCheckTemplate(c *gin.Context) { return } - var template StatusCheckTemplate + var template apiservertypes.StatusCheckTemplate if err = u.ShouldBindBodyWithJSON(c, &template); err != nil { return } @@ -320,10 +300,10 @@ func (s *Service) updateStatusCheckTemplate(c *gin.Context) { // @Produce json // @Param namespace query string true "the namespace of status check templates" // @Param name query string true "the name of status check templates" -// @Success 200 {object} utils.Response -// @Failure 400 {object} utils.APIError -// @Failure 404 {object} utils.APIError -// @Failure 500 {object} utils.APIError +// @Success 200 {object} u.Response +// @Failure 400 {object} u.APIError +// @Failure 404 {object} u.APIError +// @Failure 500 {object} u.APIError // @Router /templates/statuschecks/statuscheck [delete] func (s *Service) deleteStatusCheckTemplate(c *gin.Context) { kubeCli, err := clientpool.ExtractTokenAndGetClient(c.Request.Header) diff --git a/pkg/dashboard/apiserver/types/types.go b/pkg/dashboard/apiserver/types/types.go new file mode 100644 index 0000000000..75cc510a22 --- /dev/null +++ b/pkg/dashboard/apiserver/types/types.go @@ -0,0 +1,109 @@ +// Copyright 2022 Chaos Mesh Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package types + +import ( + "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" + "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/core" + "github.com/chaos-mesh/chaos-mesh/pkg/status" +) + +// Archive defines the basic information of an archive. +type Archive = core.ObjectBase + +/* +ArchiveDetail represents an archive instance. + +It inherits `Archive` and adds complete definition of an experiment. +*/ +type ArchiveDetail struct { + Archive + KubeObject core.KubeObjectDesc `json:"kube_object"` +} + +// Experiment defines the basic information of an experiment. +type Experiment struct { + core.ObjectBase + Status status.ChaosStatus `json:"status"` + FailedMessage string `json:"failed_message,omitempty"` +} + +/* +ExperimentDetail represents an experiment instance. + +It inherits `Experiment` and adds complete definition of an experiment. +*/ +type ExperimentDetail struct { + Experiment + KubeObject core.KubeObjectDesc `json:"kube_object"` +} + +// PhysicalMachine defines the basic information of a physical machine. +type PhysicalMachine struct { + Name string `json:"name"` + Namespace string `json:"namespace"` + Address string `json:"address"` +} + +// Pod defines the basic information of a pod. +type Pod struct { + IP string `json:"ip"` + Name string `json:"name"` + Namespace string `json:"namespace"` + State string `json:"state"` +} + +// Schedule defines the basic information of a schedule. +type Schedule struct { + core.ObjectBase + Status status.ScheduleStatus `json:"status"` +} + +/* +ScheduleDetail represents an archive instance. + +It inherits `Schedule` and adds complete definition of a schedule. +*/ +type ScheduleDetail struct { + Schedule + ExperimentUIDs []string `json:"experiment_uids"` + KubeObject core.KubeObjectDesc `json:"kube_object"` +} + +type StatusCheckTemplateBase struct { + Namespace string `json:"namespace"` + Name string `json:"name"` + UID string `json:"uid"` + Description string `json:"description,omitempty"` + Created string `json:"created_at"` +} + +/* +StatusCheckTemplateDetail represents an archive instance. + +It inherits `StatusCheckTemplateBase` and adds complete definition of a Status Check template. +*/ +type StatusCheckTemplateDetail struct { + StatusCheckTemplateBase `json:",inline,omitempty"` + Spec v1alpha1.StatusCheckTemplate `json:"spec"` +} + +type StatusCheckTemplate struct { + Namespace string `json:"namespace"` + Name string `json:"name"` + Description string `json:"description,omitempty"` + Spec v1alpha1.StatusCheckTemplate `json:"spec"` +} diff --git a/pkg/dashboard/apiserver/utils/gin.go b/pkg/dashboard/apiserver/utils/gin.go index 32ec146c1d..8f767b8a45 100644 --- a/pkg/dashboard/apiserver/utils/gin.go +++ b/pkg/dashboard/apiserver/utils/gin.go @@ -20,6 +20,9 @@ import ( "github.com/gin-gonic/gin/binding" ) +// MapSliceResponse is an alias of map[string][]string. +type MapStringSliceResponse map[string][]string + // Response defines a common status struct. type Response struct { Status string `json:"status"` diff --git a/pkg/dashboard/apiserver/workflow/workflow.go b/pkg/dashboard/apiserver/workflow/workflow.go index 388a5498b4..a7be055c59 100644 --- a/pkg/dashboard/apiserver/workflow/workflow.go +++ b/pkg/dashboard/apiserver/workflow/workflow.go @@ -33,11 +33,6 @@ import ( "github.com/chaos-mesh/chaos-mesh/pkg/dashboard/core" ) -// StatusResponse defines a common status struct. -type StatusResponse struct { - Status string `json:"status"` -} - func Register(r *gin.RouterGroup, s *Service) { endpoint := r.Group("/workflows") endpoint.GET("", s.listWorkflows) @@ -66,10 +61,10 @@ func NewService(conf *config.ChaosDashboardConfig, store core.WorkflowStore, log // @Tags workflows // @Produce json // @Param request body curl.RequestForm true "Origin HTTP Request" -// @Router /workflows/render-task/http [post] // @Success 200 {object} v1alpha1.Template // @Failure 400 {object} utils.APIError // @Failure 500 {object} utils.APIError +// @Router /workflows/render-task/http [post] func (it *Service) renderHTTPTask(c *gin.Context) { requestBody := curl.RequestForm{} if err := c.ShouldBindJSON(&requestBody); err != nil { @@ -284,7 +279,7 @@ func (it *Service) createWorkflow(c *gin.Context) { // @Tags workflows // @Produce json // @Param uid path string true "uid" -// @Success 200 {object} StatusResponse +// @Success 200 {object} utils.Response // @Failure 400 {object} utils.APIError // @Failure 404 {object} utils.APIError // @Failure 500 {object} utils.APIError @@ -314,7 +309,7 @@ func (it *Service) deleteWorkflow(c *gin.Context) { utils.SetAPImachineryError(c, err) return } - c.JSON(http.StatusOK, StatusResponse{Status: "success"}) + c.JSON(http.StatusOK, utils.ResponseSuccess) } // @Summary Update a workflow. diff --git a/pkg/dashboard/swaggerdocs/docs.go b/pkg/dashboard/swaggerdocs/docs.go index e6a255e2ca..6a9ca456e1 100644 --- a/pkg/dashboard/swaggerdocs/docs.go +++ b/pkg/dashboard/swaggerdocs/docs.go @@ -1,22 +1,14 @@ -// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT +// Package swaggerdocs GENERATED BY SWAG; DO NOT EDIT // This file was generated by swaggo/swag - package swaggerdocs -import ( - "bytes" - "encoding/json" - "strings" - - "github.com/alecthomas/template" - "github.com/swaggo/swag" -) +import "github.com/swaggo/swag" -var doc = `{ +const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { - "description": "{{.Description}}", + "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": { "name": "GitHub Issues", @@ -75,7 +67,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/archive.Archive" + "$ref": "#/definitions/types.Archive" } } }, @@ -151,7 +143,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/archive.Archive" + "$ref": "#/definitions/types.Archive" } } }, @@ -220,7 +212,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/archive.Detail" + "$ref": "#/definitions/types.ArchiveDetail" } }, "500": { @@ -295,7 +287,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/archive.Archive" + "$ref": "#/definitions/types.Archive" } } }, @@ -364,7 +356,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/archive.Detail" + "$ref": "#/definitions/types.ArchiveDetail" } }, "500": { @@ -432,7 +424,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/archive.Detail" + "$ref": "#/definitions/types.ArchiveDetail" } }, "404": { @@ -506,7 +498,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -625,7 +617,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -690,7 +682,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -725,7 +717,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -764,7 +756,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/common.PhysicalMachine" + "$ref": "#/definitions/types.PhysicalMachine" } } }, @@ -804,7 +796,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/common.Pod" + "$ref": "#/definitions/types.Pod" } } }, @@ -827,11 +819,28 @@ var doc = `{ "common" ], "summary": "Get the rbac config according to the user's choice.", + "parameters": [ + { + "type": "string", + "description": "The namespace of RBAC", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "The role of RBAC", + "name": "role", + "in": "query" + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "500": { @@ -897,7 +906,7 @@ var doc = `{ "in": "query" }, { - "type": "string", + "type": "number", "description": "The max length of events list", "name": "limit", "in": "query" @@ -946,7 +955,7 @@ var doc = `{ "in": "path" }, { - "type": "string", + "type": "number", "description": "The max length of events list", "name": "limit", "in": "query" @@ -1079,7 +1088,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/experiment.Experiment" + "$ref": "#/definitions/types.Experiment" } } }, @@ -1356,7 +1365,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/experiment.Detail" + "$ref": "#/definitions/types.ExperimentDetail" } }, "400": { @@ -1465,7 +1474,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/schedule.Schedule" + "$ref": "#/definitions/types.Schedule" } } }, @@ -1690,7 +1699,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/schedule.Detail" + "$ref": "#/definitions/types.ScheduleDetail" } }, "400": { @@ -1789,7 +1798,7 @@ var doc = `{ "schema": { "type": "array", "items": { - "$ref": "#/definitions/template.StatusCheckTemplateBase" + "$ref": "#/definitions/types.StatusCheckTemplateBase" } } }, @@ -1826,7 +1835,7 @@ var doc = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } } ], @@ -1834,7 +1843,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } }, "400": { @@ -1882,7 +1891,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/template.StatusCheckTemplateDetail" + "$ref": "#/definitions/types.StatusCheckTemplateDetail" } }, "400": { @@ -1921,7 +1930,7 @@ var doc = `{ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } } ], @@ -1929,7 +1938,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } }, "400": { @@ -2328,7 +2337,7 @@ var doc = `{ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/workflow.StatusResponse" + "$ref": "#/definitions/utils.Response" } }, "400": { @@ -2354,58 +2363,6 @@ var doc = `{ } }, "definitions": { - "archive.Archive": { - "$ref": "#/definitions/core.ObjectBase" - }, - "archive.Detail": { - "type": "object", - "properties": { - "kube_object": { - "type": "object", - "$ref": "#/definitions/core.KubeObjectDesc" - } - } - }, - "common.MapSlice": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "common.PhysicalMachine": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - } - }, - "common.Pod": { - "type": "object", - "properties": { - "ip": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "state": { - "type": "string" - } - } - }, "config.ChaosDashboardConfig": { "type": "object", "properties": { @@ -2503,13 +2460,18 @@ var doc = `{ "core.KubeObjectDesc": { "type": "object", "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, "metadata": { - "type": "object", "$ref": "#/definitions/core.KubeObjectMeta" }, - "spec": { - "type": "object" - } + "spec": {} } }, "core.KubeObjectMeta": { @@ -2584,26 +2546,6 @@ var doc = `{ } } }, - "core.ObjectBase": { - "type": "object", - "properties": { - "created_at": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, "core.Topology": { "type": "object", "properties": { @@ -2637,7 +2579,6 @@ var doc = `{ "type": "integer" }, "kube_object": { - "type": "object", "$ref": "#/definitions/core.KubeObjectDesc" }, "name": { @@ -2650,7 +2591,6 @@ var doc = `{ "type": "string" }, "topology": { - "type": "object", "$ref": "#/definitions/core.Topology" }, "uid": { @@ -2712,7 +2652,6 @@ var doc = `{ "type": "boolean" }, "header": { - "type": "object", "$ref": "#/definitions/curl.Header" }, "jsonContent": { @@ -2729,20 +2668,87 @@ var doc = `{ } } }, - "experiment.Detail": { + "http.Header": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "intstr.IntOrString": { + "type": "object", + "properties": { + "intVal": { + "type": "integer" + }, + "strVal": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "resource.Quantity": { + "type": "object", + "properties": { + "Format": { + "type": "string" + } + } + }, + "status.AllChaosStatus": { + "type": "object", + "properties": { + "deleting": { + "type": "integer" + }, + "finished": { + "type": "integer" + }, + "injecting": { + "type": "integer" + }, + "paused": { + "type": "integer" + }, + "running": { + "type": "integer" + } + } + }, + "types.Archive": { "type": "object", "properties": { "created_at": { "type": "string" }, - "failed_message": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "types.ArchiveDetail": { + "type": "object", + "properties": { + "created_at": { "type": "string" }, "kind": { "type": "string" }, "kube_object": { - "type": "object", "$ref": "#/definitions/core.KubeObjectDesc" }, "name": { @@ -2751,15 +2757,12 @@ var doc = `{ "namespace": { "type": "string" }, - "status": { - "type": "string" - }, "uid": { "type": "string" } } }, - "experiment.Experiment": { + "types.Experiment": { "type": "object", "properties": { "created_at": { @@ -2785,23 +2788,19 @@ var doc = `{ } } }, - "schedule.Detail": { + "types.ExperimentDetail": { "type": "object", "properties": { "created_at": { "type": "string" }, - "experiment_uids": { - "type": "array", - "items": { - "type": "string" - } + "failed_message": { + "type": "string" }, "kind": { "type": "string" }, "kube_object": { - "type": "object", "$ref": "#/definitions/core.KubeObjectDesc" }, "name": { @@ -2818,7 +2817,38 @@ var doc = `{ } } }, - "schedule.Schedule": { + "types.PhysicalMachine": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, + "types.Pod": { + "type": "object", + "properties": { + "ip": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "types.Schedule": { "type": "object", "properties": { "created_at": { @@ -2841,27 +2871,39 @@ var doc = `{ } } }, - "status.AllChaosStatus": { + "types.ScheduleDetail": { "type": "object", "properties": { - "deleting": { - "type": "integer" + "created_at": { + "type": "string" }, - "finished": { - "type": "integer" + "experiment_uids": { + "type": "array", + "items": { + "type": "string" + } }, - "injecting": { - "type": "integer" + "kind": { + "type": "string" }, - "paused": { - "type": "integer" + "kube_object": { + "$ref": "#/definitions/core.KubeObjectDesc" }, - "running": { - "type": "integer" + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "status": { + "type": "string" + }, + "uid": { + "type": "string" } } }, - "template.StatusCheckTemplate": { + "types.StatusCheckTemplate": { "type": "object", "properties": { "description": { @@ -2874,12 +2916,11 @@ var doc = `{ "type": "string" }, "spec": { - "type": "object", "$ref": "#/definitions/v1alpha1.StatusCheckTemplate" } } }, - "template.StatusCheckTemplateBase": { + "types.StatusCheckTemplateBase": { "type": "object", "properties": { "created_at": { @@ -2899,7 +2940,7 @@ var doc = `{ } } }, - "template.StatusCheckTemplateDetail": { + "types.StatusCheckTemplateDetail": { "type": "object", "properties": { "created_at": { @@ -2915,7 +2956,6 @@ var doc = `{ "type": "string" }, "spec": { - "type": "object", "$ref": "#/definitions/v1alpha1.StatusCheckTemplate" }, "uid": { @@ -2940,6 +2980,15 @@ var doc = `{ } } }, + "utils.MapStringSliceResponse": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, "utils.Response": { "type": "object", "properties": { @@ -2948,23 +2997,1851 @@ var doc = `{ } } }, - "v1alpha1.AWSChaosSpec": { + "v1.AWSElasticBlockStoreVolumeSource": { "type": "object", "properties": { - "action": { - "description": "Action defines the specific aws chaos action.\nSupported action: ec2-stop / ec2-restart / detach-volume\nDefault action: ec2-stop\n+kubebuilder:validation:Enum=ec2-stop;ec2-restart;detach-volume", + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", "type": "string" }, - "awsRegion": { - "description": "AWSRegion defines the region of aws.", - "type": "string" + "partition": { + "description": "The partition in the volume that you want to mount.\nIf omitted, the default is to mount by volume name.\nExamples: For volume /dev/sda1, you specify the partition as \"1\".\nSimilarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).\n+optional", + "type": "integer" }, - "deviceName": { - "description": "DeviceName indicates the name of the device.\nNeeded in detach-volume.\n+ui:form:when=action=='detach-volume'\n+optional", - "type": "string" + "readOnly": { + "description": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\".\nIf omitted, the default is \"false\".\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\n+optional", + "type": "boolean" }, - "duration": { - "description": "Duration represents the duration of the chaos action.\n+optional", + "volumeID": { + "description": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume).\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "string" + } + } + }, + "v1.AzureDiskVolumeSource": { + "type": "object", + "properties": { + "cachingMode": { + "description": "Host Caching mode: None, Read Only, Read Write.\n+optional", + "type": "string" + }, + "diskName": { + "description": "The Name of the data disk in the blob storage", + "type": "string" + }, + "diskURI": { + "description": "The URI the data disk in the blob storage", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional", + "type": "string" + }, + "kind": { + "description": "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + } + } + }, + "v1.AzureFileVolumeSource": { + "type": "object", + "properties": { + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretName": { + "description": "the name of secret that contains Azure Storage Account Name and Key", + "type": "string" + }, + "shareName": { + "description": "Share Name", + "type": "string" + } + } + }, + "v1.CSIVolumeSource": { + "type": "object", + "properties": { + "driver": { + "description": "Driver is the name of the CSI driver that handles this volume.\nConsult with your admin for the correct name as registered in the cluster.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\".\nIf not provided, the empty value is passed to the associated CSI driver\nwhich will determine the default filesystem to apply.\n+optional", + "type": "string" + }, + "nodePublishSecretRef": { + "description": "NodePublishSecretRef is a reference to the secret object containing\nsensitive information to pass to the CSI driver to complete the CSI\nNodePublishVolume and NodeUnpublishVolume calls.\nThis field is optional, and may be empty if no secret is required. If the\nsecret object contains more than one secret, all secret references are passed.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "readOnly": { + "description": "Specifies a read-only configuration for the volume.\nDefaults to false (read/write).\n+optional", + "type": "boolean" + }, + "volumeAttributes": { + "description": "VolumeAttributes stores driver-specific properties that are passed to the CSI\ndriver. Consult your driver's documentation for supported values.\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1.Capabilities": { + "type": "object", + "properties": { + "add": { + "description": "Added capabilities\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "drop": { + "description": "Removed capabilities\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.CephFSVolumeSource": { + "type": "object", + "properties": { + "monitors": { + "description": "Required: Monitors is a collection of Ceph monitors\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "type": "boolean" + }, + "secretFile": { + "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "type": "string" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty.\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "user": { + "description": "Optional: User is the rados user name, default is admin\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "type": "string" + } + } + }, + "v1.CinderVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: points to a secret object containing parameters used to connect\nto OpenStack.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "volumeID": { + "description": "volume id used to identify the volume in cinder.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "string" + } + } + }, + "v1.ConfigMapEnvSource": { + "type": "object", + "properties": { + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.ConfigMapKeySelector": { + "type": "object", + "properties": { + "key": { + "description": "The key to select.", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its key must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.ConfigMapProjection": { + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nConfigMap will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the ConfigMap,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its keys must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.ConfigMapVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDefaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nConfigMap will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the ConfigMap,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its keys must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.Container": { + "type": "object", + "properties": { + "args": { + "description": "Arguments to the entrypoint.\nThe docker image's CMD is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will\nproduce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless\nof whether the variable exists or not. Cannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "description": "Entrypoint array. Not executed within a shell.\nThe docker image's ENTRYPOINT is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will\nproduce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless\nof whether the variable exists or not. Cannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "List of environment variables to set in the container.\nCannot be updated.\n+optional\n+patchMergeKey=name\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvVar" + } + }, + "envFrom": { + "description": "List of sources to populate environment variables in the container.\nThe keys defined within a source must be a C_IDENTIFIER. All invalid keys\nwill be reported as an event when the container is starting. When a key exists in multiple\nsources, the value associated with the last source will take precedence.\nValues defined by an Env with a duplicate key will take precedence.\nCannot be updated.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvFromSource" + } + }, + "image": { + "description": "Docker image name.\nMore info: https://kubernetes.io/docs/concepts/containers/images\nThis field is optional to allow higher level config management to default or override\ncontainer images in workload controllers like Deployments and StatefulSets.\n+optional", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy.\nOne of Always, Never, IfNotPresent.\nDefaults to Always if :latest tag is specified, or IfNotPresent otherwise.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n+optional", + "type": "string" + }, + "lifecycle": { + "description": "Actions that the management system should take in response to container lifecycle events.\nCannot be updated.\n+optional", + "$ref": "#/definitions/v1.Lifecycle" + }, + "livenessProbe": { + "description": "Periodic probe of container liveness.\nContainer will be restarted if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "$ref": "#/definitions/v1.Probe" + }, + "name": { + "description": "Name of the container specified as a DNS_LABEL.\nEach container in a pod must have a unique name (DNS_LABEL).\nCannot be updated.", + "type": "string" + }, + "ports": { + "description": "List of ports to expose from the container. Exposing a port here gives\nthe system additional information about the network connections a\ncontainer uses, but is primarily informational. Not specifying a port here\nDOES NOT prevent that port from being exposed. Any port which is\nlistening on the default \"0.0.0.0\" address inside a container will be\naccessible from the network.\nCannot be updated.\n+optional\n+patchMergeKey=containerPort\n+patchStrategy=merge\n+listType=map\n+listMapKey=containerPort\n+listMapKey=protocol", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ContainerPort" + } + }, + "readinessProbe": { + "description": "Periodic probe of container service readiness.\nContainer will be removed from service endpoints if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "$ref": "#/definitions/v1.Probe" + }, + "resources": { + "description": "Compute Resources required by this container.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + "$ref": "#/definitions/v1.ResourceRequirements" + }, + "securityContext": { + "description": "SecurityContext defines the security options the container should be run with.\nIf set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\n+optional", + "$ref": "#/definitions/v1.SecurityContext" + }, + "startupProbe": { + "description": "StartupProbe indicates that the Pod has successfully initialized.\nIf specified, no other probes are executed until this completes successfully.\nIf this probe fails, the Pod will be restarted, just as if the livenessProbe failed.\nThis can be used to provide different probe parameters at the beginning of a Pod's lifecycle,\nwhen it might take a long time to load data or warm a cache, than during steady-state operation.\nThis cannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "$ref": "#/definitions/v1.Probe" + }, + "stdin": { + "description": "Whether this container should allocate a buffer for stdin in the container runtime. If this\nis not set, reads from stdin in the container will always result in EOF.\nDefault is false.\n+optional", + "type": "boolean" + }, + "stdinOnce": { + "description": "Whether the container runtime should close the stdin channel after it has been opened by\na single attach. When stdin is true the stdin stream will remain open across multiple attach\nsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the\nfirst client attaches to stdin, and then remains open and accepts data until the client disconnects,\nat which time stdin is closed and remains closed until the container is restarted. If this\nflag is false, a container processes that reads from stdin will never receive an EOF.\nDefault is false\n+optional", + "type": "boolean" + }, + "terminationMessagePath": { + "description": "Optional: Path at which the file to which the container's termination message\nwill be written is mounted into the container's filesystem.\nMessage written is intended to be brief final status, such as an assertion failure message.\nWill be truncated by the node if greater than 4096 bytes. The total message length across\nall containers will be limited to 12kb.\nDefaults to /dev/termination-log.\nCannot be updated.\n+optional", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of\nterminationMessagePath to populate the container status message on both success and failure.\nFallbackToLogsOnError will use the last chunk of container log output if the termination\nmessage file is empty and the container exited with an error.\nThe log output is limited to 2048 bytes or 80 lines, whichever is smaller.\nDefaults to File.\nCannot be updated.\n+optional", + "type": "string" + }, + "tty": { + "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.\nDefault is false.\n+optional", + "type": "boolean" + }, + "volumeDevices": { + "description": "volumeDevices is the list of block devices to be used by the container.\n+patchMergeKey=devicePath\n+patchStrategy=merge\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeDevice" + } + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem.\nCannot be updated.\n+optional\n+patchMergeKey=mountPath\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeMount" + } + }, + "workingDir": { + "description": "Container's working directory.\nIf not specified, the container runtime's default will be used, which\nmight be configured in the container image.\nCannot be updated.\n+optional", + "type": "string" + } + } + }, + "v1.ContainerPort": { + "type": "object", + "properties": { + "containerPort": { + "description": "Number of port to expose on the pod's IP address.\nThis must be a valid port number, 0 \u003c x \u003c 65536.", + "type": "integer" + }, + "hostIP": { + "description": "What host IP to bind the external port to.\n+optional", + "type": "string" + }, + "hostPort": { + "description": "Number of port to expose on the host.\nIf specified, this must be a valid port number, 0 \u003c x \u003c 65536.\nIf HostNetwork is specified, this must match ContainerPort.\nMost containers do not need this.\n+optional", + "type": "integer" + }, + "name": { + "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each\nnamed port in a pod must have a unique name. Name for the port that can be\nreferred to by services.\n+optional", + "type": "string" + }, + "protocol": { + "description": "Protocol for port. Must be UDP, TCP, or SCTP.\nDefaults to \"TCP\".\n+optional\n+default=\"TCP\"", + "type": "string" + } + } + }, + "v1.DownwardAPIProjection": { + "type": "object", + "properties": { + "items": { + "description": "Items is a list of DownwardAPIVolume file\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DownwardAPIVolumeFile" + } + } + } + }, + "v1.DownwardAPIVolumeFile": { + "type": "object", + "properties": { + "fieldRef": { + "description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.\n+optional", + "$ref": "#/definitions/v1.ObjectFieldSelector" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file, must be an octal value\nbetween 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nIf not specified, the volume defaultMode will be used.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "path": { + "description": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + "type": "string" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests\n(limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.\n+optional", + "$ref": "#/definitions/v1.ResourceFieldSelector" + } + } + }, + "v1.DownwardAPIVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a\nOptional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDefaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "items": { + "description": "Items is a list of downward API volume file\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DownwardAPIVolumeFile" + } + } + } + }, + "v1.EmptyDirVolumeSource": { + "type": "object", + "properties": { + "medium": { + "description": "What type of storage medium should back this directory.\nThe default is \"\" which means to use the node's default medium.\nMust be an empty string (default) or Memory.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\n+optional", + "type": "string" + }, + "sizeLimit": { + "description": "Total amount of local storage required for this EmptyDir volume.\nThe size limit is also applicable for memory medium.\nThe maximum usage on memory medium EmptyDir would be the minimum value between\nthe SizeLimit specified here and the sum of memory limits of all containers in a pod.\nThe default is nil which means that the limit is undefined.\nMore info: http://kubernetes.io/docs/user-guide/volumes#emptydir\n+optional", + "$ref": "#/definitions/resource.Quantity" + } + } + }, + "v1.EnvFromSource": { + "type": "object", + "properties": { + "configMapRef": { + "description": "The ConfigMap to select from\n+optional", + "$ref": "#/definitions/v1.ConfigMapEnvSource" + }, + "prefix": { + "description": "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.\n+optional", + "type": "string" + }, + "secretRef": { + "description": "The Secret to select from\n+optional", + "$ref": "#/definitions/v1.SecretEnvSource" + } + } + }, + "v1.EnvVar": { + "type": "object", + "properties": { + "name": { + "description": "Name of the environment variable. Must be a C_IDENTIFIER.", + "type": "string" + }, + "value": { + "description": "Variable references $(VAR_NAME) are expanded\nusing the previously defined environment variables in the container and\nany service environment variables. If a variable cannot be resolved,\nthe reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.\n\"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\".\nEscaped references will never be expanded, regardless of whether the variable\nexists or not.\nDefaults to \"\".\n+optional", + "type": "string" + }, + "valueFrom": { + "description": "Source for the environment variable's value. Cannot be used if value is not empty.\n+optional", + "$ref": "#/definitions/v1.EnvVarSource" + } + } + }, + "v1.EnvVarSource": { + "type": "object", + "properties": { + "configMapKeyRef": { + "description": "Selects a key of a ConfigMap.\n+optional", + "$ref": "#/definitions/v1.ConfigMapKeySelector" + }, + "fieldRef": { + "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, ` + "`" + `metadata.labels['\u003cKEY\u003e']` + "`" + `, ` + "`" + `metadata.annotations['\u003cKEY\u003e']` + "`" + `,\nspec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\n+optional", + "$ref": "#/definitions/v1.ObjectFieldSelector" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests\n(limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.\n+optional", + "$ref": "#/definitions/v1.ResourceFieldSelector" + }, + "secretKeyRef": { + "description": "Selects a key of a secret in the pod's namespace\n+optional", + "$ref": "#/definitions/v1.SecretKeySelector" + } + } + }, + "v1.EphemeralVolumeSource": { + "type": "object", + "properties": { + "volumeClaimTemplate": { + "description": "Will be used to create a stand-alone PVC to provision the volume.\nThe pod in which this EphemeralVolumeSource is embedded will be the\nowner of the PVC, i.e. the PVC will be deleted together with the\npod. The name of the PVC will be ` + "`" + `\u003cpod name\u003e-\u003cvolume name\u003e` + "`" + ` where\n` + "`" + `\u003cvolume name\u003e` + "`" + ` is the name from the ` + "`" + `PodSpec.Volumes` + "`" + ` array\nentry. Pod validation will reject the pod if the concatenated name\nis not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod\nwill *not* be used for the pod to avoid using an unrelated\nvolume by mistake. Starting the pod is then blocked until\nthe unrelated PVC is removed. If such a pre-created PVC is\nmeant to be used by the pod, the PVC has to updated with an\nowner reference to the pod once the pod exists. Normally\nthis should not be necessary, but it may be useful when\nmanually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes\nto the PVC after it has been created.\n\nRequired, must not be nil.", + "$ref": "#/definitions/v1.PersistentVolumeClaimTemplate" + } + } + }, + "v1.ExecAction": { + "type": "object", + "properties": { + "command": { + "description": "Command is the command line to execute inside the container, the working directory for the\ncommand is root ('/') in the container's filesystem. The command is simply exec'd, it is\nnot run inside a shell, so traditional shell instructions ('|', etc) won't work. To use\na shell, you need to explicitly call out to that shell.\nExit status of 0 is treated as live/healthy and non-zero is unhealthy.\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.FCVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "lun": { + "description": "Optional: FC target lun number\n+optional", + "type": "integer" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "targetWWNs": { + "description": "Optional: FC target worldwide names (WWNs)\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "wwids": { + "description": "Optional: FC volume world wide identifiers (wwids)\nEither wwids or combination of targetWWNs and lun must be set, but not both simultaneously.\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.FieldsV1": { + "type": "object" + }, + "v1.FlexVolumeSource": { + "type": "object", + "properties": { + "driver": { + "description": "Driver is the name of the driver to use for this volume.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.\n+optional", + "type": "string" + }, + "options": { + "description": "Optional: Extra command options if any.\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the secret object containing\nsensitive information to pass to the plugin scripts. This may be\nempty if no secret object is specified. If the secret object\ncontains more than one secret, all secrets are passed to the plugin\nscripts.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + } + } + }, + "v1.FlockerVolumeSource": { + "type": "object", + "properties": { + "datasetName": { + "description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker\nshould be considered as deprecated\n+optional", + "type": "string" + }, + "datasetUUID": { + "description": "UUID of the dataset. This is unique identifier of a Flocker dataset\n+optional", + "type": "string" + } + } + }, + "v1.GCEPersistentDiskVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount.\nIf omitted, the default is to mount by volume name.\nExamples: For volume /dev/sda1, you specify the partition as \"1\".\nSimilarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional", + "type": "integer" + }, + "pdName": { + "description": "Unique name of the PD resource in GCE. Used to identify the disk in GCE.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional", + "type": "boolean" + } + } + }, + "v1.GRPCAction": { + "type": "object", + "properties": { + "port": { + "description": "Port number of the gRPC service. Number must be in the range 1 to 65535.", + "type": "integer" + }, + "service": { + "description": "Service is the name of the service to place in the gRPC HealthCheckRequest\n(see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.\n+optional\n+default=\"\"", + "type": "string" + } + } + }, + "v1.GitRepoVolumeSource": { + "type": "object", + "properties": { + "directory": { + "description": "Target directory name.\nMust not contain or start with '..'. If '.' is supplied, the volume directory will be the\ngit repository. Otherwise, if specified, the volume will contain the git repository in\nthe subdirectory with the given name.\n+optional", + "type": "string" + }, + "repository": { + "description": "Repository URL", + "type": "string" + }, + "revision": { + "description": "Commit hash for the specified revision.\n+optional", + "type": "string" + } + } + }, + "v1.GlusterfsVolumeSource": { + "type": "object", + "properties": { + "endpoints": { + "description": "EndpointsName is the endpoint name that details Glusterfs topology.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "path": { + "description": "Path is the Glusterfs volume path.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.\nDefaults to false.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\n+optional", + "type": "boolean" + } + } + }, + "v1.HTTPGetAction": { + "type": "object", + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set\n\"Host\" in httpHeaders instead.\n+optional", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.HTTPHeader" + } + }, + "path": { + "description": "Path to access on the HTTP server.\n+optional", + "type": "string" + }, + "port": { + "description": "Name or number of the port to access on the container.\nNumber must be in the range 1 to 65535.\nName must be an IANA_SVC_NAME.", + "$ref": "#/definitions/intstr.IntOrString" + }, + "scheme": { + "description": "Scheme to use for connecting to the host.\nDefaults to HTTP.\n+optional", + "type": "string" + } + } + }, + "v1.HTTPHeader": { + "type": "object", + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + } + }, + "v1.HostPathVolumeSource": { + "type": "object", + "properties": { + "path": { + "description": "Path of the directory on the host.\nIf the path is a symlink, it will follow the link to the real path.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "type": "string" + }, + "type": { + "description": "Type for HostPath Volume\nDefaults to \"\"\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n+optional", + "type": "string" + } + } + }, + "v1.ISCSIVolumeSource": { + "type": "object", + "properties": { + "chapAuthDiscovery": { + "description": "whether support iSCSI Discovery CHAP authentication\n+optional", + "type": "boolean" + }, + "chapAuthSession": { + "description": "whether support iSCSI Session CHAP authentication\n+optional", + "type": "boolean" + }, + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "initiatorName": { + "description": "Custom iSCSI Initiator Name.\nIf initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface\n\u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.\n+optional", + "type": "string" + }, + "iqn": { + "description": "Target iSCSI Qualified Name.", + "type": "string" + }, + "iscsiInterface": { + "description": "iSCSI Interface Name that uses an iSCSI transport.\nDefaults to 'default' (tcp).\n+optional", + "type": "string" + }, + "lun": { + "description": "iSCSI Target Lun number.", + "type": "integer" + }, + "portals": { + "description": "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port\nis other than default (typically TCP ports 860 and 3260).\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "CHAP Secret for iSCSI target and initiator authentication\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "targetPortal": { + "description": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port\nis other than default (typically TCP ports 860 and 3260).", + "type": "string" + } + } + }, + "v1.KeyToPath": { + "type": "object", + "properties": { + "key": { + "description": "The key to project.", + "type": "string" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nIf not specified, the volume defaultMode will be used.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "path": { + "description": "The relative path of the file to map the key to.\nMay not be an absolute path.\nMay not contain the path element '..'.\nMay not start with the string '..'.", + "type": "string" + } + } + }, + "v1.LabelSelector": { + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LabelSelectorRequirement" + } + }, + "matchLabels": { + "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1.LabelSelectorRequirement": { + "type": "object", + "properties": { + "key": { + "description": "key is the label key that the selector applies to.\n+patchMergeKey=key\n+patchStrategy=merge", + "type": "string" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.Lifecycle": { + "type": "object", + "properties": { + "postStart": { + "description": "PostStart is called immediately after a container is created. If the handler fails,\nthe container is terminated and restarted according to its restart policy.\nOther management of the container blocks until the hook completes.\nMore info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n+optional", + "$ref": "#/definitions/v1.LifecycleHandler" + }, + "preStop": { + "description": "PreStop is called immediately before a container is terminated due to an\nAPI request or management event such as liveness/startup probe failure,\npreemption, resource contention, etc. The handler is not called if the\ncontainer crashes or exits. The Pod's termination grace period countdown begins before the\nPreStop hook is executed. Regardless of the outcome of the handler, the\ncontainer will eventually terminate within the Pod's termination grace\nperiod (unless delayed by finalizers). Other management of the container blocks until the hook completes\nor until the termination grace period is reached.\nMore info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n+optional", + "$ref": "#/definitions/v1.LifecycleHandler" + } + } + }, + "v1.LifecycleHandler": { + "type": "object", + "properties": { + "exec": { + "description": "Exec specifies the action to take.\n+optional", + "$ref": "#/definitions/v1.ExecAction" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.\n+optional", + "$ref": "#/definitions/v1.HTTPGetAction" + }, + "tcpSocket": { + "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept\nfor the backward compatibility. There are no validation of this field and\nlifecycle hooks will fail in runtime when tcp handler is specified.\n+optional", + "$ref": "#/definitions/v1.TCPSocketAction" + } + } + }, + "v1.LocalObjectReference": { + "type": "object", + "properties": { + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + } + } + }, + "v1.ManagedFieldsEntry": { + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set\napplies to. The format is \"group/version\" just like the top-level\nAPIVersion field. It is necessary to track the version of a field\nset because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "description": "FieldsType is the discriminator for the different fields format and version.\nThere is currently only one possible value: \"FieldsV1\"", + "type": "string" + }, + "fieldsV1": { + "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.\n+optional", + "$ref": "#/definitions/v1.FieldsV1" + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the name of the subresource used to update that object, or\nempty string if the object was updated through the main resource. The\nvalue of this field is used to distinguish between managers, even if they\nshare the same name. For example, a status update will be distinct from a\nregular update using the same manager name.\nNote that the APIVersion field is not related to the Subresource field and\nit always corresponds to the version of the main resource.", + "type": "string" + }, + "time": { + "description": "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'\n+optional", + "type": "string" + } + } + }, + "v1.NFSVolumeSource": { + "type": "object", + "properties": { + "path": { + "description": "Path that is exported by the NFS server.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force\nthe NFS export to be mounted with read-only permissions.\nDefaults to false.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\n+optional", + "type": "boolean" + }, + "server": { + "description": "Server is the hostname or IP address of the NFS server.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + } + } + }, + "v1.ObjectFieldSelector": { + "type": "object", + "properties": { + "apiVersion": { + "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".\n+optional", + "type": "string" + }, + "fieldPath": { + "description": "Path of the field to select in the specified API version.", + "type": "string" + } + } + }, + "v1.ObjectReference": { + "type": "object", + "properties": { + "apiVersion": { + "description": "API version of the referent.\n+optional", + "type": "string" + }, + "fieldPath": { + "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.\nTODO: this design is not final and this field is subject to change in the future.\n+optional", + "type": "string" + }, + "kind": { + "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n+optional", + "type": "string" + }, + "resourceVersion": { + "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "uid": { + "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\n+optional", + "type": "string" + } + } + }, + "v1.OwnerReference": { + "type": "object", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then\nthe owner cannot be deleted from the key-value store until this\nreference is removed.\nDefaults to false.\nTo set this field, a user needs \"delete\" permission of the owner,\notherwise 422 (Unprocessable Entity) will be returned.\n+optional", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.\n+optional", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimSpec": { + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "dataSource": { + "description": "This field can be used to specify either:\n* An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)\n* An existing PVC (PersistentVolumeClaim)\nIf the provisioner or an external controller can support the specified data source,\nit will create a new volume based on the contents of the specified data source.\nIf the AnyVolumeDataSource feature gate is enabled, this field will always have\nthe same contents as the DataSourceRef field.\n+optional", + "$ref": "#/definitions/v1.TypedLocalObjectReference" + }, + "dataSourceRef": { + "description": "Specifies the object from which to populate the volume with data, if a non-empty\nvolume is desired. This may be any local object from a non-empty API group (non\ncore object) or a PersistentVolumeClaim object.\nWhen this field is specified, volume binding will only succeed if the type of\nthe specified object matches some installed volume populator or dynamic\nprovisioner.\nThis field will replace the functionality of the DataSource field and as such\nif both fields are non-empty, they must have the same value. For backwards\ncompatibility, both fields (DataSource and DataSourceRef) will be set to the same\nvalue automatically if one of them is empty and the other is non-empty.\nThere are two important differences between DataSource and DataSourceRef:\n* While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.\n+optional", + "$ref": "#/definitions/v1.TypedLocalObjectReference" + }, + "resources": { + "description": "Resources represents the minimum resources the volume should have.\nIf RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements\nthat are lower than previous value but must still be higher than capacity recorded in the\nstatus field of the claim.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources\n+optional", + "$ref": "#/definitions/v1.ResourceRequirements" + }, + "selector": { + "description": "A label query over volumes to consider for binding.\n+optional", + "$ref": "#/definitions/v1.LabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1\n+optional", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim.\nValue of Filesystem is implied when not included in claim spec.\n+optional", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.\n+optional", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimTemplate": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional", + "type": "integer" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge", + "type": "array", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional", + "type": "integer" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional", + "type": "string" + }, + "spec": { + "description": "The specification for the PersistentVolumeClaim. The entire content is\ncopied unchanged into the PVC that gets created from this\ntemplate. The same fields as in a PersistentVolumeClaim\nare also valid here.", + "$ref": "#/definitions/v1.PersistentVolumeClaimSpec" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimVolumeSource": { + "type": "object", + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts.\nDefault false.\n+optional", + "type": "boolean" + } + } + }, + "v1.PhotonPersistentDiskVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "pdID": { + "description": "ID that identifies Photon Controller persistent disk", + "type": "string" + } + } + }, + "v1.PortworxVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "FSType represents the filesystem type to mount\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "volumeID": { + "description": "VolumeID uniquely identifies a Portworx volume", + "type": "string" + } + } + }, + "v1.Probe": { + "type": "object", + "properties": { + "exec": { + "description": "Exec specifies the action to take.\n+optional", + "$ref": "#/definitions/v1.ExecAction" + }, + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 3. Minimum value is 1.\n+optional", + "type": "integer" + }, + "grpc": { + "description": "GRPC specifies an action involving a GRPC port.\nThis is an alpha field and requires enabling GRPCContainerProbe feature gate.\n+featureGate=GRPCContainerProbe\n+optional", + "$ref": "#/definitions/v1.GRPCAction" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.\n+optional", + "$ref": "#/definitions/v1.HTTPGetAction" + }, + "initialDelaySeconds": { + "description": "Number of seconds after the container has started before liveness probes are initiated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "type": "integer" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe.\nDefault to 10 seconds. Minimum value is 1.\n+optional", + "type": "integer" + }, + "successThreshold": { + "description": "Minimum consecutive successes for the probe to be considered successful after having failed.\nDefaults to 1. Must be 1 for liveness and startup. Minimum value is 1.\n+optional", + "type": "integer" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port.\n+optional", + "$ref": "#/definitions/v1.TCPSocketAction" + }, + "terminationGracePeriodSeconds": { + "description": "Optional duration in seconds the pod needs to terminate gracefully upon probe failure.\nThe grace period is the duration in seconds after the processes running in the pod are sent\na termination signal and the time when the processes are forcibly halted with a kill signal.\nSet this value longer than the expected cleanup time for your process.\nIf this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this\nvalue overrides the value provided by the pod spec.\nValue must be non-negative integer. The value zero indicates stop immediately via\nthe kill signal (no opportunity to shut down).\nThis is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.\nMinimum value is 1. spec.terminationGracePeriodSeconds is used if unset.\n+optional", + "type": "integer" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out.\nDefaults to 1 second. Minimum value is 1.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "type": "integer" + } + } + }, + "v1.ProjectedVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "sources": { + "description": "list of volume projections\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeProjection" + } + } + } + }, + "v1.QuobyteVolumeSource": { + "type": "object", + "properties": { + "group": { + "description": "Group to map volume access to\nDefault is no group\n+optional", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.\nDefaults to false.\n+optional", + "type": "boolean" + }, + "registry": { + "description": "Registry represents a single or multiple Quobyte Registry services\nspecified as a string as host:port pair (multiple entries are separated with commas)\nwhich acts as the central registry for volumes", + "type": "string" + }, + "tenant": { + "description": "Tenant owning the given Quobyte volume in the Backend\nUsed with dynamically provisioned Quobyte volumes, value is set by the plugin\n+optional", + "type": "string" + }, + "user": { + "description": "User to map volume access to\nDefaults to serivceaccount user\n+optional", + "type": "string" + }, + "volume": { + "description": "Volume is a string that references an already created Quobyte volume by name.", + "type": "string" + } + } + }, + "v1.RBDVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#rbd\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "image": { + "description": "The rados image name.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "keyring": { + "description": "Keyring is the path to key ring for RBDUser.\nDefault is /etc/ceph/keyring.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "string" + }, + "monitors": { + "description": "A collection of Ceph monitors.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "pool": { + "description": "The rados pool name.\nDefault is rbd.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef is name of the authentication secret for RBDUser. If provided\noverrides keyring.\nDefault is nil.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "user": { + "description": "The rados user name.\nDefault is admin.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "string" + } + } + }, + "v1.ResourceFieldSelector": { + "type": "object", + "properties": { + "containerName": { + "description": "Container name: required for volumes, optional for env vars\n+optional", + "type": "string" + }, + "divisor": { + "description": "Specifies the output format of the exposed resources, defaults to \"1\"\n+optional", + "$ref": "#/definitions/resource.Quantity" + }, + "resource": { + "description": "Required: resource to select", + "type": "string" + } + } + }, + "v1.ResourceList": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/resource.Quantity" + } + }, + "v1.ResourceRequirements": { + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + "$ref": "#/definitions/v1.ResourceList" + }, + "requests": { + "description": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + "$ref": "#/definitions/v1.ResourceList" + } + } + }, + "v1.SELinuxOptions": { + "type": "object", + "properties": { + "level": { + "description": "Level is SELinux level label that applies to the container.\n+optional", + "type": "string" + }, + "role": { + "description": "Role is a SELinux role label that applies to the container.\n+optional", + "type": "string" + }, + "type": { + "description": "Type is a SELinux type label that applies to the container.\n+optional", + "type": "string" + }, + "user": { + "description": "User is a SELinux user label that applies to the container.\n+optional", + "type": "string" + } + } + }, + "v1.ScaleIOVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\".\nDefault is \"xfs\".\n+optional", + "type": "string" + }, + "gateway": { + "description": "The host address of the ScaleIO API Gateway.", + "type": "string" + }, + "protectionDomain": { + "description": "The name of the ScaleIO Protection Domain for the configured storage.\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef references to the secret for ScaleIO user and other\nsensitive information. If this is not provided, Login operation will fail.", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "sslEnabled": { + "description": "Flag to enable/disable SSL communication with Gateway, default false\n+optional", + "type": "boolean" + }, + "storageMode": { + "description": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.\nDefault is ThinProvisioned.\n+optional", + "type": "string" + }, + "storagePool": { + "description": "The ScaleIO Storage Pool associated with the protection domain.\n+optional", + "type": "string" + }, + "system": { + "description": "The name of the storage system as configured in ScaleIO.", + "type": "string" + }, + "volumeName": { + "description": "The name of a volume already created in the ScaleIO system\nthat is associated with this volume source.", + "type": "string" + } + } + }, + "v1.SeccompProfile": { + "type": "object", + "properties": { + "localhostProfile": { + "description": "localhostProfile indicates a profile defined in a file on the node should be used.\nThe profile must be preconfigured on the node to work.\nMust be a descending path, relative to the kubelet's configured seccomp profile location.\nMust only be set if type is \"Localhost\".\n+optional", + "type": "string" + }, + "type": { + "description": "type indicates which kind of seccomp profile will be applied.\nValid options are:\n\nLocalhost - a profile defined in a file on the node should be used.\nRuntimeDefault - the container runtime default profile should be used.\nUnconfined - no profile should be applied.\n+unionDiscriminator", + "type": "string" + } + } + }, + "v1.SecretEnvSource": { + "type": "object", + "properties": { + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.SecretKeySelector": { + "type": "object", + "properties": { + "key": { + "description": "The key of the secret to select from. Must be a valid secret key.", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.SecretProjection": { + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nSecret will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the Secret,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.SecretVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values\nfor mode bits. Defaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nSecret will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the Secret,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "optional": { + "description": "Specify whether the Secret or its keys must be defined\n+optional", + "type": "boolean" + }, + "secretName": { + "description": "Name of the secret in the pod's namespace to use.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#secret\n+optional", + "type": "string" + } + } + }, + "v1.SecurityContext": { + "type": "object", + "properties": { + "allowPrivilegeEscalation": { + "description": "AllowPrivilegeEscalation controls whether a process can gain more\nprivileges than its parent process. This bool directly controls if\nthe no_new_privs flag will be set on the container process.\nAllowPrivilegeEscalation is true always when the container is:\n1) run as Privileged\n2) has CAP_SYS_ADMIN\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "boolean" + }, + "capabilities": { + "description": "The capabilities to add/drop when running containers.\nDefaults to the default set of capabilities granted by the container runtime.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "$ref": "#/definitions/v1.Capabilities" + }, + "privileged": { + "description": "Run container in privileged mode.\nProcesses in privileged containers are essentially equivalent to root on the host.\nDefaults to false.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "boolean" + }, + "procMount": { + "description": "procMount denotes the type of proc mount to use for the containers.\nThe default is DefaultProcMount which uses the container runtime defaults for\nreadonly paths and masked paths.\nThis requires the ProcMountType feature flag to be enabled.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "string" + }, + "readOnlyRootFilesystem": { + "description": "Whether this container has a read-only root filesystem.\nDefault is false.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "boolean" + }, + "runAsGroup": { + "description": "The GID to run the entrypoint of the container process.\nUses runtime default if unset.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "integer" + }, + "runAsNonRoot": { + "description": "Indicates that the container must run as a non-root user.\nIf true, the Kubelet will validate the image at runtime to ensure that it\ndoes not run as UID 0 (root) and fail to start the container if it does.\nIf unset or false, no such validation will be performed.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional", + "type": "boolean" + }, + "runAsUser": { + "description": "The UID to run the entrypoint of the container process.\nDefaults to user specified in image metadata if unspecified.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "integer" + }, + "seLinuxOptions": { + "description": "The SELinux context to be applied to the container.\nIf unspecified, the container runtime will allocate a random SELinux context for each\ncontainer. May also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "$ref": "#/definitions/v1.SELinuxOptions" + }, + "seccompProfile": { + "description": "The seccomp options to use by this container. If seccomp options are\nprovided at both the pod \u0026 container level, the container options\noverride the pod options.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "$ref": "#/definitions/v1.SeccompProfile" + }, + "windowsOptions": { + "description": "The Windows specific settings applied to all containers.\nIf unspecified, the options from the PodSecurityContext will be used.\nIf set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is linux.\n+optional", + "$ref": "#/definitions/v1.WindowsSecurityContextOptions" + } + } + }, + "v1.ServiceAccountTokenProjection": { + "type": "object", + "properties": { + "audience": { + "description": "Audience is the intended audience of the token. A recipient of a token\nmust identify itself with an identifier specified in the audience of the\ntoken, and otherwise should reject the token. The audience defaults to the\nidentifier of the apiserver.\n+optional", + "type": "string" + }, + "expirationSeconds": { + "description": "ExpirationSeconds is the requested duration of validity of the service\naccount token. As the token approaches expiration, the kubelet volume\nplugin will proactively rotate the service account token. The kubelet will\nstart trying to rotate the token if the token is older than 80 percent of\nits time to live or if the token is older than 24 hours.Defaults to 1 hour\nand must be at least 10 minutes.\n+optional", + "type": "integer" + }, + "path": { + "description": "Path is the path relative to the mount point of the file to project the\ntoken into.", + "type": "string" + } + } + }, + "v1.StorageOSVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef specifies the secret to use for obtaining the StorageOS API\ncredentials. If not specified, default values will be attempted.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "volumeName": { + "description": "VolumeName is the human-readable name of the StorageOS volume. Volume\nnames are only unique within a namespace.", + "type": "string" + }, + "volumeNamespace": { + "description": "VolumeNamespace specifies the scope of the volume within StorageOS. If no\nnamespace is specified then the Pod's namespace will be used. This allows the\nKubernetes name scoping to be mirrored within StorageOS for tighter integration.\nSet VolumeName to any name to override the default behaviour.\nSet to \"default\" if you are not using namespaces within StorageOS.\nNamespaces that do not pre-exist within StorageOS will be created.\n+optional", + "type": "string" + } + } + }, + "v1.TCPSocketAction": { + "type": "object", + "properties": { + "host": { + "description": "Optional: Host name to connect to, defaults to the pod IP.\n+optional", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container.\nNumber must be in the range 1 to 65535.\nName must be an IANA_SVC_NAME.", + "$ref": "#/definitions/intstr.IntOrString" + } + } + }, + "v1.TypedLocalObjectReference": { + "type": "object", + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced.\nIf APIGroup is not specified, the specified Kind must be in the core API group.\nFor any other third-party types, APIGroup is required.\n+optional", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + } + }, + "v1.Volume": { + "type": "object", + "properties": { + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\n+optional", + "$ref": "#/definitions/v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\n+optional", + "$ref": "#/definitions/v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\n+optional", + "$ref": "#/definitions/v1.AzureFileVolumeSource" + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime\n+optional", + "$ref": "#/definitions/v1.CephFSVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional", + "$ref": "#/definitions/v1.CinderVolumeSource" + }, + "configMap": { + "description": "ConfigMap represents a configMap that should populate this volume\n+optional", + "$ref": "#/definitions/v1.ConfigMapVolumeSource" + }, + "csi": { + "description": "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).\n+optional", + "$ref": "#/definitions/v1.CSIVolumeSource" + }, + "downwardAPI": { + "description": "DownwardAPI represents downward API about the pod that should populate this volume\n+optional", + "$ref": "#/definitions/v1.DownwardAPIVolumeSource" + }, + "emptyDir": { + "description": "EmptyDir represents a temporary directory that shares a pod's lifetime.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\n+optional", + "$ref": "#/definitions/v1.EmptyDirVolumeSource" + }, + "ephemeral": { + "description": "Ephemeral represents a volume that is handled by a cluster storage driver.\nThe volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,\nand deleted when the pod is removed.\n\nUse this if:\na) the volume is only needed while the pod runs,\nb) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and\nd) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific\nAPIs for volumes that persist for longer than the lifecycle\nof an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to\nbe used that way - see the documentation of the driver for\nmore information.\n\nA pod can use both types of ephemeral volumes and\npersistent volumes at the same time.\n\n+optional", + "$ref": "#/definitions/v1.EphemeralVolumeSource" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.\n+optional", + "$ref": "#/definitions/v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is\nprovisioned/attached using an exec based plugin.\n+optional", + "$ref": "#/definitions/v1.FlexVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running\n+optional", + "$ref": "#/definitions/v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional", + "$ref": "#/definitions/v1.GCEPersistentDiskVolumeSource" + }, + "gitRepo": { + "description": "GitRepo represents a git repository at a particular revision.\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an\nEmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir\ninto the Pod's container.\n+optional", + "$ref": "#/definitions/v1.GitRepoVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md\n+optional", + "$ref": "#/definitions/v1.GlusterfsVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a pre-existing file or directory on the host\nmachine that is directly exposed to the container. This is generally\nused for system agents or other privileged things that are allowed\nto see the host machine. Most containers will NOT need this.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n---\nTODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not\nmount host directories as read/write.\n+optional", + "$ref": "#/definitions/v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://examples.k8s.io/volumes/iscsi/README.md\n+optional", + "$ref": "#/definitions/v1.ISCSIVolumeSource" + }, + "name": { + "description": "Volume's name.\nMust be a DNS_LABEL and unique within the pod.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "nfs": { + "description": "NFS represents an NFS mount on the host that shares a pod's lifetime\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\n+optional", + "$ref": "#/definitions/v1.NFSVolumeSource" + }, + "persistentVolumeClaim": { + "description": "PersistentVolumeClaimVolumeSource represents a reference to a\nPersistentVolumeClaim in the same namespace.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n+optional", + "$ref": "#/definitions/v1.PersistentVolumeClaimVolumeSource" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine\n+optional", + "$ref": "#/definitions/v1.PortworxVolumeSource" + }, + "projected": { + "description": "Items for all in one resources secrets, configmaps, and downward API", + "$ref": "#/definitions/v1.ProjectedVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime\n+optional", + "$ref": "#/definitions/v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.\nMore info: https://examples.k8s.io/volumes/rbd/README.md\n+optional", + "$ref": "#/definitions/v1.RBDVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\n+optional", + "$ref": "#/definitions/v1.ScaleIOVolumeSource" + }, + "secret": { + "description": "Secret represents a secret that should populate this volume.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#secret\n+optional", + "$ref": "#/definitions/v1.SecretVolumeSource" + }, + "storageos": { + "description": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.\n+optional", + "$ref": "#/definitions/v1.StorageOSVolumeSource" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine\n+optional", + "$ref": "#/definitions/v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "v1.VolumeDevice": { + "type": "object", + "properties": { + "devicePath": { + "description": "devicePath is the path inside of the container that the device will be mapped to.", + "type": "string" + }, + "name": { + "description": "name must match the name of a persistentVolumeClaim in the pod", + "type": "string" + } + } + }, + "v1.VolumeMount": { + "type": "object", + "properties": { + "mountPath": { + "description": "Path within the container at which the volume should be mounted. Must\nnot contain ':'.", + "type": "string" + }, + "mountPropagation": { + "description": "mountPropagation determines how mounts are propagated from the host\nto container and the other way around.\nWhen not set, MountPropagationNone is used.\nThis field is beta in 1.10.\n+optional", + "type": "string" + }, + "name": { + "description": "This must match the Name of a Volume.", + "type": "string" + }, + "readOnly": { + "description": "Mounted read-only if true, read-write otherwise (false or unspecified).\nDefaults to false.\n+optional", + "type": "boolean" + }, + "subPath": { + "description": "Path within the volume from which the container's volume should be mounted.\nDefaults to \"\" (volume's root).\n+optional", + "type": "string" + }, + "subPathExpr": { + "description": "Expanded path within the volume from which the container's volume should be mounted.\nBehaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.\nDefaults to \"\" (volume's root).\nSubPathExpr and SubPath are mutually exclusive.\n+optional", + "type": "string" + } + } + }, + "v1.VolumeProjection": { + "type": "object", + "properties": { + "configMap": { + "description": "information about the configMap data to project\n+optional", + "$ref": "#/definitions/v1.ConfigMapProjection" + }, + "downwardAPI": { + "description": "information about the downwardAPI data to project\n+optional", + "$ref": "#/definitions/v1.DownwardAPIProjection" + }, + "secret": { + "description": "information about the secret data to project\n+optional", + "$ref": "#/definitions/v1.SecretProjection" + }, + "serviceAccountToken": { + "description": "information about the serviceAccountToken data to project\n+optional", + "$ref": "#/definitions/v1.ServiceAccountTokenProjection" + } + } + }, + "v1.VsphereVirtualDiskVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional", + "type": "string" + }, + "storagePolicyID": { + "description": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.\n+optional", + "type": "string" + }, + "storagePolicyName": { + "description": "Storage Policy Based Management (SPBM) profile name.\n+optional", + "type": "string" + }, + "volumePath": { + "description": "Path that identifies vSphere volume vmdk", + "type": "string" + } + } + }, + "v1.WindowsSecurityContextOptions": { + "type": "object", + "properties": { + "gmsaCredentialSpec": { + "description": "GMSACredentialSpec is where the GMSA admission webhook\n(https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the\nGMSA credential spec named by the GMSACredentialSpecName field.\n+optional", + "type": "string" + }, + "gmsaCredentialSpecName": { + "description": "GMSACredentialSpecName is the name of the GMSA credential spec to use.\n+optional", + "type": "string" + }, + "hostProcess": { + "description": "HostProcess determines if a container should be run as a 'Host Process' container.\nThis field is alpha-level and will only be honored by components that enable the\nWindowsHostProcessContainers feature flag. Setting this field without the feature\nflag will result in errors when validating the Pod. All of a Pod's containers must\nhave the same effective HostProcess value (it is not allowed to have a mix of HostProcess\ncontainers and non-HostProcess containers). In addition, if HostProcess is true\nthen HostNetwork must also be set to true.\n+optional", + "type": "boolean" + }, + "runAsUserName": { + "description": "The UserName in Windows to run the entrypoint of the container process.\nDefaults to the user specified in image metadata if unspecified.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional", + "type": "string" + } + } + }, + "v1alpha1.AWSChaosSpec": { + "type": "object", + "properties": { + "action": { + "description": "Action defines the specific aws chaos action.\nSupported action: ec2-stop / ec2-restart / detach-volume\nDefault action: ec2-stop\n+kubebuilder:validation:Enum=ec2-stop;ec2-restart;detach-volume", + "type": "string" + }, + "awsRegion": { + "description": "AWSRegion defines the region of aws.", + "type": "string" + }, + "deviceName": { + "description": "DeviceName indicates the name of the device.\nNeeded in detach-volume.\n+ui:form:when=action=='detach-volume'\n+optional", + "type": "string" + }, + "duration": { + "description": "Duration represents the duration of the chaos action.\n+optional", "type": "string" }, "ec2Instance": { @@ -2990,7 +4867,6 @@ var doc = `{ "properties": { "atime": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Timespec" }, "blocks": { @@ -2999,7 +4875,6 @@ var doc = `{ }, "ctime": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Timespec" }, "gid": { @@ -3016,7 +4891,6 @@ var doc = `{ }, "mtime": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Timespec" }, "nlink": { @@ -3119,7 +4993,6 @@ var doc = `{ }, "delay": { "description": "Delay defines the delay distribution.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockDelaySpec" }, "duration": { @@ -3132,7 +5005,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -3188,17 +5060,14 @@ var doc = `{ "properties": { "awsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AWSChaosSpec" }, "azureChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AzureChaosSpec" }, "blockChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockChaosSpec" }, "concurrencyPolicy": { @@ -3207,12 +5076,10 @@ var doc = `{ }, "dnsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DNSChaosSpec" }, "gcpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.GCPChaosSpec" }, "historyLimit": { @@ -3221,37 +5088,30 @@ var doc = `{ }, "httpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPChaosSpec" }, "ioChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.IOChaosSpec" }, "jvmChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMChaosSpec" }, "kernelChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.KernelChaosSpec" }, "networkChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkChaosSpec" }, "physicalmachineChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec" }, "podChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodChaosSpec" }, "schedule": { @@ -3263,12 +5123,10 @@ var doc = `{ }, "stressChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressChaosSpec" }, "timeChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.TimeChaosSpec" }, "type": { @@ -3351,7 +5209,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -3378,7 +5235,6 @@ var doc = `{ }, "reorder": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ReorderSpec" } } @@ -3543,7 +5399,6 @@ var doc = `{ }, "patch": { "description": "Patch is a rule to patch some contents in target.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodHttpChaosPatchActions" }, "path": { @@ -3556,7 +5411,6 @@ var doc = `{ }, "replace": { "description": "Replace is a rule to replace some contents in target.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodHttpChaosReplaceActions" }, "request_headers": { @@ -3575,7 +5429,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "target": { @@ -3606,12 +5459,11 @@ var doc = `{ }, "criteria": { "description": "Criteria defines how to determine the result of the status check.", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPCriteria" }, "headers": { "description": "+optional", - "type": "string" + "$ref": "#/definitions/http.Header" }, "method": { "description": "+optional\n+kubebuilder:validation:Enum=GET;POST\n+kubebuilder:default=GET", @@ -3631,7 +5483,6 @@ var doc = `{ }, "attr": { "description": "Attr defines the overrided attribution\n+ui:form:when=action=='attrOverride'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AttrOverrideSpec" }, "containerNames": { @@ -3662,7 +5513,6 @@ var doc = `{ }, "mistake": { "description": "Mistake defines what types of incorrectness are injected to IO operations\n+ui:form:when=action=='mistake'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.MistakeSpec" }, "mode": { @@ -3679,7 +5529,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -3764,7 +5613,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "sqlType": { @@ -3923,7 +5771,6 @@ var doc = `{ }, "failKernRequest": { "description": "FailKernRequest defines the request of kernel injection", - "type": "object", "$ref": "#/definitions/v1alpha1.FailKernRequest" }, "mode": { @@ -3932,7 +5779,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -4035,17 +5881,14 @@ var doc = `{ }, "bandwidth": { "description": "Bandwidth represents the detail about bandwidth control action\n+ui:form:when=action=='bandwidth'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BandwidthSpec" }, "corrupt": { "description": "Corrupt represents the detail about corrupt action\n+ui:form:when=action=='corrupt'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.CorruptSpec" }, "delay": { "description": "Delay represents the detail about delay action\n+ui:form:when=action=='delay'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DelaySpec" }, "device": { @@ -4058,7 +5901,6 @@ var doc = `{ }, "duplicate": { "description": "DuplicateSpec represents the detail about loss action\n+ui:form:when=action=='duplicate'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DuplicateSpec" }, "duration": { @@ -4074,7 +5916,6 @@ var doc = `{ }, "loss": { "description": "Loss represents the detail about loss action\n+ui:form:when=action=='loss'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.LossSpec" }, "mode": { @@ -4083,12 +5924,10 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "target": { "description": "Target represents network target, this applies on netem and network partition action\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelector" }, "targetDevice": { @@ -4315,22 +6154,18 @@ var doc = `{ }, "clock": { "description": "+ui:form:when=action=='clock'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ClockSpec" }, "disk-fill": { "description": "+ui:form:when=action=='disk-fill'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DiskFillSpec" }, "disk-read-payload": { "description": "+ui:form:when=action=='disk-read-payload'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DiskPayloadSpec" }, "disk-write-payload": { "description": "+ui:form:when=action=='disk-write-payload'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DiskPayloadSpec" }, "duration": { @@ -4339,32 +6174,26 @@ var doc = `{ }, "jvm-exception": { "description": "+ui:form:when=action=='jvm-exception'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMExceptionSpec" }, "jvm-gc": { "description": "+ui:form:when=action=='jvm-gc'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMGCSpec" }, "jvm-latency": { "description": "+ui:form:when=action=='jvm-latency'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMLatencySpec" }, "jvm-return": { "description": "+ui:form:when=action=='jvm-return'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMReturnSpec" }, "jvm-rule-data": { "description": "+ui:form:when=action=='jvm-rule-data'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMRuleDataSpec" }, "jvm-stress": { "description": "+ui:form:when=action=='jvm-stress'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMStressSpec" }, "mode": { @@ -4373,57 +6202,46 @@ var doc = `{ }, "network-bandwidth": { "description": "+ui:form:when=action=='network-bandwidth'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkBandwidthSpec" }, "network-corrupt": { "description": "+ui:form:when=action=='network-corrupt'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkCorruptSpec" }, "network-delay": { "description": "+ui:form:when=action=='network-delay'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkDelaySpec" }, "network-dns": { "description": "+ui:form:when=action=='network-dns'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkDNSSpec" }, "network-duplicate": { "description": "+ui:form:when=action=='network-duplicate'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkDuplicateSpec" }, "network-loss": { "description": "+ui:form:when=action=='network-loss'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkLossSpec" }, "network-partition": { "description": "+ui:form:when=action=='network-partition'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkPartitionSpec" }, "process": { "description": "+ui:form:when=action=='process'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ProcessSpec" }, "selector": { "description": "Selector is used to select physical machines that are used to inject chaos action.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineSelectorSpec" }, "stress-cpu": { "description": "+ui:form:when=action=='stress-cpu'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressCPUSpec" }, "stress-mem": { "description": "+ui:form:when=action=='stress-mem'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressMemorySpec" }, "value": { @@ -4503,7 +6321,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -4517,7 +6334,6 @@ var doc = `{ "properties": { "body": { "description": "Body is a rule to patch message body of target.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodHttpChaosPatchBodyAction" }, "headers": { @@ -4602,7 +6418,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -4711,14 +6526,99 @@ var doc = `{ "v1alpha1.Schedule": { "type": "object", "properties": { - "spec": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", + "type": "string" + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional", + "type": "integer" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge", + "type": "array", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional", + "type": "integer" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional", "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional", + "type": "string" + }, + "spec": { "$ref": "#/definitions/v1alpha1.ScheduleSpec" }, "status": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ScheduleStatus" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional", + "type": "string" } } }, @@ -4727,17 +6627,14 @@ var doc = `{ "properties": { "awsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AWSChaosSpec" }, "azureChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AzureChaosSpec" }, "blockChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockChaosSpec" }, "concurrencyPolicy": { @@ -4746,12 +6643,10 @@ var doc = `{ }, "dnsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DNSChaosSpec" }, "gcpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.GCPChaosSpec" }, "historyLimit": { @@ -4760,37 +6655,30 @@ var doc = `{ }, "httpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPChaosSpec" }, "ioChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.IOChaosSpec" }, "jvmChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMChaosSpec" }, "kernelChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.KernelChaosSpec" }, "networkChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkChaosSpec" }, "physicalmachineChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec" }, "podChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodChaosSpec" }, "schedule": { @@ -4802,12 +6690,10 @@ var doc = `{ }, "stressChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressChaosSpec" }, "timeChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.TimeChaosSpec" }, "type": { @@ -4816,7 +6702,6 @@ var doc = `{ }, "workflow": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.WorkflowSpec" } } @@ -4826,7 +6711,10 @@ var doc = `{ "properties": { "active": { "description": "+optional", - "type": "string" + "type": "array", + "items": { + "$ref": "#/definitions/v1.ObjectReference" + } }, "time": { "description": "+optional\n+nullable", @@ -4847,7 +6735,6 @@ var doc = `{ }, "http": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPStatusCheck" }, "intervalSeconds": { @@ -4889,7 +6776,6 @@ var doc = `{ }, "http": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPStatusCheck" }, "intervalSeconds": { @@ -4958,7 +6844,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "stressngStressors": { @@ -4967,7 +6852,6 @@ var doc = `{ }, "stressors": { "description": "Stressors defines plenty of stressors supported to stress system components out.\nYou can use one or more of them to make up various kinds of stresses. At least\none of the stressors should be specified.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Stressors" }, "value": { @@ -4997,12 +6881,10 @@ var doc = `{ "properties": { "cpu": { "description": "CPUStressor stresses CPU out\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.CPUStressor" }, "memory": { "description": "MemoryStressor stresses virtual memory out\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.MemoryStressor" } } @@ -5012,11 +6894,14 @@ var doc = `{ "properties": { "container": { "description": "Container is the main container image to run in the pod", - "type": "string" + "$ref": "#/definitions/v1.Container" }, "volumes": { "description": "Volumes is a list of volumes that can be mounted by containers in a template.\n+patchStrategy=merge\n+patchMergeKey=name", - "type": "string" + "type": "array", + "items": { + "$ref": "#/definitions/v1.Volume" + } } } }, @@ -5029,17 +6914,14 @@ var doc = `{ }, "awsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AWSChaosSpec" }, "azureChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AzureChaosSpec" }, "blockChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockChaosSpec" }, "children": { @@ -5062,32 +6944,26 @@ var doc = `{ }, "dnsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DNSChaosSpec" }, "gcpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.GCPChaosSpec" }, "httpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPChaosSpec" }, "ioChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.IOChaosSpec" }, "jvmChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMChaosSpec" }, "kernelChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.KernelChaosSpec" }, "name": { @@ -5095,37 +6971,30 @@ var doc = `{ }, "networkChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkChaosSpec" }, "physicalmachineChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec" }, "podChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodChaosSpec" }, "schedule": { "description": "Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ChaosOnlyScheduleSpec" }, "statusCheck": { "description": "StatusCheck describe the behavior of StatusCheck. Only used when Type is TypeStatusCheck.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StatusCheckSpec" }, "stressChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressChaosSpec" }, "task": { "description": "Task describes the behavior of the custom task. Only used when Type is TypeTask.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Task" }, "templateType": { @@ -5133,7 +7002,6 @@ var doc = `{ }, "timeChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.TimeChaosSpec" } } @@ -5165,7 +7033,6 @@ var doc = `{ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "timeOffset": { @@ -5192,15 +7059,100 @@ var doc = `{ "v1alpha1.Workflow": { "type": "object", "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", + "type": "string" + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional", + "type": "integer" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge", + "type": "array", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional", + "type": "integer" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional", + "type": "string" + }, "spec": { "description": "Spec defines the behavior of a workflow", - "type": "object", "$ref": "#/definitions/v1alpha1.WorkflowSpec" }, "status": { "description": "+optional\nMost recently observed status of the workflow", - "type": "object", "$ref": "#/definitions/v1alpha1.WorkflowStatus" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional", + "type": "string" } } }, @@ -5258,61 +7210,22 @@ var doc = `{ "type": "string" } } - }, - "workflow.StatusResponse": { - "type": "object", - "properties": { - "status": { - "type": "string" - } - } } } }` -type swaggerInfo struct { - Version string - Host string - BasePath string - Schemes []string - Title string - Description string -} - // SwaggerInfo holds exported Swagger Info so clients can modify it -var SwaggerInfo = swaggerInfo{ - Version: "2.0", - Host: "", - BasePath: "/api", - Schemes: []string{}, - Title: "Chaos Mesh Dashboard API", - Description: "Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report.", -} - -type s struct{} - -func (s *s) ReadDoc() string { - sInfo := SwaggerInfo - sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1) - - t, err := template.New("swagger_info").Funcs(template.FuncMap{ - "marshal": func(v interface{}) string { - a, _ := json.Marshal(v) - return string(a) - }, - }).Parse(doc) - if err != nil { - return doc - } - - var tpl bytes.Buffer - if err := t.Execute(&tpl, sInfo); err != nil { - return doc - } - - return tpl.String() +var SwaggerInfo = &swag.Spec{ + Version: "2.2", + Host: "", + BasePath: "/api", + Schemes: []string{}, + Title: "Chaos Mesh Dashboard API", + Description: "Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report.", + InfoInstanceName: "swagger", + SwaggerTemplate: docTemplate, } func init() { - swag.Register(swag.Name, &s{}) + swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) } diff --git a/pkg/dashboard/swaggerdocs/placeholder.go b/pkg/dashboard/swaggerdocs/placeholder.go index ee574b3883..24bb98d823 100644 --- a/pkg/dashboard/swaggerdocs/placeholder.go +++ b/pkg/dashboard/swaggerdocs/placeholder.go @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// This file ensures the `swaggerdocs` package exists even if swagger is not enabled. This is also required for `go mod tidy`. +/* +Package swaggerdocs places swagger docs. + +This file ensures that the `swaggerdocs` package still exists when `swagger` is not enabled. +*/ package swaggerdocs diff --git a/pkg/dashboard/swaggerdocs/swagger.json b/pkg/dashboard/swaggerdocs/swagger.json index f0405f1855..22a71dba12 100644 --- a/pkg/dashboard/swaggerdocs/swagger.json +++ b/pkg/dashboard/swaggerdocs/swagger.json @@ -11,7 +11,7 @@ "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "2.0" + "version": "2.2" }, "basePath": "/api", "paths": { @@ -59,7 +59,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/archive.Archive" + "$ref": "#/definitions/types.Archive" } } }, @@ -135,7 +135,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/archive.Archive" + "$ref": "#/definitions/types.Archive" } } }, @@ -204,7 +204,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/archive.Detail" + "$ref": "#/definitions/types.ArchiveDetail" } }, "500": { @@ -279,7 +279,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/archive.Archive" + "$ref": "#/definitions/types.Archive" } } }, @@ -348,7 +348,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/archive.Detail" + "$ref": "#/definitions/types.ArchiveDetail" } }, "500": { @@ -416,7 +416,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/archive.Detail" + "$ref": "#/definitions/types.ArchiveDetail" } }, "404": { @@ -490,7 +490,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -609,7 +609,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -674,7 +674,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -709,7 +709,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "$ref": "#/definitions/utils.MapStringSliceResponse" } }, "500": { @@ -748,7 +748,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/common.PhysicalMachine" + "$ref": "#/definitions/types.PhysicalMachine" } } }, @@ -788,7 +788,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/common.Pod" + "$ref": "#/definitions/types.Pod" } } }, @@ -811,11 +811,28 @@ "common" ], "summary": "Get the rbac config according to the user's choice.", + "parameters": [ + { + "type": "string", + "description": "The namespace of RBAC", + "name": "namespace", + "in": "query" + }, + { + "type": "string", + "description": "The role of RBAC", + "name": "role", + "in": "query" + } + ], "responses": { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/common.MapSlice" + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "500": { @@ -881,7 +898,7 @@ "in": "query" }, { - "type": "string", + "type": "number", "description": "The max length of events list", "name": "limit", "in": "query" @@ -930,7 +947,7 @@ "in": "path" }, { - "type": "string", + "type": "number", "description": "The max length of events list", "name": "limit", "in": "query" @@ -1063,7 +1080,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/experiment.Experiment" + "$ref": "#/definitions/types.Experiment" } } }, @@ -1340,7 +1357,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/experiment.Detail" + "$ref": "#/definitions/types.ExperimentDetail" } }, "400": { @@ -1449,7 +1466,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/schedule.Schedule" + "$ref": "#/definitions/types.Schedule" } } }, @@ -1674,7 +1691,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/schedule.Detail" + "$ref": "#/definitions/types.ScheduleDetail" } }, "400": { @@ -1773,7 +1790,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/template.StatusCheckTemplateBase" + "$ref": "#/definitions/types.StatusCheckTemplateBase" } } }, @@ -1810,7 +1827,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } } ], @@ -1818,7 +1835,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } }, "400": { @@ -1866,7 +1883,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/template.StatusCheckTemplateDetail" + "$ref": "#/definitions/types.StatusCheckTemplateDetail" } }, "400": { @@ -1905,7 +1922,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } } ], @@ -1913,7 +1930,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/template.StatusCheckTemplate" + "$ref": "#/definitions/types.StatusCheckTemplate" } }, "400": { @@ -2312,7 +2329,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/workflow.StatusResponse" + "$ref": "#/definitions/utils.Response" } }, "400": { @@ -2338,58 +2355,6 @@ } }, "definitions": { - "archive.Archive": { - "$ref": "#/definitions/core.ObjectBase" - }, - "archive.Detail": { - "type": "object", - "properties": { - "kube_object": { - "type": "object", - "$ref": "#/definitions/core.KubeObjectDesc" - } - } - }, - "common.MapSlice": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "common.PhysicalMachine": { - "type": "object", - "properties": { - "address": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - } - } - }, - "common.Pod": { - "type": "object", - "properties": { - "ip": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "state": { - "type": "string" - } - } - }, "config.ChaosDashboardConfig": { "type": "object", "properties": { @@ -2487,13 +2452,18 @@ "core.KubeObjectDesc": { "type": "object", "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, "metadata": { - "type": "object", "$ref": "#/definitions/core.KubeObjectMeta" }, - "spec": { - "type": "object" - } + "spec": {} } }, "core.KubeObjectMeta": { @@ -2568,26 +2538,6 @@ } } }, - "core.ObjectBase": { - "type": "object", - "properties": { - "created_at": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "uid": { - "type": "string" - } - } - }, "core.Topology": { "type": "object", "properties": { @@ -2621,7 +2571,6 @@ "type": "integer" }, "kube_object": { - "type": "object", "$ref": "#/definitions/core.KubeObjectDesc" }, "name": { @@ -2634,7 +2583,6 @@ "type": "string" }, "topology": { - "type": "object", "$ref": "#/definitions/core.Topology" }, "uid": { @@ -2696,7 +2644,6 @@ "type": "boolean" }, "header": { - "type": "object", "$ref": "#/definitions/curl.Header" }, "jsonContent": { @@ -2713,20 +2660,87 @@ } } }, - "experiment.Detail": { + "http.Header": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "intstr.IntOrString": { + "type": "object", + "properties": { + "intVal": { + "type": "integer" + }, + "strVal": { + "type": "string" + }, + "type": { + "type": "integer" + } + } + }, + "resource.Quantity": { + "type": "object", + "properties": { + "Format": { + "type": "string" + } + } + }, + "status.AllChaosStatus": { + "type": "object", + "properties": { + "deleting": { + "type": "integer" + }, + "finished": { + "type": "integer" + }, + "injecting": { + "type": "integer" + }, + "paused": { + "type": "integer" + }, + "running": { + "type": "integer" + } + } + }, + "types.Archive": { "type": "object", "properties": { "created_at": { "type": "string" }, - "failed_message": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "types.ArchiveDetail": { + "type": "object", + "properties": { + "created_at": { "type": "string" }, "kind": { "type": "string" }, "kube_object": { - "type": "object", "$ref": "#/definitions/core.KubeObjectDesc" }, "name": { @@ -2735,15 +2749,12 @@ "namespace": { "type": "string" }, - "status": { - "type": "string" - }, "uid": { "type": "string" } } }, - "experiment.Experiment": { + "types.Experiment": { "type": "object", "properties": { "created_at": { @@ -2769,23 +2780,19 @@ } } }, - "schedule.Detail": { + "types.ExperimentDetail": { "type": "object", "properties": { "created_at": { "type": "string" }, - "experiment_uids": { - "type": "array", - "items": { - "type": "string" - } + "failed_message": { + "type": "string" }, "kind": { "type": "string" }, "kube_object": { - "type": "object", "$ref": "#/definitions/core.KubeObjectDesc" }, "name": { @@ -2802,7 +2809,38 @@ } } }, - "schedule.Schedule": { + "types.PhysicalMachine": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + } + }, + "types.Pod": { + "type": "object", + "properties": { + "ip": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "types.Schedule": { "type": "object", "properties": { "created_at": { @@ -2825,27 +2863,39 @@ } } }, - "status.AllChaosStatus": { + "types.ScheduleDetail": { "type": "object", "properties": { - "deleting": { - "type": "integer" + "created_at": { + "type": "string" }, - "finished": { - "type": "integer" + "experiment_uids": { + "type": "array", + "items": { + "type": "string" + } }, - "injecting": { - "type": "integer" + "kind": { + "type": "string" }, - "paused": { - "type": "integer" + "kube_object": { + "$ref": "#/definitions/core.KubeObjectDesc" }, - "running": { - "type": "integer" + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "status": { + "type": "string" + }, + "uid": { + "type": "string" } } }, - "template.StatusCheckTemplate": { + "types.StatusCheckTemplate": { "type": "object", "properties": { "description": { @@ -2858,12 +2908,11 @@ "type": "string" }, "spec": { - "type": "object", "$ref": "#/definitions/v1alpha1.StatusCheckTemplate" } } }, - "template.StatusCheckTemplateBase": { + "types.StatusCheckTemplateBase": { "type": "object", "properties": { "created_at": { @@ -2883,7 +2932,7 @@ } } }, - "template.StatusCheckTemplateDetail": { + "types.StatusCheckTemplateDetail": { "type": "object", "properties": { "created_at": { @@ -2895,39 +2944,1875 @@ "name": { "type": "string" }, - "namespace": { - "type": "string" + "namespace": { + "type": "string" + }, + "spec": { + "$ref": "#/definitions/v1alpha1.StatusCheckTemplate" + }, + "uid": { + "type": "string" + } + } + }, + "utils.APIError": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "full_text": { + "type": "string" + }, + "message": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "utils.MapStringSliceResponse": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "utils.Response": { + "type": "object", + "properties": { + "status": { + "type": "string" + } + } + }, + "v1.AWSElasticBlockStoreVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount.\nIf omitted, the default is to mount by volume name.\nExamples: For volume /dev/sda1, you specify the partition as \"1\".\nSimilarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).\n+optional", + "type": "integer" + }, + "readOnly": { + "description": "Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\".\nIf omitted, the default is \"false\".\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\n+optional", + "type": "boolean" + }, + "volumeID": { + "description": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume).\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", + "type": "string" + } + } + }, + "v1.AzureDiskVolumeSource": { + "type": "object", + "properties": { + "cachingMode": { + "description": "Host Caching mode: None, Read Only, Read Write.\n+optional", + "type": "string" + }, + "diskName": { + "description": "The Name of the data disk in the blob storage", + "type": "string" + }, + "diskURI": { + "description": "The URI the data disk in the blob storage", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional", + "type": "string" + }, + "kind": { + "description": "Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + } + } + }, + "v1.AzureFileVolumeSource": { + "type": "object", + "properties": { + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretName": { + "description": "the name of secret that contains Azure Storage Account Name and Key", + "type": "string" + }, + "shareName": { + "description": "Share Name", + "type": "string" + } + } + }, + "v1.CSIVolumeSource": { + "type": "object", + "properties": { + "driver": { + "description": "Driver is the name of the CSI driver that handles this volume.\nConsult with your admin for the correct name as registered in the cluster.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\".\nIf not provided, the empty value is passed to the associated CSI driver\nwhich will determine the default filesystem to apply.\n+optional", + "type": "string" + }, + "nodePublishSecretRef": { + "description": "NodePublishSecretRef is a reference to the secret object containing\nsensitive information to pass to the CSI driver to complete the CSI\nNodePublishVolume and NodeUnpublishVolume calls.\nThis field is optional, and may be empty if no secret is required. If the\nsecret object contains more than one secret, all secret references are passed.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "readOnly": { + "description": "Specifies a read-only configuration for the volume.\nDefaults to false (read/write).\n+optional", + "type": "boolean" + }, + "volumeAttributes": { + "description": "VolumeAttributes stores driver-specific properties that are passed to the CSI\ndriver. Consult your driver's documentation for supported values.\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1.Capabilities": { + "type": "object", + "properties": { + "add": { + "description": "Added capabilities\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "drop": { + "description": "Removed capabilities\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.CephFSVolumeSource": { + "type": "object", + "properties": { + "monitors": { + "description": "Required: Monitors is a collection of Ceph monitors\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "type": "boolean" + }, + "secretFile": { + "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "type": "string" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty.\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "user": { + "description": "Optional: User is the rados user name, default is admin\nMore info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it\n+optional", + "type": "string" + } + } + }, + "v1.CinderVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: points to a secret object containing parameters used to connect\nto OpenStack.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "volumeID": { + "description": "volume id used to identify the volume in cinder.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md", + "type": "string" + } + } + }, + "v1.ConfigMapEnvSource": { + "type": "object", + "properties": { + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.ConfigMapKeySelector": { + "type": "object", + "properties": { + "key": { + "description": "The key to select.", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its key must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.ConfigMapProjection": { + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nConfigMap will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the ConfigMap,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its keys must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.ConfigMapVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDefaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nConfigMap will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the ConfigMap,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or its keys must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.Container": { + "type": "object", + "properties": { + "args": { + "description": "Arguments to the entrypoint.\nThe docker image's CMD is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will\nproduce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless\nof whether the variable exists or not. Cannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "command": { + "description": "Entrypoint array. Not executed within a shell.\nThe docker image's ENTRYPOINT is used if this is not provided.\nVariable references $(VAR_NAME) are expanded using the container's environment. If a variable\ncannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will\nproduce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless\nof whether the variable exists or not. Cannot be updated.\nMore info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "List of environment variables to set in the container.\nCannot be updated.\n+optional\n+patchMergeKey=name\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvVar" + } + }, + "envFrom": { + "description": "List of sources to populate environment variables in the container.\nThe keys defined within a source must be a C_IDENTIFIER. All invalid keys\nwill be reported as an event when the container is starting. When a key exists in multiple\nsources, the value associated with the last source will take precedence.\nValues defined by an Env with a duplicate key will take precedence.\nCannot be updated.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.EnvFromSource" + } + }, + "image": { + "description": "Docker image name.\nMore info: https://kubernetes.io/docs/concepts/containers/images\nThis field is optional to allow higher level config management to default or override\ncontainer images in workload controllers like Deployments and StatefulSets.\n+optional", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy.\nOne of Always, Never, IfNotPresent.\nDefaults to Always if :latest tag is specified, or IfNotPresent otherwise.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/containers/images#updating-images\n+optional", + "type": "string" + }, + "lifecycle": { + "description": "Actions that the management system should take in response to container lifecycle events.\nCannot be updated.\n+optional", + "$ref": "#/definitions/v1.Lifecycle" + }, + "livenessProbe": { + "description": "Periodic probe of container liveness.\nContainer will be restarted if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "$ref": "#/definitions/v1.Probe" + }, + "name": { + "description": "Name of the container specified as a DNS_LABEL.\nEach container in a pod must have a unique name (DNS_LABEL).\nCannot be updated.", + "type": "string" + }, + "ports": { + "description": "List of ports to expose from the container. Exposing a port here gives\nthe system additional information about the network connections a\ncontainer uses, but is primarily informational. Not specifying a port here\nDOES NOT prevent that port from being exposed. Any port which is\nlistening on the default \"0.0.0.0\" address inside a container will be\naccessible from the network.\nCannot be updated.\n+optional\n+patchMergeKey=containerPort\n+patchStrategy=merge\n+listType=map\n+listMapKey=containerPort\n+listMapKey=protocol", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ContainerPort" + } + }, + "readinessProbe": { + "description": "Periodic probe of container service readiness.\nContainer will be removed from service endpoints if the probe fails.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "$ref": "#/definitions/v1.Probe" + }, + "resources": { + "description": "Compute Resources required by this container.\nCannot be updated.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + "$ref": "#/definitions/v1.ResourceRequirements" + }, + "securityContext": { + "description": "SecurityContext defines the security options the container should be run with.\nIf set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.\nMore info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/\n+optional", + "$ref": "#/definitions/v1.SecurityContext" + }, + "startupProbe": { + "description": "StartupProbe indicates that the Pod has successfully initialized.\nIf specified, no other probes are executed until this completes successfully.\nIf this probe fails, the Pod will be restarted, just as if the livenessProbe failed.\nThis can be used to provide different probe parameters at the beginning of a Pod's lifecycle,\nwhen it might take a long time to load data or warm a cache, than during steady-state operation.\nThis cannot be updated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "$ref": "#/definitions/v1.Probe" + }, + "stdin": { + "description": "Whether this container should allocate a buffer for stdin in the container runtime. If this\nis not set, reads from stdin in the container will always result in EOF.\nDefault is false.\n+optional", + "type": "boolean" + }, + "stdinOnce": { + "description": "Whether the container runtime should close the stdin channel after it has been opened by\na single attach. When stdin is true the stdin stream will remain open across multiple attach\nsessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the\nfirst client attaches to stdin, and then remains open and accepts data until the client disconnects,\nat which time stdin is closed and remains closed until the container is restarted. If this\nflag is false, a container processes that reads from stdin will never receive an EOF.\nDefault is false\n+optional", + "type": "boolean" + }, + "terminationMessagePath": { + "description": "Optional: Path at which the file to which the container's termination message\nwill be written is mounted into the container's filesystem.\nMessage written is intended to be brief final status, such as an assertion failure message.\nWill be truncated by the node if greater than 4096 bytes. The total message length across\nall containers will be limited to 12kb.\nDefaults to /dev/termination-log.\nCannot be updated.\n+optional", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "Indicate how the termination message should be populated. File will use the contents of\nterminationMessagePath to populate the container status message on both success and failure.\nFallbackToLogsOnError will use the last chunk of container log output if the termination\nmessage file is empty and the container exited with an error.\nThe log output is limited to 2048 bytes or 80 lines, whichever is smaller.\nDefaults to File.\nCannot be updated.\n+optional", + "type": "string" + }, + "tty": { + "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.\nDefault is false.\n+optional", + "type": "boolean" + }, + "volumeDevices": { + "description": "volumeDevices is the list of block devices to be used by the container.\n+patchMergeKey=devicePath\n+patchStrategy=merge\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeDevice" + } + }, + "volumeMounts": { + "description": "Pod volumes to mount into the container's filesystem.\nCannot be updated.\n+optional\n+patchMergeKey=mountPath\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeMount" + } + }, + "workingDir": { + "description": "Container's working directory.\nIf not specified, the container runtime's default will be used, which\nmight be configured in the container image.\nCannot be updated.\n+optional", + "type": "string" + } + } + }, + "v1.ContainerPort": { + "type": "object", + "properties": { + "containerPort": { + "description": "Number of port to expose on the pod's IP address.\nThis must be a valid port number, 0 \u003c x \u003c 65536.", + "type": "integer" + }, + "hostIP": { + "description": "What host IP to bind the external port to.\n+optional", + "type": "string" + }, + "hostPort": { + "description": "Number of port to expose on the host.\nIf specified, this must be a valid port number, 0 \u003c x \u003c 65536.\nIf HostNetwork is specified, this must match ContainerPort.\nMost containers do not need this.\n+optional", + "type": "integer" + }, + "name": { + "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each\nnamed port in a pod must have a unique name. Name for the port that can be\nreferred to by services.\n+optional", + "type": "string" + }, + "protocol": { + "description": "Protocol for port. Must be UDP, TCP, or SCTP.\nDefaults to \"TCP\".\n+optional\n+default=\"TCP\"", + "type": "string" + } + } + }, + "v1.DownwardAPIProjection": { + "type": "object", + "properties": { + "items": { + "description": "Items is a list of DownwardAPIVolume file\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DownwardAPIVolumeFile" + } + } + } + }, + "v1.DownwardAPIVolumeFile": { + "type": "object", + "properties": { + "fieldRef": { + "description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.\n+optional", + "$ref": "#/definitions/v1.ObjectFieldSelector" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file, must be an octal value\nbetween 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nIf not specified, the volume defaultMode will be used.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "path": { + "description": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + "type": "string" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests\n(limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.\n+optional", + "$ref": "#/definitions/v1.ResourceFieldSelector" + } + } + }, + "v1.DownwardAPIVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits to use on created files by default. Must be a\nOptional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDefaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "items": { + "description": "Items is a list of downward API volume file\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DownwardAPIVolumeFile" + } + } + } + }, + "v1.EmptyDirVolumeSource": { + "type": "object", + "properties": { + "medium": { + "description": "What type of storage medium should back this directory.\nThe default is \"\" which means to use the node's default medium.\nMust be an empty string (default) or Memory.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\n+optional", + "type": "string" + }, + "sizeLimit": { + "description": "Total amount of local storage required for this EmptyDir volume.\nThe size limit is also applicable for memory medium.\nThe maximum usage on memory medium EmptyDir would be the minimum value between\nthe SizeLimit specified here and the sum of memory limits of all containers in a pod.\nThe default is nil which means that the limit is undefined.\nMore info: http://kubernetes.io/docs/user-guide/volumes#emptydir\n+optional", + "$ref": "#/definitions/resource.Quantity" + } + } + }, + "v1.EnvFromSource": { + "type": "object", + "properties": { + "configMapRef": { + "description": "The ConfigMap to select from\n+optional", + "$ref": "#/definitions/v1.ConfigMapEnvSource" + }, + "prefix": { + "description": "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.\n+optional", + "type": "string" + }, + "secretRef": { + "description": "The Secret to select from\n+optional", + "$ref": "#/definitions/v1.SecretEnvSource" + } + } + }, + "v1.EnvVar": { + "type": "object", + "properties": { + "name": { + "description": "Name of the environment variable. Must be a C_IDENTIFIER.", + "type": "string" + }, + "value": { + "description": "Variable references $(VAR_NAME) are expanded\nusing the previously defined environment variables in the container and\nany service environment variables. If a variable cannot be resolved,\nthe reference in the input string will be unchanged. Double $$ are reduced\nto a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.\n\"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\".\nEscaped references will never be expanded, regardless of whether the variable\nexists or not.\nDefaults to \"\".\n+optional", + "type": "string" + }, + "valueFrom": { + "description": "Source for the environment variable's value. Cannot be used if value is not empty.\n+optional", + "$ref": "#/definitions/v1.EnvVarSource" + } + } + }, + "v1.EnvVarSource": { + "type": "object", + "properties": { + "configMapKeyRef": { + "description": "Selects a key of a ConfigMap.\n+optional", + "$ref": "#/definitions/v1.ConfigMapKeySelector" + }, + "fieldRef": { + "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['\u003cKEY\u003e']`, `metadata.annotations['\u003cKEY\u003e']`,\nspec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.\n+optional", + "$ref": "#/definitions/v1.ObjectFieldSelector" + }, + "resourceFieldRef": { + "description": "Selects a resource of the container: only resources limits and requests\n(limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.\n+optional", + "$ref": "#/definitions/v1.ResourceFieldSelector" + }, + "secretKeyRef": { + "description": "Selects a key of a secret in the pod's namespace\n+optional", + "$ref": "#/definitions/v1.SecretKeySelector" + } + } + }, + "v1.EphemeralVolumeSource": { + "type": "object", + "properties": { + "volumeClaimTemplate": { + "description": "Will be used to create a stand-alone PVC to provision the volume.\nThe pod in which this EphemeralVolumeSource is embedded will be the\nowner of the PVC, i.e. the PVC will be deleted together with the\npod. The name of the PVC will be `\u003cpod name\u003e-\u003cvolume name\u003e` where\n`\u003cvolume name\u003e` is the name from the `PodSpec.Volumes` array\nentry. Pod validation will reject the pod if the concatenated name\nis not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod\nwill *not* be used for the pod to avoid using an unrelated\nvolume by mistake. Starting the pod is then blocked until\nthe unrelated PVC is removed. If such a pre-created PVC is\nmeant to be used by the pod, the PVC has to updated with an\nowner reference to the pod once the pod exists. Normally\nthis should not be necessary, but it may be useful when\nmanually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes\nto the PVC after it has been created.\n\nRequired, must not be nil.", + "$ref": "#/definitions/v1.PersistentVolumeClaimTemplate" + } + } + }, + "v1.ExecAction": { + "type": "object", + "properties": { + "command": { + "description": "Command is the command line to execute inside the container, the working directory for the\ncommand is root ('/') in the container's filesystem. The command is simply exec'd, it is\nnot run inside a shell, so traditional shell instructions ('|', etc) won't work. To use\na shell, you need to explicitly call out to that shell.\nExit status of 0 is treated as live/healthy and non-zero is unhealthy.\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.FCVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "lun": { + "description": "Optional: FC target lun number\n+optional", + "type": "integer" + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "targetWWNs": { + "description": "Optional: FC target worldwide names (WWNs)\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "wwids": { + "description": "Optional: FC volume world wide identifiers (wwids)\nEither wwids or combination of targetWWNs and lun must be set, but not both simultaneously.\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.FieldsV1": { + "type": "object" + }, + "v1.FlexVolumeSource": { + "type": "object", + "properties": { + "driver": { + "description": "Driver is the name of the driver to use for this volume.", + "type": "string" + }, + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.\n+optional", + "type": "string" + }, + "options": { + "description": "Optional: Extra command options if any.\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "readOnly": { + "description": "Optional: Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "Optional: SecretRef is reference to the secret object containing\nsensitive information to pass to the plugin scripts. This may be\nempty if no secret object is specified. If the secret object\ncontains more than one secret, all secrets are passed to the plugin\nscripts.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + } + } + }, + "v1.FlockerVolumeSource": { + "type": "object", + "properties": { + "datasetName": { + "description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker\nshould be considered as deprecated\n+optional", + "type": "string" + }, + "datasetUUID": { + "description": "UUID of the dataset. This is unique identifier of a Flocker dataset\n+optional", + "type": "string" + } + } + }, + "v1.GCEPersistentDiskVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "partition": { + "description": "The partition in the volume that you want to mount.\nIf omitted, the default is to mount by volume name.\nExamples: For volume /dev/sda1, you specify the partition as \"1\".\nSimilarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty).\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional", + "type": "integer" + }, + "pdName": { + "description": "Unique name of the PD resource in GCE. Used to identify the disk in GCE.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional", + "type": "boolean" + } + } + }, + "v1.GRPCAction": { + "type": "object", + "properties": { + "port": { + "description": "Port number of the gRPC service. Number must be in the range 1 to 65535.", + "type": "integer" + }, + "service": { + "description": "Service is the name of the service to place in the gRPC HealthCheckRequest\n(see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.\n+optional\n+default=\"\"", + "type": "string" + } + } + }, + "v1.GitRepoVolumeSource": { + "type": "object", + "properties": { + "directory": { + "description": "Target directory name.\nMust not contain or start with '..'. If '.' is supplied, the volume directory will be the\ngit repository. Otherwise, if specified, the volume will contain the git repository in\nthe subdirectory with the given name.\n+optional", + "type": "string" + }, + "repository": { + "description": "Repository URL", + "type": "string" + }, + "revision": { + "description": "Commit hash for the specified revision.\n+optional", + "type": "string" + } + } + }, + "v1.GlusterfsVolumeSource": { + "type": "object", + "properties": { + "endpoints": { + "description": "EndpointsName is the endpoint name that details Glusterfs topology.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "path": { + "description": "Path is the Glusterfs volume path.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions.\nDefaults to false.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod\n+optional", + "type": "boolean" + } + } + }, + "v1.HTTPGetAction": { + "type": "object", + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set\n\"Host\" in httpHeaders instead.\n+optional", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.HTTPHeader" + } + }, + "path": { + "description": "Path to access on the HTTP server.\n+optional", + "type": "string" + }, + "port": { + "description": "Name or number of the port to access on the container.\nNumber must be in the range 1 to 65535.\nName must be an IANA_SVC_NAME.", + "$ref": "#/definitions/intstr.IntOrString" + }, + "scheme": { + "description": "Scheme to use for connecting to the host.\nDefaults to HTTP.\n+optional", + "type": "string" + } + } + }, + "v1.HTTPHeader": { + "type": "object", + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + } + }, + "v1.HostPathVolumeSource": { + "type": "object", + "properties": { + "path": { + "description": "Path of the directory on the host.\nIf the path is a symlink, it will follow the link to the real path.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", + "type": "string" + }, + "type": { + "description": "Type for HostPath Volume\nDefaults to \"\"\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n+optional", + "type": "string" + } + } + }, + "v1.ISCSIVolumeSource": { + "type": "object", + "properties": { + "chapAuthDiscovery": { + "description": "whether support iSCSI Discovery CHAP authentication\n+optional", + "type": "boolean" + }, + "chapAuthSession": { + "description": "whether support iSCSI Session CHAP authentication\n+optional", + "type": "boolean" + }, + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "initiatorName": { + "description": "Custom iSCSI Initiator Name.\nIf initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface\n\u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.\n+optional", + "type": "string" + }, + "iqn": { + "description": "Target iSCSI Qualified Name.", + "type": "string" + }, + "iscsiInterface": { + "description": "iSCSI Interface Name that uses an iSCSI transport.\nDefaults to 'default' (tcp).\n+optional", + "type": "string" + }, + "lun": { + "description": "iSCSI Target Lun number.", + "type": "integer" + }, + "portals": { + "description": "iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port\nis other than default (typically TCP ports 860 and 3260).\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "CHAP Secret for iSCSI target and initiator authentication\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "targetPortal": { + "description": "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port\nis other than default (typically TCP ports 860 and 3260).", + "type": "string" + } + } + }, + "v1.KeyToPath": { + "type": "object", + "properties": { + "key": { + "description": "The key to project.", + "type": "string" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nIf not specified, the volume defaultMode will be used.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "path": { + "description": "The relative path of the file to map the key to.\nMay not be an absolute path.\nMay not contain the path element '..'.\nMay not start with the string '..'.", + "type": "string" + } + } + }, + "v1.LabelSelector": { + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.LabelSelectorRequirement" + } + }, + "matchLabels": { + "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1.LabelSelectorRequirement": { + "type": "object", + "properties": { + "key": { + "description": "key is the label key that the selector applies to.\n+patchMergeKey=key\n+patchStrategy=merge", + "type": "string" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.\n+optional", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1.Lifecycle": { + "type": "object", + "properties": { + "postStart": { + "description": "PostStart is called immediately after a container is created. If the handler fails,\nthe container is terminated and restarted according to its restart policy.\nOther management of the container blocks until the hook completes.\nMore info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n+optional", + "$ref": "#/definitions/v1.LifecycleHandler" + }, + "preStop": { + "description": "PreStop is called immediately before a container is terminated due to an\nAPI request or management event such as liveness/startup probe failure,\npreemption, resource contention, etc. The handler is not called if the\ncontainer crashes or exits. The Pod's termination grace period countdown begins before the\nPreStop hook is executed. Regardless of the outcome of the handler, the\ncontainer will eventually terminate within the Pod's termination grace\nperiod (unless delayed by finalizers). Other management of the container blocks until the hook completes\nor until the termination grace period is reached.\nMore info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks\n+optional", + "$ref": "#/definitions/v1.LifecycleHandler" + } + } + }, + "v1.LifecycleHandler": { + "type": "object", + "properties": { + "exec": { + "description": "Exec specifies the action to take.\n+optional", + "$ref": "#/definitions/v1.ExecAction" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.\n+optional", + "$ref": "#/definitions/v1.HTTPGetAction" + }, + "tcpSocket": { + "description": "Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept\nfor the backward compatibility. There are no validation of this field and\nlifecycle hooks will fail in runtime when tcp handler is specified.\n+optional", + "$ref": "#/definitions/v1.TCPSocketAction" + } + } + }, + "v1.LocalObjectReference": { + "type": "object", + "properties": { + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + } + } + }, + "v1.ManagedFieldsEntry": { + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set\napplies to. The format is \"group/version\" just like the top-level\nAPIVersion field. It is necessary to track the version of a field\nset because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "description": "FieldsType is the discriminator for the different fields format and version.\nThere is currently only one possible value: \"FieldsV1\"", + "type": "string" + }, + "fieldsV1": { + "description": "FieldsV1 holds the first JSON version format as described in the \"FieldsV1\" type.\n+optional", + "$ref": "#/definitions/v1.FieldsV1" + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created.\nThe only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the name of the subresource used to update that object, or\nempty string if the object was updated through the main resource. The\nvalue of this field is used to distinguish between managers, even if they\nshare the same name. For example, a status update will be distinct from a\nregular update using the same manager name.\nNote that the APIVersion field is not related to the Subresource field and\nit always corresponds to the version of the main resource.", + "type": "string" + }, + "time": { + "description": "Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'\n+optional", + "type": "string" + } + } + }, + "v1.NFSVolumeSource": { + "type": "object", + "properties": { + "path": { + "description": "Path that is exported by the NFS server.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force\nthe NFS export to be mounted with read-only permissions.\nDefaults to false.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\n+optional", + "type": "boolean" + }, + "server": { + "description": "Server is the hostname or IP address of the NFS server.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", + "type": "string" + } + } + }, + "v1.ObjectFieldSelector": { + "type": "object", + "properties": { + "apiVersion": { + "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".\n+optional", + "type": "string" + }, + "fieldPath": { + "description": "Path of the field to select in the specified API version.", + "type": "string" + } + } + }, + "v1.ObjectReference": { + "type": "object", + "properties": { + "apiVersion": { + "description": "API version of the referent.\n+optional", + "type": "string" + }, + "fieldPath": { + "description": "If referring to a piece of an object instead of an entire object, this string\nshould contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].\nFor example, if the object reference is to a container within a pod, this would take on a value like:\n\"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered\nthe event) or if no container name is specified \"spec.containers[2]\" (container with\nindex 2 in this pod). This syntax is chosen only to have some well-defined way of\nreferencing a part of an object.\nTODO: this design is not final and this field is subject to change in the future.\n+optional", + "type": "string" + }, + "kind": { + "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/\n+optional", + "type": "string" + }, + "resourceVersion": { + "description": "Specific resourceVersion to which this reference is made, if any.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "uid": { + "description": "UID of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids\n+optional", + "type": "string" + } + } + }, + "v1.OwnerReference": { + "type": "object", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then\nthe owner cannot be deleted from the key-value store until this\nreference is removed.\nDefaults to false.\nTo set this field, a user needs \"delete\" permission of the owner,\notherwise 422 (Unprocessable Entity) will be returned.\n+optional", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.\n+optional", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimSpec": { + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1\n+optional", + "type": "array", + "items": { + "type": "string" + } + }, + "dataSource": { + "description": "This field can be used to specify either:\n* An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)\n* An existing PVC (PersistentVolumeClaim)\nIf the provisioner or an external controller can support the specified data source,\nit will create a new volume based on the contents of the specified data source.\nIf the AnyVolumeDataSource feature gate is enabled, this field will always have\nthe same contents as the DataSourceRef field.\n+optional", + "$ref": "#/definitions/v1.TypedLocalObjectReference" + }, + "dataSourceRef": { + "description": "Specifies the object from which to populate the volume with data, if a non-empty\nvolume is desired. This may be any local object from a non-empty API group (non\ncore object) or a PersistentVolumeClaim object.\nWhen this field is specified, volume binding will only succeed if the type of\nthe specified object matches some installed volume populator or dynamic\nprovisioner.\nThis field will replace the functionality of the DataSource field and as such\nif both fields are non-empty, they must have the same value. For backwards\ncompatibility, both fields (DataSource and DataSourceRef) will be set to the same\nvalue automatically if one of them is empty and the other is non-empty.\nThere are two important differences between DataSource and DataSourceRef:\n* While DataSource only allows two specific types of objects, DataSourceRef\n allows any non-core object, as well as PersistentVolumeClaim objects.\n* While DataSource ignores disallowed values (dropping them), DataSourceRef\n preserves all values, and generates an error if a disallowed value is\n specified.\n(Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled.\n+optional", + "$ref": "#/definitions/v1.TypedLocalObjectReference" + }, + "resources": { + "description": "Resources represents the minimum resources the volume should have.\nIf RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements\nthat are lower than previous value but must still be higher than capacity recorded in the\nstatus field of the claim.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources\n+optional", + "$ref": "#/definitions/v1.ResourceRequirements" + }, + "selector": { + "description": "A label query over volumes to consider for binding.\n+optional", + "$ref": "#/definitions/v1.LabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1\n+optional", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim.\nValue of Filesystem is implied when not included in claim spec.\n+optional", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.\n+optional", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimTemplate": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional", + "type": "integer" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge", + "type": "array", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional", + "type": "integer" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional", + "type": "string" + }, + "spec": { + "description": "The specification for the PersistentVolumeClaim. The entire content is\ncopied unchanged into the PVC that gets created from this\ntemplate. The same fields as in a PersistentVolumeClaim\nare also valid here.", + "$ref": "#/definitions/v1.PersistentVolumeClaimSpec" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional", + "type": "string" + } + } + }, + "v1.PersistentVolumeClaimVolumeSource": { + "type": "object", + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts.\nDefault false.\n+optional", + "type": "boolean" + } + } + }, + "v1.PhotonPersistentDiskVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "pdID": { + "description": "ID that identifies Photon Controller persistent disk", + "type": "string" + } + } + }, + "v1.PortworxVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "FSType represents the filesystem type to mount\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified.", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "volumeID": { + "description": "VolumeID uniquely identifies a Portworx volume", + "type": "string" + } + } + }, + "v1.Probe": { + "type": "object", + "properties": { + "exec": { + "description": "Exec specifies the action to take.\n+optional", + "$ref": "#/definitions/v1.ExecAction" + }, + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded.\nDefaults to 3. Minimum value is 1.\n+optional", + "type": "integer" + }, + "grpc": { + "description": "GRPC specifies an action involving a GRPC port.\nThis is an alpha field and requires enabling GRPCContainerProbe feature gate.\n+featureGate=GRPCContainerProbe\n+optional", + "$ref": "#/definitions/v1.GRPCAction" + }, + "httpGet": { + "description": "HTTPGet specifies the http request to perform.\n+optional", + "$ref": "#/definitions/v1.HTTPGetAction" + }, + "initialDelaySeconds": { + "description": "Number of seconds after the container has started before liveness probes are initiated.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "type": "integer" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe.\nDefault to 10 seconds. Minimum value is 1.\n+optional", + "type": "integer" + }, + "successThreshold": { + "description": "Minimum consecutive successes for the probe to be considered successful after having failed.\nDefaults to 1. Must be 1 for liveness and startup. Minimum value is 1.\n+optional", + "type": "integer" + }, + "tcpSocket": { + "description": "TCPSocket specifies an action involving a TCP port.\n+optional", + "$ref": "#/definitions/v1.TCPSocketAction" + }, + "terminationGracePeriodSeconds": { + "description": "Optional duration in seconds the pod needs to terminate gracefully upon probe failure.\nThe grace period is the duration in seconds after the processes running in the pod are sent\na termination signal and the time when the processes are forcibly halted with a kill signal.\nSet this value longer than the expected cleanup time for your process.\nIf this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this\nvalue overrides the value provided by the pod spec.\nValue must be non-negative integer. The value zero indicates stop immediately via\nthe kill signal (no opportunity to shut down).\nThis is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.\nMinimum value is 1. spec.terminationGracePeriodSeconds is used if unset.\n+optional", + "type": "integer" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out.\nDefaults to 1 second. Minimum value is 1.\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes\n+optional", + "type": "integer" + } + } + }, + "v1.ProjectedVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values for mode bits.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "sources": { + "description": "list of volume projections\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.VolumeProjection" + } + } + } + }, + "v1.QuobyteVolumeSource": { + "type": "object", + "properties": { + "group": { + "description": "Group to map volume access to\nDefault is no group\n+optional", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions.\nDefaults to false.\n+optional", + "type": "boolean" + }, + "registry": { + "description": "Registry represents a single or multiple Quobyte Registry services\nspecified as a string as host:port pair (multiple entries are separated with commas)\nwhich acts as the central registry for volumes", + "type": "string" + }, + "tenant": { + "description": "Tenant owning the given Quobyte volume in the Backend\nUsed with dynamically provisioned Quobyte volumes, value is set by the plugin\n+optional", + "type": "string" + }, + "user": { + "description": "User to map volume access to\nDefaults to serivceaccount user\n+optional", + "type": "string" + }, + "volume": { + "description": "Volume is a string that references an already created Quobyte volume by name.", + "type": "string" + } + } + }, + "v1.RBDVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type of the volume that you want to mount.\nTip: Ensure that the filesystem type is supported by the host operating system.\nExamples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#rbd\nTODO: how do we prevent errors in the filesystem from compromising the machine\n+optional", + "type": "string" + }, + "image": { + "description": "The rados image name.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "string" + }, + "keyring": { + "description": "Keyring is the path to key ring for RBDUser.\nDefault is /etc/ceph/keyring.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "string" + }, + "monitors": { + "description": "A collection of Ceph monitors.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it", + "type": "array", + "items": { + "type": "string" + } + }, + "pool": { + "description": "The rados pool name.\nDefault is rbd.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "string" + }, + "readOnly": { + "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts.\nDefaults to false.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef is name of the authentication secret for RBDUser. If provided\noverrides keyring.\nDefault is nil.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "user": { + "description": "The rados user name.\nDefault is admin.\nMore info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it\n+optional", + "type": "string" + } + } + }, + "v1.ResourceFieldSelector": { + "type": "object", + "properties": { + "containerName": { + "description": "Container name: required for volumes, optional for env vars\n+optional", + "type": "string" + }, + "divisor": { + "description": "Specifies the output format of the exposed resources, defaults to \"1\"\n+optional", + "$ref": "#/definitions/resource.Quantity" + }, + "resource": { + "description": "Required: resource to select", + "type": "string" + } + } + }, + "v1.ResourceList": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/resource.Quantity" + } + }, + "v1.ResourceRequirements": { + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + "$ref": "#/definitions/v1.ResourceList" + }, + "requests": { + "description": "Requests describes the minimum amount of compute resources required.\nIf Requests is omitted for a container, it defaults to Limits if that is explicitly specified,\notherwise to an implementation-defined value.\nMore info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/\n+optional", + "$ref": "#/definitions/v1.ResourceList" + } + } + }, + "v1.SELinuxOptions": { + "type": "object", + "properties": { + "level": { + "description": "Level is SELinux level label that applies to the container.\n+optional", + "type": "string" + }, + "role": { + "description": "Role is a SELinux role label that applies to the container.\n+optional", + "type": "string" + }, + "type": { + "description": "Type is a SELinux type label that applies to the container.\n+optional", + "type": "string" + }, + "user": { + "description": "User is a SELinux user label that applies to the container.\n+optional", + "type": "string" + } + } + }, + "v1.ScaleIOVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\".\nDefault is \"xfs\".\n+optional", + "type": "string" + }, + "gateway": { + "description": "The host address of the ScaleIO API Gateway.", + "type": "string" + }, + "protectionDomain": { + "description": "The name of the ScaleIO Protection Domain for the configured storage.\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef references to the secret for ScaleIO user and other\nsensitive information. If this is not provided, Login operation will fail.", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "sslEnabled": { + "description": "Flag to enable/disable SSL communication with Gateway, default false\n+optional", + "type": "boolean" + }, + "storageMode": { + "description": "Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.\nDefault is ThinProvisioned.\n+optional", + "type": "string" + }, + "storagePool": { + "description": "The ScaleIO Storage Pool associated with the protection domain.\n+optional", + "type": "string" + }, + "system": { + "description": "The name of the storage system as configured in ScaleIO.", + "type": "string" + }, + "volumeName": { + "description": "The name of a volume already created in the ScaleIO system\nthat is associated with this volume source.", + "type": "string" + } + } + }, + "v1.SeccompProfile": { + "type": "object", + "properties": { + "localhostProfile": { + "description": "localhostProfile indicates a profile defined in a file on the node should be used.\nThe profile must be preconfigured on the node to work.\nMust be a descending path, relative to the kubelet's configured seccomp profile location.\nMust only be set if type is \"Localhost\".\n+optional", + "type": "string" + }, + "type": { + "description": "type indicates which kind of seccomp profile will be applied.\nValid options are:\n\nLocalhost - a profile defined in a file on the node should be used.\nRuntimeDefault - the container runtime default profile should be used.\nUnconfined - no profile should be applied.\n+unionDiscriminator", + "type": "string" + } + } + }, + "v1.SecretEnvSource": { + "type": "object", + "properties": { + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.SecretKeySelector": { + "type": "object", + "properties": { + "key": { + "description": "The key of the secret to select from. Must be a valid secret key.", + "type": "string" + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.SecretProjection": { + "type": "object", + "properties": { + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nSecret will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the Secret,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "name": { + "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?\n+optional", + "type": "string" + }, + "optional": { + "description": "Specify whether the Secret or its key must be defined\n+optional", + "type": "boolean" + } + } + }, + "v1.SecretVolumeSource": { + "type": "object", + "properties": { + "defaultMode": { + "description": "Optional: mode bits used to set permissions on created files by default.\nMust be an octal value between 0000 and 0777 or a decimal value between 0 and 511.\nYAML accepts both octal and decimal values, JSON requires decimal values\nfor mode bits. Defaults to 0644.\nDirectories within the path are not affected by this setting.\nThis might be in conflict with other options that affect the file\nmode, like fsGroup, and the result can be other mode bits set.\n+optional", + "type": "integer" + }, + "items": { + "description": "If unspecified, each key-value pair in the Data field of the referenced\nSecret will be projected into the volume as a file whose name is the\nkey and content is the value. If specified, the listed keys will be\nprojected into the specified paths, and unlisted keys will not be\npresent. If a key is specified which is not present in the Secret,\nthe volume setup will error unless it is marked optional. Paths must be\nrelative and may not contain the '..' path or start with '..'.\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.KeyToPath" + } + }, + "optional": { + "description": "Specify whether the Secret or its keys must be defined\n+optional", + "type": "boolean" + }, + "secretName": { + "description": "Name of the secret in the pod's namespace to use.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#secret\n+optional", + "type": "string" + } + } + }, + "v1.SecurityContext": { + "type": "object", + "properties": { + "allowPrivilegeEscalation": { + "description": "AllowPrivilegeEscalation controls whether a process can gain more\nprivileges than its parent process. This bool directly controls if\nthe no_new_privs flag will be set on the container process.\nAllowPrivilegeEscalation is true always when the container is:\n1) run as Privileged\n2) has CAP_SYS_ADMIN\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "boolean" + }, + "capabilities": { + "description": "The capabilities to add/drop when running containers.\nDefaults to the default set of capabilities granted by the container runtime.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "$ref": "#/definitions/v1.Capabilities" + }, + "privileged": { + "description": "Run container in privileged mode.\nProcesses in privileged containers are essentially equivalent to root on the host.\nDefaults to false.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "boolean" + }, + "procMount": { + "description": "procMount denotes the type of proc mount to use for the containers.\nThe default is DefaultProcMount which uses the container runtime defaults for\nreadonly paths and masked paths.\nThis requires the ProcMountType feature flag to be enabled.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "string" + }, + "readOnlyRootFilesystem": { + "description": "Whether this container has a read-only root filesystem.\nDefault is false.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "boolean" + }, + "runAsGroup": { + "description": "The GID to run the entrypoint of the container process.\nUses runtime default if unset.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "integer" + }, + "runAsNonRoot": { + "description": "Indicates that the container must run as a non-root user.\nIf true, the Kubelet will validate the image at runtime to ensure that it\ndoes not run as UID 0 (root) and fail to start the container if it does.\nIf unset or false, no such validation will be performed.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional", + "type": "boolean" + }, + "runAsUser": { + "description": "The UID to run the entrypoint of the container process.\nDefaults to user specified in image metadata if unspecified.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "type": "integer" + }, + "seLinuxOptions": { + "description": "The SELinux context to be applied to the container.\nIf unspecified, the container runtime will allocate a random SELinux context for each\ncontainer. May also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "$ref": "#/definitions/v1.SELinuxOptions" + }, + "seccompProfile": { + "description": "The seccomp options to use by this container. If seccomp options are\nprovided at both the pod \u0026 container level, the container options\noverride the pod options.\nNote that this field cannot be set when spec.os.name is windows.\n+optional", + "$ref": "#/definitions/v1.SeccompProfile" + }, + "windowsOptions": { + "description": "The Windows specific settings applied to all containers.\nIf unspecified, the options from the PodSecurityContext will be used.\nIf set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.\nNote that this field cannot be set when spec.os.name is linux.\n+optional", + "$ref": "#/definitions/v1.WindowsSecurityContextOptions" + } + } + }, + "v1.ServiceAccountTokenProjection": { + "type": "object", + "properties": { + "audience": { + "description": "Audience is the intended audience of the token. A recipient of a token\nmust identify itself with an identifier specified in the audience of the\ntoken, and otherwise should reject the token. The audience defaults to the\nidentifier of the apiserver.\n+optional", + "type": "string" + }, + "expirationSeconds": { + "description": "ExpirationSeconds is the requested duration of validity of the service\naccount token. As the token approaches expiration, the kubelet volume\nplugin will proactively rotate the service account token. The kubelet will\nstart trying to rotate the token if the token is older than 80 percent of\nits time to live or if the token is older than 24 hours.Defaults to 1 hour\nand must be at least 10 minutes.\n+optional", + "type": "integer" + }, + "path": { + "description": "Path is the path relative to the mount point of the file to project the\ntoken into.", + "type": "string" + } + } + }, + "v1.StorageOSVolumeSource": { + "type": "object", + "properties": { + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional", + "type": "string" + }, + "readOnly": { + "description": "Defaults to false (read/write). ReadOnly here will force\nthe ReadOnly setting in VolumeMounts.\n+optional", + "type": "boolean" + }, + "secretRef": { + "description": "SecretRef specifies the secret to use for obtaining the StorageOS API\ncredentials. If not specified, default values will be attempted.\n+optional", + "$ref": "#/definitions/v1.LocalObjectReference" + }, + "volumeName": { + "description": "VolumeName is the human-readable name of the StorageOS volume. Volume\nnames are only unique within a namespace.", + "type": "string" + }, + "volumeNamespace": { + "description": "VolumeNamespace specifies the scope of the volume within StorageOS. If no\nnamespace is specified then the Pod's namespace will be used. This allows the\nKubernetes name scoping to be mirrored within StorageOS for tighter integration.\nSet VolumeName to any name to override the default behaviour.\nSet to \"default\" if you are not using namespaces within StorageOS.\nNamespaces that do not pre-exist within StorageOS will be created.\n+optional", + "type": "string" + } + } + }, + "v1.TCPSocketAction": { + "type": "object", + "properties": { + "host": { + "description": "Optional: Host name to connect to, defaults to the pod IP.\n+optional", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container.\nNumber must be in the range 1 to 65535.\nName must be an IANA_SVC_NAME.", + "$ref": "#/definitions/intstr.IntOrString" + } + } + }, + "v1.TypedLocalObjectReference": { + "type": "object", + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced.\nIf APIGroup is not specified, the specified Kind must be in the core API group.\nFor any other third-party types, APIGroup is required.\n+optional", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + } + }, + "v1.Volume": { + "type": "object", + "properties": { + "awsElasticBlockStore": { + "description": "AWSElasticBlockStore represents an AWS Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore\n+optional", + "$ref": "#/definitions/v1.AWSElasticBlockStoreVolumeSource" + }, + "azureDisk": { + "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\n+optional", + "$ref": "#/definitions/v1.AzureDiskVolumeSource" + }, + "azureFile": { + "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\n+optional", + "$ref": "#/definitions/v1.AzureFileVolumeSource" + }, + "cephfs": { + "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime\n+optional", + "$ref": "#/definitions/v1.CephFSVolumeSource" + }, + "cinder": { + "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine.\nMore info: https://examples.k8s.io/mysql-cinder-pd/README.md\n+optional", + "$ref": "#/definitions/v1.CinderVolumeSource" + }, + "configMap": { + "description": "ConfigMap represents a configMap that should populate this volume\n+optional", + "$ref": "#/definitions/v1.ConfigMapVolumeSource" + }, + "csi": { + "description": "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).\n+optional", + "$ref": "#/definitions/v1.CSIVolumeSource" + }, + "downwardAPI": { + "description": "DownwardAPI represents downward API about the pod that should populate this volume\n+optional", + "$ref": "#/definitions/v1.DownwardAPIVolumeSource" + }, + "emptyDir": { + "description": "EmptyDir represents a temporary directory that shares a pod's lifetime.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir\n+optional", + "$ref": "#/definitions/v1.EmptyDirVolumeSource" + }, + "ephemeral": { + "description": "Ephemeral represents a volume that is handled by a cluster storage driver.\nThe volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,\nand deleted when the pod is removed.\n\nUse this if:\na) the volume is only needed while the pod runs,\nb) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and\nd) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific\nAPIs for volumes that persist for longer than the lifecycle\nof an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to\nbe used that way - see the documentation of the driver for\nmore information.\n\nA pod can use both types of ephemeral volumes and\npersistent volumes at the same time.\n\n+optional", + "$ref": "#/definitions/v1.EphemeralVolumeSource" + }, + "fc": { + "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.\n+optional", + "$ref": "#/definitions/v1.FCVolumeSource" + }, + "flexVolume": { + "description": "FlexVolume represents a generic volume resource that is\nprovisioned/attached using an exec based plugin.\n+optional", + "$ref": "#/definitions/v1.FlexVolumeSource" + }, + "flocker": { + "description": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running\n+optional", + "$ref": "#/definitions/v1.FlockerVolumeSource" + }, + "gcePersistentDisk": { + "description": "GCEPersistentDisk represents a GCE Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk\n+optional", + "$ref": "#/definitions/v1.GCEPersistentDiskVolumeSource" + }, + "gitRepo": { + "description": "GitRepo represents a git repository at a particular revision.\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an\nEmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir\ninto the Pod's container.\n+optional", + "$ref": "#/definitions/v1.GitRepoVolumeSource" + }, + "glusterfs": { + "description": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.\nMore info: https://examples.k8s.io/volumes/glusterfs/README.md\n+optional", + "$ref": "#/definitions/v1.GlusterfsVolumeSource" + }, + "hostPath": { + "description": "HostPath represents a pre-existing file or directory on the host\nmachine that is directly exposed to the container. This is generally\nused for system agents or other privileged things that are allowed\nto see the host machine. Most containers will NOT need this.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath\n---\nTODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not\nmount host directories as read/write.\n+optional", + "$ref": "#/definitions/v1.HostPathVolumeSource" + }, + "iscsi": { + "description": "ISCSI represents an ISCSI Disk resource that is attached to a\nkubelet's host machine and then exposed to the pod.\nMore info: https://examples.k8s.io/volumes/iscsi/README.md\n+optional", + "$ref": "#/definitions/v1.ISCSIVolumeSource" + }, + "name": { + "description": "Volume's name.\nMust be a DNS_LABEL and unique within the pod.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "nfs": { + "description": "NFS represents an NFS mount on the host that shares a pod's lifetime\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#nfs\n+optional", + "$ref": "#/definitions/v1.NFSVolumeSource" + }, + "persistentVolumeClaim": { + "description": "PersistentVolumeClaimVolumeSource represents a reference to a\nPersistentVolumeClaim in the same namespace.\nMore info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims\n+optional", + "$ref": "#/definitions/v1.PersistentVolumeClaimVolumeSource" + }, + "photonPersistentDisk": { + "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", + "$ref": "#/definitions/v1.PhotonPersistentDiskVolumeSource" + }, + "portworxVolume": { + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine\n+optional", + "$ref": "#/definitions/v1.PortworxVolumeSource" + }, + "projected": { + "description": "Items for all in one resources secrets, configmaps, and downward API", + "$ref": "#/definitions/v1.ProjectedVolumeSource" + }, + "quobyte": { + "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime\n+optional", + "$ref": "#/definitions/v1.QuobyteVolumeSource" + }, + "rbd": { + "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime.\nMore info: https://examples.k8s.io/volumes/rbd/README.md\n+optional", + "$ref": "#/definitions/v1.RBDVolumeSource" + }, + "scaleIO": { + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.\n+optional", + "$ref": "#/definitions/v1.ScaleIOVolumeSource" + }, + "secret": { + "description": "Secret represents a secret that should populate this volume.\nMore info: https://kubernetes.io/docs/concepts/storage/volumes#secret\n+optional", + "$ref": "#/definitions/v1.SecretVolumeSource" + }, + "storageos": { + "description": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.\n+optional", + "$ref": "#/definitions/v1.StorageOSVolumeSource" + }, + "vsphereVolume": { + "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine\n+optional", + "$ref": "#/definitions/v1.VsphereVirtualDiskVolumeSource" + } + } + }, + "v1.VolumeDevice": { + "type": "object", + "properties": { + "devicePath": { + "description": "devicePath is the path inside of the container that the device will be mapped to.", + "type": "string" + }, + "name": { + "description": "name must match the name of a persistentVolumeClaim in the pod", + "type": "string" + } + } + }, + "v1.VolumeMount": { + "type": "object", + "properties": { + "mountPath": { + "description": "Path within the container at which the volume should be mounted. Must\nnot contain ':'.", + "type": "string" + }, + "mountPropagation": { + "description": "mountPropagation determines how mounts are propagated from the host\nto container and the other way around.\nWhen not set, MountPropagationNone is used.\nThis field is beta in 1.10.\n+optional", + "type": "string" + }, + "name": { + "description": "This must match the Name of a Volume.", + "type": "string" + }, + "readOnly": { + "description": "Mounted read-only if true, read-write otherwise (false or unspecified).\nDefaults to false.\n+optional", + "type": "boolean" + }, + "subPath": { + "description": "Path within the volume from which the container's volume should be mounted.\nDefaults to \"\" (volume's root).\n+optional", + "type": "string" + }, + "subPathExpr": { + "description": "Expanded path within the volume from which the container's volume should be mounted.\nBehaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.\nDefaults to \"\" (volume's root).\nSubPathExpr and SubPath are mutually exclusive.\n+optional", + "type": "string" + } + } + }, + "v1.VolumeProjection": { + "type": "object", + "properties": { + "configMap": { + "description": "information about the configMap data to project\n+optional", + "$ref": "#/definitions/v1.ConfigMapProjection" + }, + "downwardAPI": { + "description": "information about the downwardAPI data to project\n+optional", + "$ref": "#/definitions/v1.DownwardAPIProjection" }, - "spec": { - "type": "object", - "$ref": "#/definitions/v1alpha1.StatusCheckTemplate" + "secret": { + "description": "information about the secret data to project\n+optional", + "$ref": "#/definitions/v1.SecretProjection" }, - "uid": { - "type": "string" + "serviceAccountToken": { + "description": "information about the serviceAccountToken data to project\n+optional", + "$ref": "#/definitions/v1.ServiceAccountTokenProjection" } } }, - "utils.APIError": { + "v1.VsphereVirtualDiskVolumeSource": { "type": "object", "properties": { - "code": { - "type": "integer" + "fsType": { + "description": "Filesystem type to mount.\nMust be a filesystem type supported by the host operating system.\nEx. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified.\n+optional", + "type": "string" }, - "full_text": { + "storagePolicyID": { + "description": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.\n+optional", "type": "string" }, - "message": { + "storagePolicyName": { + "description": "Storage Policy Based Management (SPBM) profile name.\n+optional", "type": "string" }, - "type": { + "volumePath": { + "description": "Path that identifies vSphere volume vmdk", "type": "string" } } }, - "utils.Response": { + "v1.WindowsSecurityContextOptions": { "type": "object", "properties": { - "status": { + "gmsaCredentialSpec": { + "description": "GMSACredentialSpec is where the GMSA admission webhook\n(https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the\nGMSA credential spec named by the GMSACredentialSpecName field.\n+optional", + "type": "string" + }, + "gmsaCredentialSpecName": { + "description": "GMSACredentialSpecName is the name of the GMSA credential spec to use.\n+optional", + "type": "string" + }, + "hostProcess": { + "description": "HostProcess determines if a container should be run as a 'Host Process' container.\nThis field is alpha-level and will only be honored by components that enable the\nWindowsHostProcessContainers feature flag. Setting this field without the feature\nflag will result in errors when validating the Pod. All of a Pod's containers must\nhave the same effective HostProcess value (it is not allowed to have a mix of HostProcess\ncontainers and non-HostProcess containers). In addition, if HostProcess is true\nthen HostNetwork must also be set to true.\n+optional", + "type": "boolean" + }, + "runAsUserName": { + "description": "The UserName in Windows to run the entrypoint of the container process.\nDefaults to the user specified in image metadata if unspecified.\nMay also be set in PodSecurityContext. If set in both SecurityContext and\nPodSecurityContext, the value specified in SecurityContext takes precedence.\n+optional", "type": "string" } } @@ -2974,7 +4859,6 @@ "properties": { "atime": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Timespec" }, "blocks": { @@ -2983,7 +4867,6 @@ }, "ctime": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Timespec" }, "gid": { @@ -3000,7 +4883,6 @@ }, "mtime": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Timespec" }, "nlink": { @@ -3103,7 +4985,6 @@ }, "delay": { "description": "Delay defines the delay distribution.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockDelaySpec" }, "duration": { @@ -3116,7 +4997,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -3172,17 +5052,14 @@ "properties": { "awsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AWSChaosSpec" }, "azureChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AzureChaosSpec" }, "blockChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockChaosSpec" }, "concurrencyPolicy": { @@ -3191,12 +5068,10 @@ }, "dnsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DNSChaosSpec" }, "gcpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.GCPChaosSpec" }, "historyLimit": { @@ -3205,37 +5080,30 @@ }, "httpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPChaosSpec" }, "ioChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.IOChaosSpec" }, "jvmChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMChaosSpec" }, "kernelChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.KernelChaosSpec" }, "networkChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkChaosSpec" }, "physicalmachineChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec" }, "podChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodChaosSpec" }, "schedule": { @@ -3247,12 +5115,10 @@ }, "stressChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressChaosSpec" }, "timeChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.TimeChaosSpec" }, "type": { @@ -3335,7 +5201,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -3362,7 +5227,6 @@ }, "reorder": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ReorderSpec" } } @@ -3527,7 +5391,6 @@ }, "patch": { "description": "Patch is a rule to patch some contents in target.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodHttpChaosPatchActions" }, "path": { @@ -3540,7 +5403,6 @@ }, "replace": { "description": "Replace is a rule to replace some contents in target.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodHttpChaosReplaceActions" }, "request_headers": { @@ -3559,7 +5421,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "target": { @@ -3590,12 +5451,11 @@ }, "criteria": { "description": "Criteria defines how to determine the result of the status check.", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPCriteria" }, "headers": { "description": "+optional", - "type": "string" + "$ref": "#/definitions/http.Header" }, "method": { "description": "+optional\n+kubebuilder:validation:Enum=GET;POST\n+kubebuilder:default=GET", @@ -3615,7 +5475,6 @@ }, "attr": { "description": "Attr defines the overrided attribution\n+ui:form:when=action=='attrOverride'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AttrOverrideSpec" }, "containerNames": { @@ -3646,7 +5505,6 @@ }, "mistake": { "description": "Mistake defines what types of incorrectness are injected to IO operations\n+ui:form:when=action=='mistake'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.MistakeSpec" }, "mode": { @@ -3663,7 +5521,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -3748,7 +5605,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "sqlType": { @@ -3907,7 +5763,6 @@ }, "failKernRequest": { "description": "FailKernRequest defines the request of kernel injection", - "type": "object", "$ref": "#/definitions/v1alpha1.FailKernRequest" }, "mode": { @@ -3916,7 +5771,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -4019,17 +5873,14 @@ }, "bandwidth": { "description": "Bandwidth represents the detail about bandwidth control action\n+ui:form:when=action=='bandwidth'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BandwidthSpec" }, "corrupt": { "description": "Corrupt represents the detail about corrupt action\n+ui:form:when=action=='corrupt'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.CorruptSpec" }, "delay": { "description": "Delay represents the detail about delay action\n+ui:form:when=action=='delay'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DelaySpec" }, "device": { @@ -4042,7 +5893,6 @@ }, "duplicate": { "description": "DuplicateSpec represents the detail about loss action\n+ui:form:when=action=='duplicate'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DuplicateSpec" }, "duration": { @@ -4058,7 +5908,6 @@ }, "loss": { "description": "Loss represents the detail about loss action\n+ui:form:when=action=='loss'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.LossSpec" }, "mode": { @@ -4067,12 +5916,10 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "target": { "description": "Target represents network target, this applies on netem and network partition action\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelector" }, "targetDevice": { @@ -4299,22 +6146,18 @@ }, "clock": { "description": "+ui:form:when=action=='clock'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ClockSpec" }, "disk-fill": { "description": "+ui:form:when=action=='disk-fill'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DiskFillSpec" }, "disk-read-payload": { "description": "+ui:form:when=action=='disk-read-payload'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DiskPayloadSpec" }, "disk-write-payload": { "description": "+ui:form:when=action=='disk-write-payload'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DiskPayloadSpec" }, "duration": { @@ -4323,32 +6166,26 @@ }, "jvm-exception": { "description": "+ui:form:when=action=='jvm-exception'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMExceptionSpec" }, "jvm-gc": { "description": "+ui:form:when=action=='jvm-gc'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMGCSpec" }, "jvm-latency": { "description": "+ui:form:when=action=='jvm-latency'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMLatencySpec" }, "jvm-return": { "description": "+ui:form:when=action=='jvm-return'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMReturnSpec" }, "jvm-rule-data": { "description": "+ui:form:when=action=='jvm-rule-data'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMRuleDataSpec" }, "jvm-stress": { "description": "+ui:form:when=action=='jvm-stress'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMStressSpec" }, "mode": { @@ -4357,57 +6194,46 @@ }, "network-bandwidth": { "description": "+ui:form:when=action=='network-bandwidth'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkBandwidthSpec" }, "network-corrupt": { "description": "+ui:form:when=action=='network-corrupt'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkCorruptSpec" }, "network-delay": { "description": "+ui:form:when=action=='network-delay'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkDelaySpec" }, "network-dns": { "description": "+ui:form:when=action=='network-dns'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkDNSSpec" }, "network-duplicate": { "description": "+ui:form:when=action=='network-duplicate'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkDuplicateSpec" }, "network-loss": { "description": "+ui:form:when=action=='network-loss'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkLossSpec" }, "network-partition": { "description": "+ui:form:when=action=='network-partition'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkPartitionSpec" }, "process": { "description": "+ui:form:when=action=='process'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ProcessSpec" }, "selector": { "description": "Selector is used to select physical machines that are used to inject chaos action.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineSelectorSpec" }, "stress-cpu": { "description": "+ui:form:when=action=='stress-cpu'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressCPUSpec" }, "stress-mem": { "description": "+ui:form:when=action=='stress-mem'\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressMemorySpec" }, "value": { @@ -4487,7 +6313,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -4501,7 +6326,6 @@ "properties": { "body": { "description": "Body is a rule to patch message body of target.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodHttpChaosPatchBodyAction" }, "headers": { @@ -4586,7 +6410,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "value": { @@ -4695,14 +6518,99 @@ "v1alpha1.Schedule": { "type": "object", "properties": { - "spec": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", + "type": "string" + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional", + "type": "integer" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge", + "type": "array", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional", + "type": "integer" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional", "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional", + "type": "string" + }, + "spec": { "$ref": "#/definitions/v1alpha1.ScheduleSpec" }, "status": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ScheduleStatus" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional", + "type": "string" } } }, @@ -4711,17 +6619,14 @@ "properties": { "awsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AWSChaosSpec" }, "azureChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AzureChaosSpec" }, "blockChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockChaosSpec" }, "concurrencyPolicy": { @@ -4730,12 +6635,10 @@ }, "dnsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DNSChaosSpec" }, "gcpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.GCPChaosSpec" }, "historyLimit": { @@ -4744,37 +6647,30 @@ }, "httpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPChaosSpec" }, "ioChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.IOChaosSpec" }, "jvmChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMChaosSpec" }, "kernelChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.KernelChaosSpec" }, "networkChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkChaosSpec" }, "physicalmachineChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec" }, "podChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodChaosSpec" }, "schedule": { @@ -4786,12 +6682,10 @@ }, "stressChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressChaosSpec" }, "timeChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.TimeChaosSpec" }, "type": { @@ -4800,7 +6694,6 @@ }, "workflow": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.WorkflowSpec" } } @@ -4810,7 +6703,10 @@ "properties": { "active": { "description": "+optional", - "type": "string" + "type": "array", + "items": { + "$ref": "#/definitions/v1.ObjectReference" + } }, "time": { "description": "+optional\n+nullable", @@ -4831,7 +6727,6 @@ }, "http": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPStatusCheck" }, "intervalSeconds": { @@ -4873,7 +6768,6 @@ }, "http": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPStatusCheck" }, "intervalSeconds": { @@ -4942,7 +6836,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "stressngStressors": { @@ -4951,7 +6844,6 @@ }, "stressors": { "description": "Stressors defines plenty of stressors supported to stress system components out.\nYou can use one or more of them to make up various kinds of stresses. At least\none of the stressors should be specified.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Stressors" }, "value": { @@ -4981,12 +6873,10 @@ "properties": { "cpu": { "description": "CPUStressor stresses CPU out\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.CPUStressor" }, "memory": { "description": "MemoryStressor stresses virtual memory out\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.MemoryStressor" } } @@ -4996,11 +6886,14 @@ "properties": { "container": { "description": "Container is the main container image to run in the pod", - "type": "string" + "$ref": "#/definitions/v1.Container" }, "volumes": { "description": "Volumes is a list of volumes that can be mounted by containers in a template.\n+patchStrategy=merge\n+patchMergeKey=name", - "type": "string" + "type": "array", + "items": { + "$ref": "#/definitions/v1.Volume" + } } } }, @@ -5013,17 +6906,14 @@ }, "awsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AWSChaosSpec" }, "azureChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.AzureChaosSpec" }, "blockChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.BlockChaosSpec" }, "children": { @@ -5046,32 +6936,26 @@ }, "dnsChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.DNSChaosSpec" }, "gcpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.GCPChaosSpec" }, "httpChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.HTTPChaosSpec" }, "ioChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.IOChaosSpec" }, "jvmChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.JVMChaosSpec" }, "kernelChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.KernelChaosSpec" }, "name": { @@ -5079,37 +6963,30 @@ }, "networkChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.NetworkChaosSpec" }, "physicalmachineChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PhysicalMachineChaosSpec" }, "podChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.PodChaosSpec" }, "schedule": { "description": "Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.ChaosOnlyScheduleSpec" }, "statusCheck": { "description": "StatusCheck describe the behavior of StatusCheck. Only used when Type is TypeStatusCheck.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StatusCheckSpec" }, "stressChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.StressChaosSpec" }, "task": { "description": "Task describes the behavior of the custom task. Only used when Type is TypeTask.\n+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.Task" }, "templateType": { @@ -5117,7 +6994,6 @@ }, "timeChaos": { "description": "+optional", - "type": "object", "$ref": "#/definitions/v1alpha1.TimeChaosSpec" } } @@ -5149,7 +7025,6 @@ }, "selector": { "description": "Selector is used to select pods that are used to inject chaos action.", - "type": "object", "$ref": "#/definitions/v1alpha1.PodSelectorSpec" }, "timeOffset": { @@ -5176,15 +7051,100 @@ "v1alpha1.Workflow": { "type": "object", "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be\nset by external tools to store and retrieve arbitrary metadata. They are not\nqueryable and should be preserved when modifying objects.\nMore info: http://kubernetes.io/docs/user-guide/annotations\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\n+optional", + "type": "string" + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to.\nThis is used to distinguish resources with same name and namespace in different clusters.\nThis field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.\n+optional", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was\ncreated. It is not guaranteed to be set in happens-before order across separate operations.\nClients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system.\nRead-only.\nNull for lists.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before\nit will be removed from the system. Only set when deletionTimestamp is also set.\nMay only be shortened.\nRead-only.\n+optional", + "type": "integer" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This\nfield is set by the server when a graceful deletion is requested by the user, and is not\ndirectly settable by a client. The resource is expected to be deleted (no longer visible\nfrom resource lists, and not reachable by name) after the time in this field, once the\nfinalizers list is empty. As long as the finalizers list contains items, deletion is blocked.\nOnce the deletionTimestamp is set, this value may not be unset or be set further into the\nfuture, although it may be shortened or the resource may be deleted prior to this time.\nFor example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react\nby sending a graceful termination signal to the containers in the pod. After that 30 seconds,\nthe Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup,\nremove the pod from the API. In the presence of network partitions, this object may still\nexist after this timestamp, until an administrator or automated process can determine the\nresource is fully terminated.\nIf not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested.\nRead-only.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata\n+optional", + "type": "string" + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry\nis an identifier for the responsible component that will remove the entry\nfrom the list. If the deletionTimestamp of the object is non-nil, entries\nin this list can only be removed.\nFinalizers may be processed and removed in any order. Order is NOT enforced\nbecause it introduces significant risk of stuck finalizers.\nfinalizers is a shared field, any actor with permission can reorder it.\nIf the finalizer list is processed in order, then this can lead to a situation\nin which the component responsible for the first finalizer in the list is\nwaiting for a signal (field value, external system, or other) produced by a\ncomponent responsible for a finalizer later in the list, resulting in a deadlock.\nWithout enforced ordering finalizers are free to order amongst themselves and\nare not vulnerable to ordering changes in the list.\n+optional\n+patchStrategy=merge", + "type": "array", + "items": { + "type": "string" + } + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique\nname ONLY IF the Name field has not been provided.\nIf this field is used, the name returned to the client will be different\nthan the name passed. This value will also be combined with a unique suffix.\nThe provided value has the same validation rules as the Name field,\nand may be truncated by the length of the suffix required to make the value\nunique on the server.\n\nIf this field is specified and the generated name exists, the server will\nNOT return a 409 - instead, it will either return 201 Created or 500 with Reason\nServerTimeout indicating a unique name could not be found in the time allotted, and the client\nshould retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency\n+optional", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state.\nPopulated by the system. Read-only.\n+optional", + "type": "integer" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\n+optional", + "type": "string" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize\n(scope and select) objects. May match selectors of replication controllers\nand services.\nMore info: http://kubernetes.io/docs/user-guide/labels\n+optional", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields\nthat are managed by that workflow. This is mostly for internal\nhousekeeping, and users typically shouldn't need to set or\nunderstand this field. A workflow can be the user's name, a\ncontroller's name, or the name of a specific apply path like\n\"ci-cd\". The set of fields is always in the version that the\nworkflow used when modifying the object.\n\n+optional", + "type": "array", + "items": { + "$ref": "#/definitions/v1.ManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although\nsome resources may allow a client to request the generation of an appropriate name\nautomatically. Name is primarily intended for creation idempotence and configuration\ndefinition.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#names\n+optional", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is\nequivalent to the \"default\" namespace, but \"default\" is the canonical representation.\nNot all objects are required to be scoped to a namespace - the value of this field for\nthose objects will be empty.\n\nMust be a DNS_LABEL.\nCannot be updated.\nMore info: http://kubernetes.io/docs/user-guide/namespaces\n+optional", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have\nbeen deleted, this object will be garbage collected. If this object is managed by a controller,\nthen an entry in this list will point to this controller, with the controller field set to true.\nThere cannot be more than one managing controller.\n+optional\n+patchMergeKey=uid\n+patchStrategy=merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1.OwnerReference" + } + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can\nbe used by clients to determine when objects have changed. May be used for optimistic\nconcurrency, change detection, and the watch operation on a resource or set of resources.\nClients must treat these values as opaque and passed unmodified back to the server.\nThey may only be valid for a particular resource or set of resources.\n\nPopulated by the system.\nRead-only.\nValue must be treated as opaque by clients and .\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency\n+optional", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object.\nPopulated by the system.\nRead-only.\n\nDEPRECATED\nKubernetes will stop propagating this field in 1.20 release and the field is planned\nto be removed in 1.21 release.\n+optional", + "type": "string" + }, "spec": { "description": "Spec defines the behavior of a workflow", - "type": "object", "$ref": "#/definitions/v1alpha1.WorkflowSpec" }, "status": { "description": "+optional\nMost recently observed status of the workflow", - "type": "object", "$ref": "#/definitions/v1alpha1.WorkflowStatus" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by\nthe server on successful creation of a resource and is not allowed to change on PUT\noperations.\n\nPopulated by the system.\nRead-only.\nMore info: http://kubernetes.io/docs/user-guide/identifiers#uids\n+optional", + "type": "string" } } }, @@ -5242,14 +7202,6 @@ "type": "string" } } - }, - "workflow.StatusResponse": { - "type": "object", - "properties": { - "status": { - "type": "string" - } - } } } } \ No newline at end of file diff --git a/pkg/dashboard/swaggerdocs/swagger.yaml b/pkg/dashboard/swaggerdocs/swagger.yaml index e493c020ed..1a780bf56b 100644 --- a/pkg/dashboard/swaggerdocs/swagger.yaml +++ b/pkg/dashboard/swaggerdocs/swagger.yaml @@ -1,39 +1,5 @@ basePath: /api definitions: - archive.Archive: - $ref: '#/definitions/core.ObjectBase' - archive.Detail: - properties: - kube_object: - $ref: '#/definitions/core.KubeObjectDesc' - type: object - type: object - common.MapSlice: - additionalProperties: - items: - type: string - type: array - type: object - common.PhysicalMachine: - properties: - address: - type: string - name: - type: string - namespace: - type: string - type: object - common.Pod: - properties: - ip: - type: string - name: - type: string - namespace: - type: string - state: - type: string - type: object config.ChaosDashboardConfig: properties: cluster_mode: @@ -108,11 +74,26 @@ definitions: type: object core.KubeObjectDesc: properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + +optional + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + +optional + type: string metadata: $ref: '#/definitions/core.KubeObjectMeta' - type: object - spec: - type: object + spec: {} type: object core.KubeObjectMeta: properties: @@ -161,19 +142,6 @@ definitions: template: type: string type: object - core.ObjectBase: - properties: - created_at: - type: string - kind: - type: string - name: - type: string - namespace: - type: string - uid: - type: string - type: object core.Topology: properties: nodes: @@ -199,7 +167,6 @@ definitions: type: integer kube_object: $ref: '#/definitions/core.KubeObjectDesc' - type: object name: type: string namespace: @@ -208,7 +175,6 @@ definitions: type: string topology: $ref: '#/definitions/core.Topology' - type: object uid: type: string type: object @@ -251,7 +217,6 @@ definitions: type: boolean header: $ref: '#/definitions/curl.Header' - type: object jsonContent: type: boolean method: @@ -261,27 +226,68 @@ definitions: url: type: string type: object - experiment.Detail: + http.Header: + additionalProperties: + items: + type: string + type: array + type: object + intstr.IntOrString: + properties: + intVal: + type: integer + strVal: + type: string + type: + type: integer + type: object + resource.Quantity: + properties: + Format: + type: string + type: object + status.AllChaosStatus: + properties: + deleting: + type: integer + finished: + type: integer + injecting: + type: integer + paused: + type: integer + running: + type: integer + type: object + types.Archive: properties: created_at: type: string - failed_message: + kind: + type: string + name: + type: string + namespace: + type: string + uid: + type: string + type: object + types.ArchiveDetail: + properties: + created_at: type: string kind: type: string kube_object: $ref: '#/definitions/core.KubeObjectDesc' - type: object name: type: string namespace: type: string - status: - type: string uid: type: string type: object - experiment.Experiment: + types.Experiment: properties: created_at: type: string @@ -298,19 +304,16 @@ definitions: uid: type: string type: object - schedule.Detail: + types.ExperimentDetail: properties: created_at: type: string - experiment_uids: - items: - type: string - type: array + failed_message: + type: string kind: type: string kube_object: $ref: '#/definitions/core.KubeObjectDesc' - type: object name: type: string namespace: @@ -320,7 +323,27 @@ definitions: uid: type: string type: object - schedule.Schedule: + types.PhysicalMachine: + properties: + address: + type: string + name: + type: string + namespace: + type: string + type: object + types.Pod: + properties: + ip: + type: string + name: + type: string + namespace: + type: string + state: + type: string + type: object + types.Schedule: properties: created_at: type: string @@ -335,20 +358,28 @@ definitions: uid: type: string type: object - status.AllChaosStatus: + types.ScheduleDetail: properties: - deleting: - type: integer - finished: - type: integer - injecting: - type: integer - paused: - type: integer - running: - type: integer + created_at: + type: string + experiment_uids: + items: + type: string + type: array + kind: + type: string + kube_object: + $ref: '#/definitions/core.KubeObjectDesc' + name: + type: string + namespace: + type: string + status: + type: string + uid: + type: string type: object - template.StatusCheckTemplate: + types.StatusCheckTemplate: properties: description: type: string @@ -358,9 +389,8 @@ definitions: type: string spec: $ref: '#/definitions/v1alpha1.StatusCheckTemplate' - type: object type: object - template.StatusCheckTemplateBase: + types.StatusCheckTemplateBase: properties: created_at: type: string @@ -373,7 +403,7 @@ definitions: uid: type: string type: object - template.StatusCheckTemplateDetail: + types.StatusCheckTemplateDetail: properties: created_at: type: string @@ -385,7 +415,6 @@ definitions: type: string spec: $ref: '#/definitions/v1alpha1.StatusCheckTemplate' - type: object uid: type: string type: object @@ -400,11 +429,2609 @@ definitions: type: type: string type: object + utils.MapStringSliceResponse: + additionalProperties: + items: + type: string + type: array + type: object utils.Response: properties: status: type: string type: object + v1.AWSElasticBlockStoreVolumeSource: + properties: + fsType: + description: |- + Filesystem type of the volume that you want to mount. + Tip: Ensure that the filesystem type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + TODO: how do we prevent errors in the filesystem from compromising the machine + +optional + type: string + partition: + description: |- + The partition in the volume that you want to mount. + If omitted, the default is to mount by volume name. + Examples: For volume /dev/sda1, you specify the partition as "1". + Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + +optional + type: integer + readOnly: + description: |- + Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + If omitted, the default is "false". + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +optional + type: boolean + volumeID: + description: |- + Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + type: string + type: object + v1.AzureDiskVolumeSource: + properties: + cachingMode: + description: |- + Host Caching mode: None, Read Only, Read Write. + +optional + type: string + diskName: + description: The Name of the data disk in the blob storage + type: string + diskURI: + description: The URI the data disk in the blob storage + type: string + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + +optional + type: string + kind: + description: 'Expected values Shared: multiple blob disks per storage account Dedicated: + single blob disk per storage account Managed: azure managed data disk (only + in managed availability set). defaults to shared' + type: string + readOnly: + description: |- + Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + +optional + type: boolean + type: object + v1.AzureFileVolumeSource: + properties: + readOnly: + description: |- + Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + +optional + type: boolean + secretName: + description: the name of secret that contains Azure Storage Account Name and + Key + type: string + shareName: + description: Share Name + type: string + type: object + v1.CSIVolumeSource: + properties: + driver: + description: |- + Driver is the name of the CSI driver that handles this volume. + Consult with your admin for the correct name as registered in the cluster. + type: string + fsType: + description: |- + Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the associated CSI driver + which will determine the default filesystem to apply. + +optional + type: string + nodePublishSecretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + NodePublishSecretRef is a reference to the secret object containing + sensitive information to pass to the CSI driver to complete the CSI + NodePublishVolume and NodeUnpublishVolume calls. + This field is optional, and may be empty if no secret is required. If the + secret object contains more than one secret, all secret references are passed. + +optional + readOnly: + description: |- + Specifies a read-only configuration for the volume. + Defaults to false (read/write). + +optional + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: |- + VolumeAttributes stores driver-specific properties that are passed to the CSI + driver. Consult your driver's documentation for supported values. + +optional + type: object + type: object + v1.Capabilities: + properties: + add: + description: |- + Added capabilities + +optional + items: + type: string + type: array + drop: + description: |- + Removed capabilities + +optional + items: + type: string + type: array + type: object + v1.CephFSVolumeSource: + properties: + monitors: + description: |- + Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + items: + type: string + type: array + path: + description: |- + Optional: Used as the mounted root, rather than the full Ceph tree, default is / + +optional + type: string + readOnly: + description: |- + Optional: Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +optional + type: boolean + secretFile: + description: |- + Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +optional + type: string + secretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + Optional: SecretRef is reference to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +optional + user: + description: |- + Optional: User is the rados user name, default is admin + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + +optional + type: string + type: object + v1.CinderVolumeSource: + properties: + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +optional + type: string + readOnly: + description: |- + Optional: Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +optional + type: boolean + secretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + Optional: points to a secret object containing parameters used to connect + to OpenStack. + +optional + volumeID: + description: |- + volume id used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + type: string + type: object + v1.ConfigMapEnvSource: + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + optional: + description: |- + Specify whether the ConfigMap must be defined + +optional + type: boolean + type: object + v1.ConfigMapKeySelector: + properties: + key: + description: The key to select. + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + optional: + description: |- + Specify whether the ConfigMap or its key must be defined + +optional + type: boolean + type: object + v1.ConfigMapProjection: + properties: + items: + description: |- + If unspecified, each key-value pair in the Data field of the referenced + ConfigMap will be projected into the volume as a file whose name is the + key and content is the value. If specified, the listed keys will be + projected into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + +optional + items: + $ref: '#/definitions/v1.KeyToPath' + type: array + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + optional: + description: |- + Specify whether the ConfigMap or its keys must be defined + +optional + type: boolean + type: object + v1.ConfigMapVolumeSource: + properties: + defaultMode: + description: |- + Optional: mode bits used to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits set. + +optional + type: integer + items: + description: |- + If unspecified, each key-value pair in the Data field of the referenced + ConfigMap will be projected into the volume as a file whose name is the + key and content is the value. If specified, the listed keys will be + projected into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + +optional + items: + $ref: '#/definitions/v1.KeyToPath' + type: array + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + optional: + description: |- + Specify whether the ConfigMap or its keys must be defined + +optional + type: boolean + type: object + v1.Container: + properties: + args: + description: |- + Arguments to the entrypoint. + The docker image's CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +optional + items: + type: string + type: array + command: + description: |- + Entrypoint array. Not executed within a shell. + The docker image's ENTRYPOINT is used if this is not provided. + Variable references $(VAR_NAME) are expanded using the container's environment. If a variable + cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will + produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + +optional + items: + type: string + type: array + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + +optional + +patchMergeKey=name + +patchStrategy=merge + items: + $ref: '#/definitions/v1.EnvVar' + type: array + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source must be a C_IDENTIFIER. All invalid keys + will be reported as an event when the container is starting. When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + +optional + items: + $ref: '#/definitions/v1.EnvFromSource' + type: array + image: + description: |- + Docker image name. + More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config management to default or override + container images in workload controllers like Deployments and StatefulSets. + +optional + type: string + imagePullPolicy: + description: |- + Image pull policy. + One of Always, Never, IfNotPresent. + Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + +optional + type: string + lifecycle: + $ref: '#/definitions/v1.Lifecycle' + description: |- + Actions that the management system should take in response to container lifecycle events. + Cannot be updated. + +optional + livenessProbe: + $ref: '#/definitions/v1.Probe' + description: |- + Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +optional + name: + description: |- + Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: |- + List of ports to expose from the container. Exposing a port here gives + the system additional information about the network connections a + container uses, but is primarily informational. Not specifying a port here + DOES NOT prevent that port from being exposed. Any port which is + listening on the default "0.0.0.0" address inside a container will be + accessible from the network. + Cannot be updated. + +optional + +patchMergeKey=containerPort + +patchStrategy=merge + +listType=map + +listMapKey=containerPort + +listMapKey=protocol + items: + $ref: '#/definitions/v1.ContainerPort' + type: array + readinessProbe: + $ref: '#/definitions/v1.Probe' + description: |- + Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +optional + resources: + $ref: '#/definitions/v1.ResourceRequirements' + description: |- + Compute Resources required by this container. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +optional + securityContext: + $ref: '#/definitions/v1.SecurityContext' + description: |- + SecurityContext defines the security options the container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + +optional + startupProbe: + $ref: '#/definitions/v1.Probe' + description: |- + StartupProbe indicates that the Pod has successfully initialized. + If specified, no other probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + when it might take a long time to load data or warm a cache, than during steady-state operation. + This cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +optional + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + +optional + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + +optional + type: boolean + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + +optional + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError will use the last chunk of container log output if the termination + message file is empty and the container exited with an error. + The log output is limited to 2048 bytes or 80 lines, whichever is smaller. + Defaults to File. + Cannot be updated. + +optional + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + +optional + type: boolean + volumeDevices: + description: |- + volumeDevices is the list of block devices to be used by the container. + +patchMergeKey=devicePath + +patchStrategy=merge + +optional + items: + $ref: '#/definitions/v1.VolumeDevice' + type: array + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. + Cannot be updated. + +optional + +patchMergeKey=mountPath + +patchStrategy=merge + items: + $ref: '#/definitions/v1.VolumeMount' + type: array + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + +optional + type: string + type: object + v1.ContainerPort: + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + type: integer + hostIP: + description: |- + What host IP to bind the external port to. + +optional + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + +optional + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + +optional + type: string + protocol: + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + +optional + +default="TCP" + type: string + type: object + v1.DownwardAPIProjection: + properties: + items: + description: |- + Items is a list of DownwardAPIVolume file + +optional + items: + $ref: '#/definitions/v1.DownwardAPIVolumeFile' + type: array + type: object + v1.DownwardAPIVolumeFile: + properties: + fieldRef: + $ref: '#/definitions/v1.ObjectFieldSelector' + description: |- + Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + +optional + mode: + description: |- + Optional: mode bits used to set permissions on this file, must be an octal value + between 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + If not specified, the volume defaultMode will be used. + This might be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits set. + +optional + type: integer + path: + description: 'Required: Path is the relative path name of the file to be + created. Must not be absolute or contain the ''..'' path. Must be utf-8 + encoded. The first item of the relative path must not start with ''..''' + type: string + resourceFieldRef: + $ref: '#/definitions/v1.ResourceFieldSelector' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + +optional + type: object + v1.DownwardAPIVolumeSource: + properties: + defaultMode: + description: |- + Optional: mode bits to use on created files by default. Must be a + Optional: mode bits used to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits set. + +optional + type: integer + items: + description: |- + Items is a list of downward API volume file + +optional + items: + $ref: '#/definitions/v1.DownwardAPIVolumeFile' + type: array + type: object + v1.EmptyDirVolumeSource: + properties: + medium: + description: |- + What type of storage medium should back this directory. + The default is "" which means to use the node's default medium. + Must be an empty string (default) or Memory. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + +optional + type: string + sizeLimit: + $ref: '#/definitions/resource.Quantity' + description: |- + Total amount of local storage required for this EmptyDir volume. + The size limit is also applicable for memory medium. + The maximum usage on memory medium EmptyDir would be the minimum value between + the SizeLimit specified here and the sum of memory limits of all containers in a pod. + The default is nil which means that the limit is undefined. + More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + +optional + type: object + v1.EnvFromSource: + properties: + configMapRef: + $ref: '#/definitions/v1.ConfigMapEnvSource' + description: |- + The ConfigMap to select from + +optional + prefix: + description: |- + An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + +optional + type: string + secretRef: + $ref: '#/definitions/v1.SecretEnvSource' + description: |- + The Secret to select from + +optional + type: object + v1.EnvVar: + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + +optional + type: string + valueFrom: + $ref: '#/definitions/v1.EnvVarSource' + description: |- + Source for the environment variable's value. Cannot be used if value is not empty. + +optional + type: object + v1.EnvVarSource: + properties: + configMapKeyRef: + $ref: '#/definitions/v1.ConfigMapKeySelector' + description: |- + Selects a key of a ConfigMap. + +optional + fieldRef: + $ref: '#/definitions/v1.ObjectFieldSelector' + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + +optional + resourceFieldRef: + $ref: '#/definitions/v1.ResourceFieldSelector' + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + +optional + secretKeyRef: + $ref: '#/definitions/v1.SecretKeySelector' + description: |- + Selects a key of a secret in the pod's namespace + +optional + type: object + v1.EphemeralVolumeSource: + properties: + volumeClaimTemplate: + $ref: '#/definitions/v1.PersistentVolumeClaimTemplate' + description: |- + Will be used to create a stand-alone PVC to provision the volume. + The pod in which this EphemeralVolumeSource is embedded will be the + owner of the PVC, i.e. the PVC will be deleted together with the + pod. The name of the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` array + entry. Pod validation will reject the pod if the concatenated name + is not valid for a PVC (for example, too long). + + An existing PVC with that name that is not owned by the pod + will *not* be used for the pod to avoid using an unrelated + volume by mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created PVC is + meant to be used by the pod, the PVC has to updated with an + owner reference to the pod once the pod exists. Normally + this should not be necessary, but it may be useful when + manually reconstructing a broken cluster. + + This field is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. + + Required, must not be nil. + type: object + v1.ExecAction: + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + +optional + items: + type: string + type: array + type: object + v1.FCVolumeSource: + properties: + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + TODO: how do we prevent errors in the filesystem from compromising the machine + +optional + type: string + lun: + description: |- + Optional: FC target lun number + +optional + type: integer + readOnly: + description: |- + Optional: Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + +optional + type: boolean + targetWWNs: + description: |- + Optional: FC target worldwide names (WWNs) + +optional + items: + type: string + type: array + wwids: + description: |- + Optional: FC volume world wide identifiers (wwids) + Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + +optional + items: + type: string + type: array + type: object + v1.FieldsV1: + type: object + v1.FlexVolumeSource: + properties: + driver: + description: Driver is the name of the driver to use for this volume. + type: string + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + +optional + type: string + options: + additionalProperties: + type: string + description: |- + Optional: Extra command options if any. + +optional + type: object + readOnly: + description: |- + Optional: Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + +optional + type: boolean + secretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + Optional: SecretRef is reference to the secret object containing + sensitive information to pass to the plugin scripts. This may be + empty if no secret object is specified. If the secret object + contains more than one secret, all secrets are passed to the plugin + scripts. + +optional + type: object + v1.FlockerVolumeSource: + properties: + datasetName: + description: |- + Name of the dataset stored as metadata -> name on the dataset for Flocker + should be considered as deprecated + +optional + type: string + datasetUUID: + description: |- + UUID of the dataset. This is unique identifier of a Flocker dataset + +optional + type: string + type: object + v1.GCEPersistentDiskVolumeSource: + properties: + fsType: + description: |- + Filesystem type of the volume that you want to mount. + Tip: Ensure that the filesystem type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + TODO: how do we prevent errors in the filesystem from compromising the machine + +optional + type: string + partition: + description: |- + The partition in the volume that you want to mount. + If omitted, the default is to mount by volume name. + Examples: For volume /dev/sda1, you specify the partition as "1". + Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +optional + type: integer + pdName: + description: |- + Unique name of the PD resource in GCE. Used to identify the disk in GCE. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + type: string + readOnly: + description: |- + ReadOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +optional + type: boolean + type: object + v1.GRPCAction: + properties: + port: + description: Port number of the gRPC service. Number must be in the range + 1 to 65535. + type: integer + service: + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + +optional + +default="" + type: string + type: object + v1.GitRepoVolumeSource: + properties: + directory: + description: |- + Target directory name. + Must not contain or start with '..'. If '.' is supplied, the volume directory will be the + git repository. Otherwise, if specified, the volume will contain the git repository in + the subdirectory with the given name. + +optional + type: string + repository: + description: Repository URL + type: string + revision: + description: |- + Commit hash for the specified revision. + +optional + type: string + type: object + v1.GlusterfsVolumeSource: + properties: + endpoints: + description: |- + EndpointsName is the endpoint name that details Glusterfs topology. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + type: string + path: + description: |- + Path is the Glusterfs volume path. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + type: string + readOnly: + description: |- + ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. + Defaults to false. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + +optional + type: boolean + type: object + v1.HTTPGetAction: + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + +optional + type: string + httpHeaders: + description: |- + Custom headers to set in the request. HTTP allows repeated headers. + +optional + items: + $ref: '#/definitions/v1.HTTPHeader' + type: array + path: + description: |- + Path to access on the HTTP server. + +optional + type: string + port: + $ref: '#/definitions/intstr.IntOrString' + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + +optional + type: string + type: object + v1.HTTPHeader: + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + type: object + v1.HostPathVolumeSource: + properties: + path: + description: |- + Path of the directory on the host. + If the path is a symlink, it will follow the link to the real path. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + type: string + type: + description: |- + Type for HostPath Volume + Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + +optional + type: string + type: object + v1.ISCSIVolumeSource: + properties: + chapAuthDiscovery: + description: |- + whether support iSCSI Discovery CHAP authentication + +optional + type: boolean + chapAuthSession: + description: |- + whether support iSCSI Session CHAP authentication + +optional + type: boolean + fsType: + description: |- + Filesystem type of the volume that you want to mount. + Tip: Ensure that the filesystem type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + TODO: how do we prevent errors in the filesystem from compromising the machine + +optional + type: string + initiatorName: + description: |- + Custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + : will be created for the connection. + +optional + type: string + iqn: + description: Target iSCSI Qualified Name. + type: string + iscsiInterface: + description: |- + iSCSI Interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + +optional + type: string + lun: + description: iSCSI Target Lun number. + type: integer + portals: + description: |- + iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port + is other than default (typically TCP ports 860 and 3260). + +optional + items: + type: string + type: array + readOnly: + description: |- + ReadOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + +optional + type: boolean + secretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + CHAP Secret for iSCSI target and initiator authentication + +optional + targetPortal: + description: |- + iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port + is other than default (typically TCP ports 860 and 3260). + type: string + type: object + v1.KeyToPath: + properties: + key: + description: The key to project. + type: string + mode: + description: |- + Optional: mode bits used to set permissions on this file. + Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + If not specified, the volume defaultMode will be used. + This might be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits set. + +optional + type: integer + path: + description: |- + The relative path of the file to map the key to. + May not be an absolute path. + May not contain the path element '..'. + May not start with the string '..'. + type: string + type: object + v1.LabelSelector: + properties: + matchExpressions: + description: |- + matchExpressions is a list of label selector requirements. The requirements are ANDed. + +optional + items: + $ref: '#/definitions/v1.LabelSelectorRequirement' + type: array + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + +optional + type: object + type: object + v1.LabelSelectorRequirement: + properties: + key: + description: |- + key is the label key that the selector applies to. + +patchMergeKey=key + +patchStrategy=merge + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + +optional + items: + type: string + type: array + type: object + v1.Lifecycle: + properties: + postStart: + $ref: '#/definitions/v1.LifecycleHandler' + description: |- + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + +optional + preStop: + $ref: '#/definitions/v1.LifecycleHandler' + description: |- + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + +optional + type: object + v1.LifecycleHandler: + properties: + exec: + $ref: '#/definitions/v1.ExecAction' + description: |- + Exec specifies the action to take. + +optional + httpGet: + $ref: '#/definitions/v1.HTTPGetAction' + description: |- + HTTPGet specifies the http request to perform. + +optional + tcpSocket: + $ref: '#/definitions/v1.TCPSocketAction' + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for the backward compatibility. There are no validation of this field and + lifecycle hooks will fail in runtime when tcp handler is specified. + +optional + type: object + v1.LocalObjectReference: + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + type: object + v1.ManagedFieldsEntry: + properties: + apiVersion: + description: |- + APIVersion defines the version of this resource that this field set + applies to. The format is "group/version" just like the top-level + APIVersion field. It is necessary to track the version of a field + set because it cannot be automatically converted. + type: string + fieldsType: + description: |- + FieldsType is the discriminator for the different fields format and version. + There is currently only one possible value: "FieldsV1" + type: string + fieldsV1: + $ref: '#/definitions/v1.FieldsV1' + description: |- + FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. + +optional + manager: + description: Manager is an identifier of the workflow managing these fields. + type: string + operation: + description: |- + Operation is the type of operation which lead to this ManagedFieldsEntry being created. + The only valid values for this field are 'Apply' and 'Update'. + type: string + subresource: + description: |- + Subresource is the name of the subresource used to update that object, or + empty string if the object was updated through the main resource. The + value of this field is used to distinguish between managers, even if they + share the same name. For example, a status update will be distinct from a + regular update using the same manager name. + Note that the APIVersion field is not related to the Subresource field and + it always corresponds to the version of the main resource. + type: string + time: + description: |- + Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' + +optional + type: string + type: object + v1.NFSVolumeSource: + properties: + path: + description: |- + Path that is exported by the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + type: string + readOnly: + description: |- + ReadOnly here will force + the NFS export to be mounted with read-only permissions. + Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +optional + type: boolean + server: + description: |- + Server is the hostname or IP address of the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + type: string + type: object + v1.ObjectFieldSelector: + properties: + apiVersion: + description: |- + Version of the schema the FieldPath is written in terms of, defaults to "v1". + +optional + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + type: object + v1.ObjectReference: + properties: + apiVersion: + description: |- + API version of the referent. + +optional + type: string + fieldPath: + description: |- + If referring to a piece of an object instead of an entire object, this string + should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within a pod, this would take on a value like: + "spec.containers{name}" (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" (container with + index 2 in this pod). This syntax is chosen only to have some well-defined way of + referencing a part of an object. + TODO: this design is not final and this field is subject to change in the future. + +optional + type: string + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + +optional + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + +optional + type: string + namespace: + description: |- + Namespace of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + +optional + type: string + resourceVersion: + description: |- + Specific resourceVersion to which this reference is made, if any. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + +optional + type: string + uid: + description: |- + UID of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + +optional + type: string + type: object + v1.OwnerReference: + properties: + apiVersion: + description: API version of the referent. + type: string + blockOwnerDeletion: + description: |- + If true, AND if the owner has the "foregroundDeletion" finalizer, then + the owner cannot be deleted from the key-value store until this + reference is removed. + Defaults to false. + To set this field, a user needs "delete" permission of the owner, + otherwise 422 (Unprocessable Entity) will be returned. + +optional + type: boolean + controller: + description: |- + If true, this reference points to the managing controller. + +optional + type: boolean + kind: + description: |- + Kind of the referent. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + name: + description: |- + Name of the referent. + More info: http://kubernetes.io/docs/user-guide/identifiers#names + type: string + uid: + description: |- + UID of the referent. + More info: http://kubernetes.io/docs/user-guide/identifiers#uids + type: string + type: object + v1.PersistentVolumeClaimSpec: + properties: + accessModes: + description: |- + AccessModes contains the desired access modes the volume should have. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + +optional + items: + type: string + type: array + dataSource: + $ref: '#/definitions/v1.TypedLocalObjectReference' + description: |- + This field can be used to specify either: + * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) + * An existing PVC (PersistentVolumeClaim) + If the provisioner or an external controller can support the specified data source, + it will create a new volume based on the contents of the specified data source. + If the AnyVolumeDataSource feature gate is enabled, this field will always have + the same contents as the DataSourceRef field. + +optional + dataSourceRef: + $ref: '#/definitions/v1.TypedLocalObjectReference' + description: |- + Specifies the object from which to populate the volume with data, if a non-empty + volume is desired. This may be any local object from a non-empty API group (non + core object) or a PersistentVolumeClaim object. + When this field is specified, volume binding will only succeed if the type of + the specified object matches some installed volume populator or dynamic + provisioner. + This field will replace the functionality of the DataSource field and as such + if both fields are non-empty, they must have the same value. For backwards + compatibility, both fields (DataSource and DataSourceRef) will be set to the same + value automatically if one of them is empty and the other is non-empty. + There are two important differences between DataSource and DataSourceRef: + * While DataSource only allows two specific types of objects, DataSourceRef + allows any non-core object, as well as PersistentVolumeClaim objects. + * While DataSource ignores disallowed values (dropping them), DataSourceRef + preserves all values, and generates an error if a disallowed value is + specified. + (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + +optional + resources: + $ref: '#/definitions/v1.ResourceRequirements' + description: |- + Resources represents the minimum resources the volume should have. + If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements + that are lower than previous value but must still be higher than capacity recorded in the + status field of the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + +optional + selector: + $ref: '#/definitions/v1.LabelSelector' + description: |- + A label query over volumes to consider for binding. + +optional + storageClassName: + description: |- + Name of the StorageClass required by the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + +optional + type: string + volumeMode: + description: |- + volumeMode defines what type of volume is required by the claim. + Value of Filesystem is implied when not included in claim spec. + +optional + type: string + volumeName: + description: |- + VolumeName is the binding reference to the PersistentVolume backing this claim. + +optional + type: string + type: object + v1.PersistentVolumeClaimTemplate: + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + +optional + type: object + clusterName: + description: |- + The name of the cluster which the object belongs to. + This is used to distinguish resources with same name and namespace in different clusters. + This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + +optional + type: string + creationTimestamp: + description: |- + CreationTimestamp is a timestamp representing the server time when this object was + created. It is not guaranteed to be set in happens-before order across separate operations. + Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. + Read-only. + Null for lists. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +optional + type: string + deletionGracePeriodSeconds: + description: |- + Number of seconds allowed for this object to gracefully terminate before + it will be removed from the system. Only set when deletionTimestamp is also set. + May only be shortened. + Read-only. + +optional + type: integer + deletionTimestamp: + description: |- + DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + field is set by the server when a graceful deletion is requested by the user, and is not + directly settable by a client. The resource is expected to be deleted (no longer visible + from resource lists, and not reachable by name) after the time in this field, once the + finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. + Once the deletionTimestamp is set, this value may not be unset or be set further into the + future, although it may be shortened or the resource may be deleted prior to this time. + For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react + by sending a graceful termination signal to the containers in the pod. After that 30 seconds, + the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, + remove the pod from the API. In the presence of network partitions, this object may still + exist after this timestamp, until an administrator or automated process can determine the + resource is fully terminated. + If not set, graceful deletion of the object has not been requested. + + Populated by the system when a graceful deletion is requested. + Read-only. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +optional + type: string + finalizers: + description: |- + Must be empty before the object is deleted from the registry. Each entry + is an identifier for the responsible component that will remove the entry + from the list. If the deletionTimestamp of the object is non-nil, entries + in this list can only be removed. + Finalizers may be processed and removed in any order. Order is NOT enforced + because it introduces significant risk of stuck finalizers. + finalizers is a shared field, any actor with permission can reorder it. + If the finalizer list is processed in order, then this can lead to a situation + in which the component responsible for the first finalizer in the list is + waiting for a signal (field value, external system, or other) produced by a + component responsible for a finalizer later in the list, resulting in a deadlock. + Without enforced ordering finalizers are free to order amongst themselves and + are not vulnerable to ordering changes in the list. + +optional + +patchStrategy=merge + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique + name ONLY IF the Name field has not been provided. + If this field is used, the name returned to the client will be different + than the name passed. This value will also be combined with a unique suffix. + The provided value has the same validation rules as the Name field, + and may be truncated by the length of the suffix required to make the value + unique on the server. + + If this field is specified and the generated name exists, the server will + NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + ServerTimeout indicating a unique name could not be found in the time allotted, and the client + should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency + +optional + type: string + generation: + description: |- + A sequence number representing a specific generation of the desired state. + Populated by the system. Read-only. + +optional + type: integer + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + +optional + type: object + managedFields: + description: |- + ManagedFields maps workflow-id and version to the set of fields + that are managed by that workflow. This is mostly for internal + housekeeping, and users typically shouldn't need to set or + understand this field. A workflow can be the user's name, a + controller's name, or the name of a specific apply path like + "ci-cd". The set of fields is always in the version that the + workflow used when modifying the object. + + +optional + items: + $ref: '#/definitions/v1.ManagedFieldsEntry' + type: array + name: + description: |- + Name must be unique within a namespace. Is required when creating resources, although + some resources may allow a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence and configuration + definition. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/identifiers#names + +optional + type: string + namespace: + description: |- + Namespace defines the space within which each name must be unique. An empty namespace is + equivalent to the "default" namespace, but "default" is the canonical representation. + Not all objects are required to be scoped to a namespace - the value of this field for + those objects will be empty. + + Must be a DNS_LABEL. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces + +optional + type: string + ownerReferences: + description: |- + List of objects depended by this object. If ALL objects in the list have + been deleted, this object will be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, with the controller field set to true. + There cannot be more than one managing controller. + +optional + +patchMergeKey=uid + +patchStrategy=merge + items: + $ref: '#/definitions/v1.OwnerReference' + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can + be used by clients to determine when objects have changed. May be used for optimistic + concurrency, change detection, and the watch operation on a resource or set of resources. + Clients must treat these values as opaque and passed unmodified back to the server. + They may only be valid for a particular resource or set of resources. + + Populated by the system. + Read-only. + Value must be treated as opaque by clients and . + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + +optional + type: string + selfLink: + description: |- + SelfLink is a URL representing this object. + Populated by the system. + Read-only. + + DEPRECATED + Kubernetes will stop propagating this field in 1.20 release and the field is planned + to be removed in 1.21 release. + +optional + type: string + spec: + $ref: '#/definitions/v1.PersistentVolumeClaimSpec' + description: |- + The specification for the PersistentVolumeClaim. The entire content is + copied unchanged into the PVC that gets created from this + template. The same fields as in a PersistentVolumeClaim + are also valid here. + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by + the server on successful creation of a resource and is not allowed to change on PUT + operations. + + Populated by the system. + Read-only. + More info: http://kubernetes.io/docs/user-guide/identifiers#uids + +optional + type: string + type: object + v1.PersistentVolumeClaimVolumeSource: + properties: + claimName: + description: |- + ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + type: string + readOnly: + description: |- + Will force the ReadOnly setting in VolumeMounts. + Default false. + +optional + type: boolean + type: object + v1.PhotonPersistentDiskVolumeSource: + properties: + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + type: string + pdID: + description: ID that identifies Photon Controller persistent disk + type: string + type: object + v1.PortworxVolumeSource: + properties: + fsType: + description: |- + FSType represents the filesystem type to mount + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + type: string + readOnly: + description: |- + Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + +optional + type: boolean + volumeID: + description: VolumeID uniquely identifies a Portworx volume + type: string + type: object + v1.Probe: + properties: + exec: + $ref: '#/definitions/v1.ExecAction' + description: |- + Exec specifies the action to take. + +optional + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + +optional + type: integer + grpc: + $ref: '#/definitions/v1.GRPCAction' + description: |- + GRPC specifies an action involving a GRPC port. + This is an alpha field and requires enabling GRPCContainerProbe feature gate. + +featureGate=GRPCContainerProbe + +optional + httpGet: + $ref: '#/definitions/v1.HTTPGetAction' + description: |- + HTTPGet specifies the http request to perform. + +optional + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +optional + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + +optional + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + +optional + type: integer + tcpSocket: + $ref: '#/definitions/v1.TCPSocketAction' + description: |- + TCPSocket specifies an action involving a TCP port. + +optional + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + +optional + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + +optional + type: integer + type: object + v1.ProjectedVolumeSource: + properties: + defaultMode: + description: |- + Mode bits used to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits set. + +optional + type: integer + sources: + description: |- + list of volume projections + +optional + items: + $ref: '#/definitions/v1.VolumeProjection' + type: array + type: object + v1.QuobyteVolumeSource: + properties: + group: + description: |- + Group to map volume access to + Default is no group + +optional + type: string + readOnly: + description: |- + ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. + Defaults to false. + +optional + type: boolean + registry: + description: |- + Registry represents a single or multiple Quobyte Registry services + specified as a string as host:port pair (multiple entries are separated with commas) + which acts as the central registry for volumes + type: string + tenant: + description: |- + Tenant owning the given Quobyte volume in the Backend + Used with dynamically provisioned Quobyte volumes, value is set by the plugin + +optional + type: string + user: + description: |- + User to map volume access to + Defaults to serivceaccount user + +optional + type: string + volume: + description: Volume is a string that references an already created Quobyte + volume by name. + type: string + type: object + v1.RBDVolumeSource: + properties: + fsType: + description: |- + Filesystem type of the volume that you want to mount. + Tip: Ensure that the filesystem type is supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + TODO: how do we prevent errors in the filesystem from compromising the machine + +optional + type: string + image: + description: |- + The rados image name. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + keyring: + description: |- + Keyring is the path to key ring for RBDUser. + Default is /etc/ceph/keyring. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +optional + type: string + monitors: + description: |- + A collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + items: + type: string + type: array + pool: + description: |- + The rados pool name. + Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +optional + type: string + readOnly: + description: |- + ReadOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +optional + type: boolean + secretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + SecretRef is name of the authentication secret for RBDUser. If provided + overrides keyring. + Default is nil. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +optional + user: + description: |- + The rados user name. + Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + +optional + type: string + type: object + v1.ResourceFieldSelector: + properties: + containerName: + description: |- + Container name: required for volumes, optional for env vars + +optional + type: string + divisor: + $ref: '#/definitions/resource.Quantity' + description: |- + Specifies the output format of the exposed resources, defaults to "1" + +optional + resource: + description: 'Required: resource to select' + type: string + type: object + v1.ResourceList: + additionalProperties: + $ref: '#/definitions/resource.Quantity' + type: object + v1.ResourceRequirements: + properties: + limits: + $ref: '#/definitions/v1.ResourceList' + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +optional + requests: + $ref: '#/definitions/v1.ResourceList' + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + +optional + type: object + v1.SELinuxOptions: + properties: + level: + description: |- + Level is SELinux level label that applies to the container. + +optional + type: string + role: + description: |- + Role is a SELinux role label that applies to the container. + +optional + type: string + type: + description: |- + Type is a SELinux type label that applies to the container. + +optional + type: string + user: + description: |- + User is a SELinux user label that applies to the container. + +optional + type: string + type: object + v1.ScaleIOVolumeSource: + properties: + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". + Default is "xfs". + +optional + type: string + gateway: + description: The host address of the ScaleIO API Gateway. + type: string + protectionDomain: + description: |- + The name of the ScaleIO Protection Domain for the configured storage. + +optional + type: string + readOnly: + description: |- + Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + +optional + type: boolean + secretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + SecretRef references to the secret for ScaleIO user and other + sensitive information. If this is not provided, Login operation will fail. + sslEnabled: + description: |- + Flag to enable/disable SSL communication with Gateway, default false + +optional + type: boolean + storageMode: + description: |- + Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + +optional + type: string + storagePool: + description: |- + The ScaleIO Storage Pool associated with the protection domain. + +optional + type: string + system: + description: The name of the storage system as configured in ScaleIO. + type: string + volumeName: + description: |- + The name of a volume already created in the ScaleIO system + that is associated with this volume source. + type: string + type: object + v1.SeccompProfile: + properties: + localhostProfile: + description: |- + localhostProfile indicates a profile defined in a file on the node should be used. + The profile must be preconfigured on the node to work. + Must be a descending path, relative to the kubelet's configured seccomp profile location. + Must only be set if type is "Localhost". + +optional + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - a profile defined in a file on the node should be used. + RuntimeDefault - the container runtime default profile should be used. + Unconfined - no profile should be applied. + +unionDiscriminator + type: string + type: object + v1.SecretEnvSource: + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + optional: + description: |- + Specify whether the Secret must be defined + +optional + type: boolean + type: object + v1.SecretKeySelector: + properties: + key: + description: The key of the secret to select from. Must be a valid secret + key. + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + optional: + description: |- + Specify whether the Secret or its key must be defined + +optional + type: boolean + type: object + v1.SecretProjection: + properties: + items: + description: |- + If unspecified, each key-value pair in the Data field of the referenced + Secret will be projected into the volume as a file whose name is the + key and content is the value. If specified, the listed keys will be + projected into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + +optional + items: + $ref: '#/definitions/v1.KeyToPath' + type: array + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + +optional + type: string + optional: + description: |- + Specify whether the Secret or its key must be defined + +optional + type: boolean + type: object + v1.SecretVolumeSource: + properties: + defaultMode: + description: |- + Optional: mode bits used to set permissions on created files by default. + Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + YAML accepts both octal and decimal values, JSON requires decimal values + for mode bits. Defaults to 0644. + Directories within the path are not affected by this setting. + This might be in conflict with other options that affect the file + mode, like fsGroup, and the result can be other mode bits set. + +optional + type: integer + items: + description: |- + If unspecified, each key-value pair in the Data field of the referenced + Secret will be projected into the volume as a file whose name is the + key and content is the value. If specified, the listed keys will be + projected into the specified paths, and unlisted keys will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + +optional + items: + $ref: '#/definitions/v1.KeyToPath' + type: array + optional: + description: |- + Specify whether the Secret or its keys must be defined + +optional + type: boolean + secretName: + description: |- + Name of the secret in the pod's namespace to use. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + +optional + type: string + type: object + v1.SecurityContext: + properties: + allowPrivilegeEscalation: + description: |- + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + +optional + type: boolean + capabilities: + $ref: '#/definitions/v1.Capabilities' + description: |- + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + +optional + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + +optional + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default is DefaultProcMount which uses the container runtime defaults for + readonly paths and masked paths. + This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. + +optional + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + +optional + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + +optional + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + +optional + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + +optional + type: integer + seLinuxOptions: + $ref: '#/definitions/v1.SELinuxOptions' + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + +optional + seccompProfile: + $ref: '#/definitions/v1.SeccompProfile' + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + +optional + windowsOptions: + $ref: '#/definitions/v1.WindowsSecurityContextOptions' + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + +optional + type: object + v1.ServiceAccountTokenProjection: + properties: + audience: + description: |- + Audience is the intended audience of the token. A recipient of a token + must identify itself with an identifier specified in the audience of the + token, and otherwise should reject the token. The audience defaults to the + identifier of the apiserver. + +optional + type: string + expirationSeconds: + description: |- + ExpirationSeconds is the requested duration of validity of the service + account token. As the token approaches expiration, the kubelet volume + plugin will proactively rotate the service account token. The kubelet will + start trying to rotate the token if the token is older than 80 percent of + its time to live or if the token is older than 24 hours.Defaults to 1 hour + and must be at least 10 minutes. + +optional + type: integer + path: + description: |- + Path is the path relative to the mount point of the file to project the + token into. + type: string + type: object + v1.StorageOSVolumeSource: + properties: + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + +optional + type: string + readOnly: + description: |- + Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + +optional + type: boolean + secretRef: + $ref: '#/definitions/v1.LocalObjectReference' + description: |- + SecretRef specifies the secret to use for obtaining the StorageOS API + credentials. If not specified, default values will be attempted. + +optional + volumeName: + description: |- + VolumeName is the human-readable name of the StorageOS volume. Volume + names are only unique within a namespace. + type: string + volumeNamespace: + description: |- + VolumeNamespace specifies the scope of the volume within StorageOS. If no + namespace is specified then the Pod's namespace will be used. This allows the + Kubernetes name scoping to be mirrored within StorageOS for tighter integration. + Set VolumeName to any name to override the default behaviour. + Set to "default" if you are not using namespaces within StorageOS. + Namespaces that do not pre-exist within StorageOS will be created. + +optional + type: string + type: object + v1.TCPSocketAction: + properties: + host: + description: |- + Optional: Host name to connect to, defaults to the pod IP. + +optional + type: string + port: + $ref: '#/definitions/intstr.IntOrString' + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + type: object + v1.TypedLocalObjectReference: + properties: + apiGroup: + description: |- + APIGroup is the group for the resource being referenced. + If APIGroup is not specified, the specified Kind must be in the core API group. + For any other third-party types, APIGroup is required. + +optional + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + type: object + v1.Volume: + properties: + awsElasticBlockStore: + $ref: '#/definitions/v1.AWSElasticBlockStoreVolumeSource' + description: |- + AWSElasticBlockStore represents an AWS Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + +optional + azureDisk: + $ref: '#/definitions/v1.AzureDiskVolumeSource' + description: |- + AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + +optional + azureFile: + $ref: '#/definitions/v1.AzureFileVolumeSource' + description: |- + AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + +optional + cephfs: + $ref: '#/definitions/v1.CephFSVolumeSource' + description: |- + CephFS represents a Ceph FS mount on the host that shares a pod's lifetime + +optional + cinder: + $ref: '#/definitions/v1.CinderVolumeSource' + description: |- + Cinder represents a cinder volume attached and mounted on kubelets host machine. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + +optional + configMap: + $ref: '#/definitions/v1.ConfigMapVolumeSource' + description: |- + ConfigMap represents a configMap that should populate this volume + +optional + csi: + $ref: '#/definitions/v1.CSIVolumeSource' + description: |- + CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + +optional + downwardAPI: + $ref: '#/definitions/v1.DownwardAPIVolumeSource' + description: |- + DownwardAPI represents downward API about the pod that should populate this volume + +optional + emptyDir: + $ref: '#/definitions/v1.EmptyDirVolumeSource' + description: |- + EmptyDir represents a temporary directory that shares a pod's lifetime. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + +optional + ephemeral: + $ref: '#/definitions/v1.EphemeralVolumeSource' + description: |- + Ephemeral represents a volume that is handled by a cluster storage driver. + The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + and deleted when the pod is removed. + + Use this if: + a) the volume is only needed while the pod runs, + b) features of normal volumes like restoring from snapshot or capacity + tracking are needed, + c) the storage driver is specified through a storage class, and + d) the storage driver supports dynamic volume provisioning through + a PersistentVolumeClaim (see EphemeralVolumeSource for more + information on the connection between this volume type + and PersistentVolumeClaim). + + Use PersistentVolumeClaim or one of the vendor-specific + APIs for volumes that persist for longer than the lifecycle + of an individual pod. + + Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + be used that way - see the documentation of the driver for + more information. + + A pod can use both types of ephemeral volumes and + persistent volumes at the same time. + + +optional + fc: + $ref: '#/definitions/v1.FCVolumeSource' + description: |- + FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + +optional + flexVolume: + $ref: '#/definitions/v1.FlexVolumeSource' + description: |- + FlexVolume represents a generic volume resource that is + provisioned/attached using an exec based plugin. + +optional + flocker: + $ref: '#/definitions/v1.FlockerVolumeSource' + description: |- + Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running + +optional + gcePersistentDisk: + $ref: '#/definitions/v1.GCEPersistentDiskVolumeSource' + description: |- + GCEPersistentDisk represents a GCE Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + +optional + gitRepo: + $ref: '#/definitions/v1.GitRepoVolumeSource' + description: |- + GitRepo represents a git repository at a particular revision. + DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an + EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir + into the Pod's container. + +optional + glusterfs: + $ref: '#/definitions/v1.GlusterfsVolumeSource' + description: |- + Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + More info: https://examples.k8s.io/volumes/glusterfs/README.md + +optional + hostPath: + $ref: '#/definitions/v1.HostPathVolumeSource' + description: |- + HostPath represents a pre-existing file or directory on the host + machine that is directly exposed to the container. This is generally + used for system agents or other privileged things that are allowed + to see the host machine. Most containers will NOT need this. + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + --- + TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not + mount host directories as read/write. + +optional + iscsi: + $ref: '#/definitions/v1.ISCSIVolumeSource' + description: |- + ISCSI represents an ISCSI Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + More info: https://examples.k8s.io/volumes/iscsi/README.md + +optional + name: + description: |- + Volume's name. + Must be a DNS_LABEL and unique within the pod. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + nfs: + $ref: '#/definitions/v1.NFSVolumeSource' + description: |- + NFS represents an NFS mount on the host that shares a pod's lifetime + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + +optional + persistentVolumeClaim: + $ref: '#/definitions/v1.PersistentVolumeClaimVolumeSource' + description: |- + PersistentVolumeClaimVolumeSource represents a reference to a + PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + +optional + photonPersistentDisk: + $ref: '#/definitions/v1.PhotonPersistentDiskVolumeSource' + description: PhotonPersistentDisk represents a PhotonController persistent + disk attached and mounted on kubelets host machine + portworxVolume: + $ref: '#/definitions/v1.PortworxVolumeSource' + description: |- + PortworxVolume represents a portworx volume attached and mounted on kubelets host machine + +optional + projected: + $ref: '#/definitions/v1.ProjectedVolumeSource' + description: Items for all in one resources secrets, configmaps, and downward + API + quobyte: + $ref: '#/definitions/v1.QuobyteVolumeSource' + description: |- + Quobyte represents a Quobyte mount on the host that shares a pod's lifetime + +optional + rbd: + $ref: '#/definitions/v1.RBDVolumeSource' + description: |- + RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. + More info: https://examples.k8s.io/volumes/rbd/README.md + +optional + scaleIO: + $ref: '#/definitions/v1.ScaleIOVolumeSource' + description: |- + ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + +optional + secret: + $ref: '#/definitions/v1.SecretVolumeSource' + description: |- + Secret represents a secret that should populate this volume. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + +optional + storageos: + $ref: '#/definitions/v1.StorageOSVolumeSource' + description: |- + StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + +optional + vsphereVolume: + $ref: '#/definitions/v1.VsphereVirtualDiskVolumeSource' + description: |- + VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine + +optional + type: object + v1.VolumeDevice: + properties: + devicePath: + description: devicePath is the path inside of the container that the device + will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + type: object + v1.VolumeMount: + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: |- + mountPropagation determines how mounts are propagated from the host + to container and the other way around. + When not set, MountPropagationNone is used. + This field is beta in 1.10. + +optional + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + +optional + type: boolean + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + +optional + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + +optional + type: string + type: object + v1.VolumeProjection: + properties: + configMap: + $ref: '#/definitions/v1.ConfigMapProjection' + description: |- + information about the configMap data to project + +optional + downwardAPI: + $ref: '#/definitions/v1.DownwardAPIProjection' + description: |- + information about the downwardAPI data to project + +optional + secret: + $ref: '#/definitions/v1.SecretProjection' + description: |- + information about the secret data to project + +optional + serviceAccountToken: + $ref: '#/definitions/v1.ServiceAccountTokenProjection' + description: |- + information about the serviceAccountToken data to project + +optional + type: object + v1.VsphereVirtualDiskVolumeSource: + properties: + fsType: + description: |- + Filesystem type to mount. + Must be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + +optional + type: string + storagePolicyID: + description: |- + Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + +optional + type: string + storagePolicyName: + description: |- + Storage Policy Based Management (SPBM) profile name. + +optional + type: string + volumePath: + description: Path that identifies vSphere volume vmdk + type: string + type: object + v1.WindowsSecurityContextOptions: + properties: + gmsaCredentialSpec: + description: |- + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + +optional + type: string + gmsaCredentialSpecName: + description: |- + GMSACredentialSpecName is the name of the GMSA credential spec to use. + +optional + type: string + hostProcess: + description: |- + HostProcess determines if a container should be run as a 'Host Process' container. + This field is alpha-level and will only be honored by components that enable the + WindowsHostProcessContainers feature flag. Setting this field without the feature + flag will result in errors when validating the Pod. All of a Pod's containers must + have the same effective HostProcess value (it is not allowed to have a mix of HostProcess + containers and non-HostProcess containers). In addition, if HostProcess is true + then HostNetwork must also be set to true. + +optional + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + +optional + type: string + type: object v1alpha1.AWSChaosSpec: properties: action: @@ -456,14 +3083,12 @@ definitions: atime: $ref: '#/definitions/v1alpha1.Timespec' description: +optional - type: object blocks: description: +optional type: integer ctime: $ref: '#/definitions/v1alpha1.Timespec' description: +optional - type: object gid: description: +optional type: integer @@ -476,7 +3101,6 @@ definitions: mtime: $ref: '#/definitions/v1alpha1.Timespec' description: +optional - type: object nlink: description: +optional type: integer @@ -590,7 +3214,6 @@ definitions: description: |- Delay defines the delay distribution. +optional - type: object duration: description: |- Duration represents the duration of the chaos action. @@ -606,7 +3229,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -661,15 +3283,12 @@ definitions: awsChaos: $ref: '#/definitions/v1alpha1.AWSChaosSpec' description: +optional - type: object azureChaos: $ref: '#/definitions/v1alpha1.AzureChaosSpec' description: +optional - type: object blockChaos: $ref: '#/definitions/v1alpha1.BlockChaosSpec' description: +optional - type: object concurrencyPolicy: description: |- +optional @@ -678,11 +3297,9 @@ definitions: dnsChaos: $ref: '#/definitions/v1alpha1.DNSChaosSpec' description: +optional - type: object gcpChaos: $ref: '#/definitions/v1alpha1.GCPChaosSpec' description: +optional - type: object historyLimit: description: |- +optional @@ -691,31 +3308,24 @@ definitions: httpChaos: $ref: '#/definitions/v1alpha1.HTTPChaosSpec' description: +optional - type: object ioChaos: $ref: '#/definitions/v1alpha1.IOChaosSpec' description: +optional - type: object jvmChaos: $ref: '#/definitions/v1alpha1.JVMChaosSpec' description: +optional - type: object kernelChaos: $ref: '#/definitions/v1alpha1.KernelChaosSpec' description: +optional - type: object networkChaos: $ref: '#/definitions/v1alpha1.NetworkChaosSpec' description: +optional - type: object physicalmachineChaos: $ref: '#/definitions/v1alpha1.PhysicalMachineChaosSpec' description: +optional - type: object podChaos: $ref: '#/definitions/v1alpha1.PodChaosSpec' description: +optional - type: object schedule: type: string startingDeadlineSeconds: @@ -727,11 +3337,9 @@ definitions: stressChaos: $ref: '#/definitions/v1alpha1.StressChaosSpec' description: +optional - type: object timeChaos: $ref: '#/definitions/v1alpha1.TimeChaosSpec' description: +optional - type: object type: description: 'TODO: use a custom type, as `TemplateType` contains other possible values' @@ -813,7 +3421,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -838,7 +3445,6 @@ definitions: reorder: $ref: '#/definitions/v1alpha1.ReorderSpec' description: +optional - type: object type: object v1alpha1.DiskFillSpec: properties: @@ -1033,7 +3639,6 @@ definitions: description: |- Patch is a rule to patch some contents in target. +optional - type: object path: description: |- Path is a rule to select target by uri path in http request. @@ -1047,7 +3652,6 @@ definitions: description: |- Replace is a rule to replace some contents in target. +optional - type: object request_headers: additionalProperties: type: string @@ -1068,7 +3672,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object target: description: |- Target is the object to be selected and injected. @@ -1100,10 +3703,9 @@ definitions: criteria: $ref: '#/definitions/v1alpha1.HTTPCriteria' description: Criteria defines how to determine the result of the status check. - type: object headers: + $ref: '#/definitions/http.Header' description: +optional - type: string method: description: |- +optional @@ -1127,7 +3729,6 @@ definitions: Attr defines the overrided attribution +ui:form:when=action=='attrOverride' +optional - type: object containerNames: description: |- ContainerNames indicates list of the name of affected container. @@ -1177,7 +3778,6 @@ definitions: Mistake defines what types of incorrectness are injected to IO operations +ui:form:when=action=='mistake' +optional - type: object mode: description: |- Mode defines the mode to run chaos action. @@ -1200,7 +3800,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -1303,7 +3902,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object sqlType: description: |- the match sql type @@ -1453,7 +4051,6 @@ definitions: failKernRequest: $ref: '#/definitions/v1alpha1.FailKernRequest' description: FailKernRequest defines the request of kernel injection - type: object mode: description: |- Mode defines the mode to run chaos action. @@ -1464,7 +4061,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -1572,21 +4168,18 @@ definitions: Bandwidth represents the detail about bandwidth control action +ui:form:when=action=='bandwidth' +optional - type: object corrupt: $ref: '#/definitions/v1alpha1.CorruptSpec' description: |- Corrupt represents the detail about corrupt action +ui:form:when=action=='corrupt' +optional - type: object delay: $ref: '#/definitions/v1alpha1.DelaySpec' description: |- Delay represents the detail about delay action +ui:form:when=action=='delay' +optional - type: object device: description: |- Device represents the network device to be affected. @@ -1605,7 +4198,6 @@ definitions: DuplicateSpec represents the detail about loss action +ui:form:when=action=='duplicate' +optional - type: object duration: description: Duration represents the duration of the chaos action type: string @@ -1622,7 +4214,6 @@ definitions: Loss represents the detail about loss action +ui:form:when=action=='loss' +optional - type: object mode: description: |- Mode defines the mode to run chaos action. @@ -1633,13 +4224,11 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object target: $ref: '#/definitions/v1alpha1.PodSelector' description: |- Target represents network target, this applies on netem and network partition action +optional - type: object targetDevice: description: |- TargetDevice represents the network device to be affected in target scope. @@ -1841,25 +4430,21 @@ definitions: description: |- +ui:form:when=action=='clock' +optional - type: object disk-fill: $ref: '#/definitions/v1alpha1.DiskFillSpec' description: |- +ui:form:when=action=='disk-fill' +optional - type: object disk-read-payload: $ref: '#/definitions/v1alpha1.DiskPayloadSpec' description: |- +ui:form:when=action=='disk-read-payload' +optional - type: object disk-write-payload: $ref: '#/definitions/v1alpha1.DiskPayloadSpec' description: |- +ui:form:when=action=='disk-write-payload' +optional - type: object duration: description: |- Duration represents the duration of the chaos action @@ -1870,37 +4455,31 @@ definitions: description: |- +ui:form:when=action=='jvm-exception' +optional - type: object jvm-gc: $ref: '#/definitions/v1alpha1.JVMGCSpec' description: |- +ui:form:when=action=='jvm-gc' +optional - type: object jvm-latency: $ref: '#/definitions/v1alpha1.JVMLatencySpec' description: |- +ui:form:when=action=='jvm-latency' +optional - type: object jvm-return: $ref: '#/definitions/v1alpha1.JVMReturnSpec' description: |- +ui:form:when=action=='jvm-return' +optional - type: object jvm-rule-data: $ref: '#/definitions/v1alpha1.JVMRuleDataSpec' description: |- +ui:form:when=action=='jvm-rule-data' +optional - type: object jvm-stress: $ref: '#/definitions/v1alpha1.JVMStressSpec' description: |- +ui:form:when=action=='jvm-stress' +optional - type: object mode: description: |- Mode defines the mode to run chaos action. @@ -1912,67 +4491,56 @@ definitions: description: |- +ui:form:when=action=='network-bandwidth' +optional - type: object network-corrupt: $ref: '#/definitions/v1alpha1.NetworkCorruptSpec' description: |- +ui:form:when=action=='network-corrupt' +optional - type: object network-delay: $ref: '#/definitions/v1alpha1.NetworkDelaySpec' description: |- +ui:form:when=action=='network-delay' +optional - type: object network-dns: $ref: '#/definitions/v1alpha1.NetworkDNSSpec' description: |- +ui:form:when=action=='network-dns' +optional - type: object network-duplicate: $ref: '#/definitions/v1alpha1.NetworkDuplicateSpec' description: |- +ui:form:when=action=='network-duplicate' +optional - type: object network-loss: $ref: '#/definitions/v1alpha1.NetworkLossSpec' description: |- +ui:form:when=action=='network-loss' +optional - type: object network-partition: $ref: '#/definitions/v1alpha1.NetworkPartitionSpec' description: |- +ui:form:when=action=='network-partition' +optional - type: object process: $ref: '#/definitions/v1alpha1.ProcessSpec' description: |- +ui:form:when=action=='process' +optional - type: object selector: $ref: '#/definitions/v1alpha1.PhysicalMachineSelectorSpec' description: |- Selector is used to select physical machines that are used to inject chaos action. +optional - type: object stress-cpu: $ref: '#/definitions/v1alpha1.StressCPUSpec' description: |- +ui:form:when=action=='stress-cpu' +optional - type: object stress-mem: $ref: '#/definitions/v1alpha1.StressMemorySpec' description: |- +ui:form:when=action=='stress-mem' +optional - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -2071,7 +4639,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -2088,7 +4655,6 @@ definitions: description: |- Body is a rule to patch message body of target. +optional - type: object headers: description: |- Headers is a rule to append http headers of target. @@ -2173,7 +4739,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -2277,28 +4842,238 @@ definitions: type: object v1alpha1.Schedule: properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + +optional + type: object + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + +optional + type: string + clusterName: + description: |- + The name of the cluster which the object belongs to. + This is used to distinguish resources with same name and namespace in different clusters. + This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + +optional + type: string + creationTimestamp: + description: |- + CreationTimestamp is a timestamp representing the server time when this object was + created. It is not guaranteed to be set in happens-before order across separate operations. + Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. + Read-only. + Null for lists. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +optional + type: string + deletionGracePeriodSeconds: + description: |- + Number of seconds allowed for this object to gracefully terminate before + it will be removed from the system. Only set when deletionTimestamp is also set. + May only be shortened. + Read-only. + +optional + type: integer + deletionTimestamp: + description: |- + DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + field is set by the server when a graceful deletion is requested by the user, and is not + directly settable by a client. The resource is expected to be deleted (no longer visible + from resource lists, and not reachable by name) after the time in this field, once the + finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. + Once the deletionTimestamp is set, this value may not be unset or be set further into the + future, although it may be shortened or the resource may be deleted prior to this time. + For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react + by sending a graceful termination signal to the containers in the pod. After that 30 seconds, + the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, + remove the pod from the API. In the presence of network partitions, this object may still + exist after this timestamp, until an administrator or automated process can determine the + resource is fully terminated. + If not set, graceful deletion of the object has not been requested. + + Populated by the system when a graceful deletion is requested. + Read-only. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +optional + type: string + finalizers: + description: |- + Must be empty before the object is deleted from the registry. Each entry + is an identifier for the responsible component that will remove the entry + from the list. If the deletionTimestamp of the object is non-nil, entries + in this list can only be removed. + Finalizers may be processed and removed in any order. Order is NOT enforced + because it introduces significant risk of stuck finalizers. + finalizers is a shared field, any actor with permission can reorder it. + If the finalizer list is processed in order, then this can lead to a situation + in which the component responsible for the first finalizer in the list is + waiting for a signal (field value, external system, or other) produced by a + component responsible for a finalizer later in the list, resulting in a deadlock. + Without enforced ordering finalizers are free to order amongst themselves and + are not vulnerable to ordering changes in the list. + +optional + +patchStrategy=merge + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique + name ONLY IF the Name field has not been provided. + If this field is used, the name returned to the client will be different + than the name passed. This value will also be combined with a unique suffix. + The provided value has the same validation rules as the Name field, + and may be truncated by the length of the suffix required to make the value + unique on the server. + + If this field is specified and the generated name exists, the server will + NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + ServerTimeout indicating a unique name could not be found in the time allotted, and the client + should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency + +optional + type: string + generation: + description: |- + A sequence number representing a specific generation of the desired state. + Populated by the system. Read-only. + +optional + type: integer + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + +optional + type: string + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + +optional + type: object + managedFields: + description: |- + ManagedFields maps workflow-id and version to the set of fields + that are managed by that workflow. This is mostly for internal + housekeeping, and users typically shouldn't need to set or + understand this field. A workflow can be the user's name, a + controller's name, or the name of a specific apply path like + "ci-cd". The set of fields is always in the version that the + workflow used when modifying the object. + + +optional + items: + $ref: '#/definitions/v1.ManagedFieldsEntry' + type: array + name: + description: |- + Name must be unique within a namespace. Is required when creating resources, although + some resources may allow a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence and configuration + definition. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/identifiers#names + +optional + type: string + namespace: + description: |- + Namespace defines the space within which each name must be unique. An empty namespace is + equivalent to the "default" namespace, but "default" is the canonical representation. + Not all objects are required to be scoped to a namespace - the value of this field for + those objects will be empty. + + Must be a DNS_LABEL. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces + +optional + type: string + ownerReferences: + description: |- + List of objects depended by this object. If ALL objects in the list have + been deleted, this object will be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, with the controller field set to true. + There cannot be more than one managing controller. + +optional + +patchMergeKey=uid + +patchStrategy=merge + items: + $ref: '#/definitions/v1.OwnerReference' + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can + be used by clients to determine when objects have changed. May be used for optimistic + concurrency, change detection, and the watch operation on a resource or set of resources. + Clients must treat these values as opaque and passed unmodified back to the server. + They may only be valid for a particular resource or set of resources. + + Populated by the system. + Read-only. + Value must be treated as opaque by clients and . + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + +optional + type: string + selfLink: + description: |- + SelfLink is a URL representing this object. + Populated by the system. + Read-only. + + DEPRECATED + Kubernetes will stop propagating this field in 1.20 release and the field is planned + to be removed in 1.21 release. + +optional + type: string spec: $ref: '#/definitions/v1alpha1.ScheduleSpec' - type: object status: $ref: '#/definitions/v1alpha1.ScheduleStatus' description: +optional - type: object + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by + the server on successful creation of a resource and is not allowed to change on PUT + operations. + + Populated by the system. + Read-only. + More info: http://kubernetes.io/docs/user-guide/identifiers#uids + +optional + type: string type: object v1alpha1.ScheduleSpec: properties: awsChaos: $ref: '#/definitions/v1alpha1.AWSChaosSpec' description: +optional - type: object azureChaos: $ref: '#/definitions/v1alpha1.AzureChaosSpec' description: +optional - type: object blockChaos: $ref: '#/definitions/v1alpha1.BlockChaosSpec' description: +optional - type: object concurrencyPolicy: description: |- +optional @@ -2308,11 +5083,9 @@ definitions: dnsChaos: $ref: '#/definitions/v1alpha1.DNSChaosSpec' description: +optional - type: object gcpChaos: $ref: '#/definitions/v1alpha1.GCPChaosSpec' description: +optional - type: object historyLimit: description: |- +optional @@ -2321,31 +5094,24 @@ definitions: httpChaos: $ref: '#/definitions/v1alpha1.HTTPChaosSpec' description: +optional - type: object ioChaos: $ref: '#/definitions/v1alpha1.IOChaosSpec' description: +optional - type: object jvmChaos: $ref: '#/definitions/v1alpha1.JVMChaosSpec' description: +optional - type: object kernelChaos: $ref: '#/definitions/v1alpha1.KernelChaosSpec' description: +optional - type: object networkChaos: $ref: '#/definitions/v1alpha1.NetworkChaosSpec' description: +optional - type: object physicalmachineChaos: $ref: '#/definitions/v1alpha1.PhysicalMachineChaosSpec' description: +optional - type: object podChaos: $ref: '#/definitions/v1alpha1.PodChaosSpec' description: +optional - type: object schedule: type: string startingDeadlineSeconds: @@ -2358,11 +5124,9 @@ definitions: stressChaos: $ref: '#/definitions/v1alpha1.StressChaosSpec' description: +optional - type: object timeChaos: $ref: '#/definitions/v1alpha1.TimeChaosSpec' description: +optional - type: object type: description: 'TODO: use a custom type, as `TemplateType` contains other possible values' @@ -2370,13 +5134,14 @@ definitions: workflow: $ref: '#/definitions/v1alpha1.WorkflowSpec' description: +optional - type: object type: object v1alpha1.ScheduleStatus: properties: active: description: +optional - type: string + items: + $ref: '#/definitions/v1.ObjectReference' + type: array time: description: |- +optional @@ -2407,7 +5172,6 @@ definitions: http: $ref: '#/definitions/v1alpha1.HTTPStatusCheck' description: +optional - type: object intervalSeconds: description: |- IntervalSeconds defines how often (in seconds) to perform @@ -2480,7 +5244,6 @@ definitions: http: $ref: '#/definitions/v1alpha1.HTTPStatusCheck' description: +optional - type: object intervalSeconds: description: |- IntervalSeconds defines how often (in seconds) to perform @@ -2569,7 +5332,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object stressngStressors: description: |- StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental @@ -2587,7 +5349,6 @@ definitions: You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified. +optional - type: object value: description: |- Value is required when the mode is set to `FixedMode` / `FixedPercentMode` / `RandomMaxPercentMode`. @@ -2617,25 +5378,25 @@ definitions: description: |- CPUStressor stresses CPU out +optional - type: object memory: $ref: '#/definitions/v1alpha1.MemoryStressor' description: |- MemoryStressor stresses virtual memory out +optional - type: object type: object v1alpha1.Task: properties: container: + $ref: '#/definitions/v1.Container' description: Container is the main container image to run in the pod - type: string volumes: description: |- Volumes is a list of volumes that can be mounted by containers in a template. +patchStrategy=merge +patchMergeKey=name - type: string + items: + $ref: '#/definitions/v1.Volume' + type: array type: object v1alpha1.Template: properties: @@ -2648,15 +5409,12 @@ definitions: awsChaos: $ref: '#/definitions/v1alpha1.AWSChaosSpec' description: +optional - type: object azureChaos: $ref: '#/definitions/v1alpha1.AzureChaosSpec' description: +optional - type: object blockChaos: $ref: '#/definitions/v1alpha1.BlockChaosSpec' description: +optional - type: object children: description: |- Children describes the children steps of serial or parallel node. Only used when Type is TypeSerial or TypeParallel. @@ -2677,69 +5435,55 @@ definitions: dnsChaos: $ref: '#/definitions/v1alpha1.DNSChaosSpec' description: +optional - type: object gcpChaos: $ref: '#/definitions/v1alpha1.GCPChaosSpec' description: +optional - type: object httpChaos: $ref: '#/definitions/v1alpha1.HTTPChaosSpec' description: +optional - type: object ioChaos: $ref: '#/definitions/v1alpha1.IOChaosSpec' description: +optional - type: object jvmChaos: $ref: '#/definitions/v1alpha1.JVMChaosSpec' description: +optional - type: object kernelChaos: $ref: '#/definitions/v1alpha1.KernelChaosSpec' description: +optional - type: object name: type: string networkChaos: $ref: '#/definitions/v1alpha1.NetworkChaosSpec' description: +optional - type: object physicalmachineChaos: $ref: '#/definitions/v1alpha1.PhysicalMachineChaosSpec' description: +optional - type: object podChaos: $ref: '#/definitions/v1alpha1.PodChaosSpec' description: +optional - type: object schedule: $ref: '#/definitions/v1alpha1.ChaosOnlyScheduleSpec' description: |- Schedule describe the Schedule(describing scheduled chaos) to be injected with chaos nodes. Only used when Type is TypeSchedule. +optional - type: object statusCheck: $ref: '#/definitions/v1alpha1.StatusCheckSpec' description: |- StatusCheck describe the behavior of StatusCheck. Only used when Type is TypeStatusCheck. +optional - type: object stressChaos: $ref: '#/definitions/v1alpha1.StressChaosSpec' description: +optional - type: object task: $ref: '#/definitions/v1alpha1.Task' description: |- Task describes the behavior of the custom task. Only used when Type is TypeTask. +optional - type: object templateType: type: string timeChaos: $ref: '#/definitions/v1alpha1.TimeChaosSpec' description: +optional - type: object type: object v1alpha1.TimeChaosSpec: properties: @@ -2774,7 +5518,6 @@ definitions: $ref: '#/definitions/v1alpha1.PodSelectorSpec' description: Selector is used to select pods that are used to inject chaos action. - type: object timeOffset: description: |- TimeOffset defines the delta time of injected program. It's a possibly signed sequence of decimal numbers, such as @@ -2798,16 +5541,229 @@ definitions: type: object v1alpha1.Workflow: properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: http://kubernetes.io/docs/user-guide/annotations + +optional + type: object + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + +optional + type: string + clusterName: + description: |- + The name of the cluster which the object belongs to. + This is used to distinguish resources with same name and namespace in different clusters. + This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + +optional + type: string + creationTimestamp: + description: |- + CreationTimestamp is a timestamp representing the server time when this object was + created. It is not guaranteed to be set in happens-before order across separate operations. + Clients may not set this value. It is represented in RFC3339 form and is in UTC. + + Populated by the system. + Read-only. + Null for lists. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +optional + type: string + deletionGracePeriodSeconds: + description: |- + Number of seconds allowed for this object to gracefully terminate before + it will be removed from the system. Only set when deletionTimestamp is also set. + May only be shortened. + Read-only. + +optional + type: integer + deletionTimestamp: + description: |- + DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This + field is set by the server when a graceful deletion is requested by the user, and is not + directly settable by a client. The resource is expected to be deleted (no longer visible + from resource lists, and not reachable by name) after the time in this field, once the + finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. + Once the deletionTimestamp is set, this value may not be unset or be set further into the + future, although it may be shortened or the resource may be deleted prior to this time. + For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react + by sending a graceful termination signal to the containers in the pod. After that 30 seconds, + the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, + remove the pod from the API. In the presence of network partitions, this object may still + exist after this timestamp, until an administrator or automated process can determine the + resource is fully terminated. + If not set, graceful deletion of the object has not been requested. + + Populated by the system when a graceful deletion is requested. + Read-only. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + +optional + type: string + finalizers: + description: |- + Must be empty before the object is deleted from the registry. Each entry + is an identifier for the responsible component that will remove the entry + from the list. If the deletionTimestamp of the object is non-nil, entries + in this list can only be removed. + Finalizers may be processed and removed in any order. Order is NOT enforced + because it introduces significant risk of stuck finalizers. + finalizers is a shared field, any actor with permission can reorder it. + If the finalizer list is processed in order, then this can lead to a situation + in which the component responsible for the first finalizer in the list is + waiting for a signal (field value, external system, or other) produced by a + component responsible for a finalizer later in the list, resulting in a deadlock. + Without enforced ordering finalizers are free to order amongst themselves and + are not vulnerable to ordering changes in the list. + +optional + +patchStrategy=merge + items: + type: string + type: array + generateName: + description: |- + GenerateName is an optional prefix, used by the server, to generate a unique + name ONLY IF the Name field has not been provided. + If this field is used, the name returned to the client will be different + than the name passed. This value will also be combined with a unique suffix. + The provided value has the same validation rules as the Name field, + and may be truncated by the length of the suffix required to make the value + unique on the server. + + If this field is specified and the generated name exists, the server will + NOT return a 409 - instead, it will either return 201 Created or 500 with Reason + ServerTimeout indicating a unique name could not be found in the time allotted, and the client + should retry (optionally after the time indicated in the Retry-After header). + + Applied only if Name is not specified. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency + +optional + type: string + generation: + description: |- + A sequence number representing a specific generation of the desired state. + Populated by the system. Read-only. + +optional + type: integer + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + +optional + type: string + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: http://kubernetes.io/docs/user-guide/labels + +optional + type: object + managedFields: + description: |- + ManagedFields maps workflow-id and version to the set of fields + that are managed by that workflow. This is mostly for internal + housekeeping, and users typically shouldn't need to set or + understand this field. A workflow can be the user's name, a + controller's name, or the name of a specific apply path like + "ci-cd". The set of fields is always in the version that the + workflow used when modifying the object. + + +optional + items: + $ref: '#/definitions/v1.ManagedFieldsEntry' + type: array + name: + description: |- + Name must be unique within a namespace. Is required when creating resources, although + some resources may allow a client to request the generation of an appropriate name + automatically. Name is primarily intended for creation idempotence and configuration + definition. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/identifiers#names + +optional + type: string + namespace: + description: |- + Namespace defines the space within which each name must be unique. An empty namespace is + equivalent to the "default" namespace, but "default" is the canonical representation. + Not all objects are required to be scoped to a namespace - the value of this field for + those objects will be empty. + + Must be a DNS_LABEL. + Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces + +optional + type: string + ownerReferences: + description: |- + List of objects depended by this object. If ALL objects in the list have + been deleted, this object will be garbage collected. If this object is managed by a controller, + then an entry in this list will point to this controller, with the controller field set to true. + There cannot be more than one managing controller. + +optional + +patchMergeKey=uid + +patchStrategy=merge + items: + $ref: '#/definitions/v1.OwnerReference' + type: array + resourceVersion: + description: |- + An opaque value that represents the internal version of this object that can + be used by clients to determine when objects have changed. May be used for optimistic + concurrency, change detection, and the watch operation on a resource or set of resources. + Clients must treat these values as opaque and passed unmodified back to the server. + They may only be valid for a particular resource or set of resources. + + Populated by the system. + Read-only. + Value must be treated as opaque by clients and . + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + +optional + type: string + selfLink: + description: |- + SelfLink is a URL representing this object. + Populated by the system. + Read-only. + + DEPRECATED + Kubernetes will stop propagating this field in 1.20 release and the field is planned + to be removed in 1.21 release. + +optional + type: string spec: $ref: '#/definitions/v1alpha1.WorkflowSpec' description: Spec defines the behavior of a workflow - type: object status: $ref: '#/definitions/v1alpha1.WorkflowStatus' description: |- +optional Most recently observed status of the workflow - type: object + uid: + description: |- + UID is the unique in time and space value for this object. It is typically generated by + the server on successful creation of a resource and is not allowed to change on PUT + operations. + + Populated by the system. + Read-only. + More info: http://kubernetes.io/docs/user-guide/identifiers#uids + +optional + type: string type: object v1alpha1.WorkflowCondition: properties: @@ -2850,11 +5806,6 @@ definitions: description: +optional type: string type: object - workflow.StatusResponse: - properties: - status: - type: string - type: object info: contact: name: GitHub Issues @@ -2865,7 +5816,7 @@ info: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html title: Chaos Mesh Dashboard API - version: "2.0" + version: "2.2" paths: /archives: delete: @@ -2919,7 +5870,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/archive.Archive' + $ref: '#/definitions/types.Archive' type: array "500": description: Internal Server Error @@ -2965,7 +5916,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/archive.Detail' + $ref: '#/definitions/types.ArchiveDetail' "404": description: Not Found schema: @@ -3018,7 +5969,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/archive.Archive' + $ref: '#/definitions/types.Archive' type: array "500": description: Internal Server Error @@ -3064,7 +6015,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/archive.Detail' + $ref: '#/definitions/types.ArchiveDetail' "500": description: Internal Server Error schema: @@ -3113,7 +6064,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/archive.Archive' + $ref: '#/definitions/types.Archive' type: array "500": description: Internal Server Error @@ -3159,7 +6110,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/archive.Detail' + $ref: '#/definitions/types.ArchiveDetail' "500": description: Internal Server Error schema: @@ -3183,7 +6134,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/common.MapSlice' + $ref: '#/definitions/utils.MapStringSliceResponse' "500": description: Internal Server Error schema: @@ -3265,7 +6216,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/common.MapSlice' + $ref: '#/definitions/utils.MapStringSliceResponse' "500": description: Internal Server Error schema: @@ -3310,7 +6261,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/common.MapSlice' + $ref: '#/definitions/utils.MapStringSliceResponse' "500": description: Internal Server Error schema: @@ -3335,7 +6286,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/common.MapSlice' + $ref: '#/definitions/utils.MapStringSliceResponse' "500": description: Internal Server Error schema: @@ -3361,7 +6312,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/common.PhysicalMachine' + $ref: '#/definitions/types.PhysicalMachine' type: array "500": description: Internal Server Error @@ -3387,7 +6338,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/common.Pod' + $ref: '#/definitions/types.Pod' type: array "500": description: Internal Server Error @@ -3399,13 +6350,24 @@ paths: /common/rbac-config: get: description: Get the rbac config according to the user's choice. + parameters: + - description: The namespace of RBAC + in: query + name: namespace + type: string + - description: The role of RBAC + in: query + name: role + type: string produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/common.MapSlice' + additionalProperties: + type: string + type: object "500": description: Internal Server Error schema: @@ -3451,7 +6413,7 @@ paths: - description: The max length of events list in: query name: limit - type: string + type: number produces: - application/json responses: @@ -3514,7 +6476,7 @@ paths: - description: The max length of events list in: query name: limit - type: string + type: number produces: - application/json responses: @@ -3613,7 +6575,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/experiment.Experiment' + $ref: '#/definitions/types.Experiment' type: array "400": description: Bad Request @@ -3710,7 +6672,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/experiment.Detail' + $ref: '#/definitions/types.ExperimentDetail' "400": description: Bad Request schema: @@ -3863,7 +6825,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/schedule.Schedule' + $ref: '#/definitions/types.Schedule' type: array "400": description: Bad Request @@ -3951,7 +6913,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/schedule.Detail' + $ref: '#/definitions/types.ScheduleDetail' "400": description: Bad Request schema: @@ -4048,7 +7010,7 @@ paths: description: OK schema: items: - $ref: '#/definitions/template.StatusCheckTemplateBase' + $ref: '#/definitions/types.StatusCheckTemplateBase' type: array "400": description: Bad Request @@ -4071,14 +7033,14 @@ paths: name: statuscheck required: true schema: - $ref: '#/definitions/template.StatusCheckTemplate' + $ref: '#/definitions/types.StatusCheckTemplate' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/template.StatusCheckTemplate' + $ref: '#/definitions/types.StatusCheckTemplate' "400": description: Bad Request schema: @@ -4145,7 +7107,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/template.StatusCheckTemplateDetail' + $ref: '#/definitions/types.StatusCheckTemplateDetail' "400": description: Bad Request schema: @@ -4169,14 +7131,14 @@ paths: name: request required: true schema: - $ref: '#/definitions/template.StatusCheckTemplate' + $ref: '#/definitions/types.StatusCheckTemplate' produces: - application/json responses: "200": description: OK schema: - $ref: '#/definitions/template.StatusCheckTemplate' + $ref: '#/definitions/types.StatusCheckTemplate' "400": description: Bad Request schema: @@ -4263,7 +7225,7 @@ paths: "200": description: OK schema: - $ref: '#/definitions/workflow.StatusResponse' + $ref: '#/definitions/utils.Response' "400": description: Bad Request schema: diff --git a/ui/app/package.json b/ui/app/package.json index dedc26fa96..2000d684ec 100644 --- a/ui/app/package.json +++ b/ui/app/package.json @@ -16,6 +16,7 @@ "@reactour/tour": "^2.3.0", "@reduxjs/toolkit": "^1.7.1", "ace-builds": "^1.4.12", + "auto-bind": "^5.0.1", "axios": "^0.24.0", "clsx": "^1.1.1", "copy-text-to-clipboard": "^3.0.1", @@ -99,6 +100,9 @@ "source-map-explorer": "^2.5.2" }, "jest": { - "resetMocks": false + "resetMocks": false, + "transformIgnorePatterns": [ + "node_modules/(?!auto-bind)" + ] } } diff --git a/ui/app/src/@types/mui.d.ts b/ui/app/src/@types/mui.d.ts index a3087b7add..02f46383d3 100644 --- a/ui/app/src/@types/mui.d.ts +++ b/ui/app/src/@types/mui.d.ts @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { Theme } from '@mui/material/styles' // TODO: remove this declaration when @mui/styles isn't used anymore. See: https://mui.com/guides/migration-v4/. diff --git a/ui/app/src/api/archives.ts b/ui/app/src/api/archives.ts deleted file mode 100644 index 98fb379ebc..0000000000 --- a/ui/app/src/api/archives.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ -import { Archive } from './archives.type' -import http from './http' - -export const archives = (namespace = null, name = null, kind = null) => - http.get('/archives', { - params: { - namespace, - name, - kind, - }, - }) - -export const single = (uuid: uuid) => http.get(`/archives/${uuid}`) - -export const del = (uuid: uuid) => http.delete(`/archives/${uuid}`) -export const delMulti = (uuids: uuid[]) => http.delete(`/archives?uids=${uuids.join(',')}`) diff --git a/ui/app/src/api/archives.type.ts b/ui/app/src/api/archives.type.ts deleted file mode 100644 index ca3cf84417..0000000000 --- a/ui/app/src/api/archives.type.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ -import { Experiment } from './experiments.type' - -type Common = Omit - -export type Archive = { is: 'archive' } & Common - -export interface ArchiveSingle extends Common { - kube_object: any -} diff --git a/ui/app/src/api/auth.ts b/ui/app/src/api/auth.ts index 2c2e42ce7d..41ffbe9bc3 100644 --- a/ui/app/src/api/auth.ts +++ b/ui/app/src/api/auth.ts @@ -14,7 +14,8 @@ * limitations under the License. * */ -import http from 'api/http' + +import http from './http' let tokenInterceptorId: number diff --git a/ui/app/src/api/common.ts b/ui/app/src/api/common.ts deleted file mode 100644 index 25dfc153dc..0000000000 --- a/ui/app/src/api/common.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ -import { Config, RBACConfigParams } from './common.type' - -import { Scope } from 'components/NewExperiment/types' -import http from './http' - -export const config = () => http.get('/common/config') - -export const rbacConfig = ({ namespace, role }: RBACConfigParams) => - http.get('/common/rbac-config', { - params: { - namespace, - role, - }, - }) - -export const chaosAvailableNamespaces = () => http.get('/common/chaos-available-namespaces') - -type stringStringArrayMap = Record - -export const labels = (podNamespaceList: string[]) => - http.get('/common/labels', { - params: { - podNamespaceList: podNamespaceList.join(','), - }, - }) - -export const annotations = (podNamespaceList: string[]) => - http.get('/common/annotations', { - params: { - podNamespaceList: podNamespaceList.join(','), - }, - }) - -export const pods = (data: Partial) => http.post('/common/pods', data) diff --git a/ui/app/src/api/common.type.ts b/ui/app/src/api/common.type.ts deleted file mode 100644 index 525d6aaf8d..0000000000 --- a/ui/app/src/api/common.type.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ - -export interface Config { - security_mode: boolean - dns_server_create: boolean - gcp_security_mode: boolean - version: string -} - -export interface RBACConfigParams { - namespace: string - role: 'manager' | 'viewer' -} diff --git a/ui/app/src/api/events.ts b/ui/app/src/api/events.ts deleted file mode 100644 index ba910a6403..0000000000 --- a/ui/app/src/api/events.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ -import { Event, EventsParams } from './events.type' - -import http from './http' - -export const events = (params?: EventsParams) => - http.get('/events', { - params, - }) - -export const get = (id: string) => http.get(`/events/${id}`) - -export const cascadeFetchEventsForWorkflow = (id: string, params?: EventsParams) => - http.get(`/events/workflow/${id}`, { - params, - }) diff --git a/ui/app/src/api/events.type.ts b/ui/app/src/api/events.type.ts deleted file mode 100644 index a8aba60561..0000000000 --- a/ui/app/src/api/events.type.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ -import { ExperimentKind } from '../components/NewExperiment/types' - -export interface EventsParams { - object_id?: uuid - namespace?: string - limit?: number -} - -export interface Event { - is: 'event' - id: number - object_id: uuid - namespace: string - name: string - kind: ExperimentKind | 'Schedule' - type: 'Normal' | 'Warning' - reason: string - created_at: string - message: string -} diff --git a/ui/app/src/api/experiments.ts b/ui/app/src/api/experiments.ts deleted file mode 100644 index 0c6ab79a9c..0000000000 --- a/ui/app/src/api/experiments.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ - -import { Experiment as ExperimentResponse, ExperimentSingle, StatusOfExperiments } from './experiments.type' - -import { Experiment } from 'components/NewExperiment/types' -import http from './http' - -export const state = (namespace = null) => - http.get('/experiments/state', { - params: { - namespace, - }, - }) - -export const newExperiment = (data: Experiment) => http.post('/experiments', data) - -export const experiments = (namespace = null, name = null, kind = null) => - http.get('/experiments', { - params: { - namespace, - name, - kind, - }, - }) - -export const single = (uuid: uuid) => http.get(`/experiments/${uuid}`) - -export const del = (uuid: uuid) => http.delete(`/experiments/${uuid}`) -export const delMulti = (uuids: uuid[]) => http.delete(`/experiments?uids=${uuids.join(',')}`) - -export const pause = (uuid: uuid) => http.put(`/experiments/pause/${uuid}`) -export const start = (uuid: uuid) => http.put(`/experiments/start/${uuid}`) diff --git a/ui/app/src/api/experiments.type.ts b/ui/app/src/api/experiments.type.ts deleted file mode 100644 index e7739561a8..0000000000 --- a/ui/app/src/api/experiments.type.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ -import { ExperimentKind } from 'components/NewExperiment/types' - -export interface StatusOfExperiments { - injecting: number - running: number - finished: number - paused: number - deleting: number -} - -export interface Experiment { - is: 'experiment' - uid: uuid - kind: ExperimentKind - namespace: string - name: string - created_at: string - status: 'injecting' | 'running' | 'finished' | 'paused' | 'deleting' -} - -export interface ExperimentSingle extends Experiment { - failed_message: string - kube_object: any -} diff --git a/ui/app/src/api/http.ts b/ui/app/src/api/http.ts index 86644b4651..9738682c84 100644 --- a/ui/app/src/api/http.ts +++ b/ui/app/src/api/http.ts @@ -14,6 +14,7 @@ * limitations under the License. * */ + import axios, { AxiosError } from 'axios' import { setAlert } from 'slices/globalStatus' @@ -26,9 +27,7 @@ interface ErrorData { full_text: string } -const http = axios.create({ - baseURL: '/api', -}) +const http = axios.create() http.interceptors.response.use(undefined, (error: AxiosError) => { const data = error.response?.data diff --git a/ui/app/src/api/index.ts b/ui/app/src/api/index.ts index 56e0f8e7e4..2b39e659c5 100644 --- a/ui/app/src/api/index.ts +++ b/ui/app/src/api/index.ts @@ -14,13 +14,68 @@ * limitations under the License. * */ -import * as archives from './archives' +import autoBind from 'auto-bind' +import { ArchivesApi, CommonApi, EventsApi, ExperimentsApi, SchedulesApi, WorkflowsApi } from 'openapi' + import * as auth from './auth' -import * as common from './common' -import * as events from './events' -import * as experiments from './experiments' -import * as schedules from './schedules' -import * as workflows from './workflows' +import http from './http' + +/** + * Due to we use OpenAPI generated as our API, it is important to make sure that `this` always points to + * the original instance object during the API call. + * + * So we use `autoBind` to help us finish the job automatically. Please read the following code for more details. + * + */ + +class CommonApiBind extends CommonApi { + constructor(...args: any) { + super(...args) + autoBind(this) + } +} + +class ArchivesApiBind extends ArchivesApi { + constructor(...args: any) { + super(...args) + autoBind(this) + } +} + +class ExperimentsApiBind extends ExperimentsApi { + constructor(...args: any) { + super(...args) + autoBind(this) + } +} + +class SchedulesApiBind extends SchedulesApi { + constructor(...args: any) { + super(...args) + autoBind(this) + } +} + +class WorkflowsApiBind extends WorkflowsApi { + constructor(...args: any) { + super(...args) + autoBind(this) + } +} + +class EventsApiBind extends EventsApi { + constructor(...args: any) { + super(...args) + autoBind(this) + } +} + +const common = new CommonApiBind(undefined, undefined, http) +const archives = new ArchivesApiBind(undefined, undefined, http) +const experiments = new ExperimentsApiBind(undefined, undefined, http) +const schedules = new SchedulesApiBind(undefined, undefined, http) +const workflows = new WorkflowsApiBind(undefined, undefined, http) +const events = new EventsApiBind(undefined, undefined, http) const api = { auth, diff --git a/ui/app/src/api/schedules.ts b/ui/app/src/api/schedules.ts deleted file mode 100644 index 6ee4351fe6..0000000000 --- a/ui/app/src/api/schedules.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ - -import { Schedule, ScheduleParams, ScheduleSingle } from './schedules.type' - -import { Archive } from './archives.type' -import { Experiment } from 'components/NewExperiment/types' -import http from './http' - -export const newSchedule = (data: Experiment) => http.post('/schedules', data) - -export const schedules = (params?: ScheduleParams) => - http.get('/schedules', { - params, - }) - -export const single = (uuid: uuid) => http.get(`/schedules/${uuid}`) - -export const del = (uuid: uuid) => http.delete(`/schedules/${uuid}`) -export const delMulti = (uuids: uuid[]) => http.delete(`/schedules?uids=${uuids.join(',')}`) - -export const pause = (uuid: uuid) => http.put(`/schedules/pause/${uuid}`) -export const start = (uuid: uuid) => http.put(`/schedules/start/${uuid}`) - -export const archives = (namespace = null, name = null, kind = null) => - http.get('/archives/schedules', { - params: { - namespace, - name, - kind, - }, - }) - -export const singleArchive = (uuid: uuid) => http.get(`archives/schedules/${uuid}`) - -export const delArchive = (uuid: uuid) => http.delete(`/archives/schedules/${uuid}`) -export const delArchives = (uuids: uuid[]) => http.delete(`/archives/schedules?uids=${uuids.join(',')}`) diff --git a/ui/app/src/api/schedules.type.ts b/ui/app/src/api/schedules.type.ts deleted file mode 100644 index 166f5c6448..0000000000 --- a/ui/app/src/api/schedules.type.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2021 Chaos Mesh 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. - * - */ -import { Experiment } from './experiments.type' - -export interface ScheduleParams { - namespace?: string -} - -export type Schedule = { is: 'schedule' } & Omit - -export interface ScheduleSingle extends Schedule { - experiment_uids: uuid[] - kube_object: any -} diff --git a/ui/app/src/api/workflows.ts b/ui/app/src/api/workflows.ts index 83342a19d4..eadfcd7a02 100644 --- a/ui/app/src/api/workflows.ts +++ b/ui/app/src/api/workflows.ts @@ -14,9 +14,8 @@ * limitations under the License. * */ -import { RequestForm, Workflow, WorkflowParams, WorkflowSingle } from './workflows.type' -import { Archive } from './archives.type' +import { RequestForm } from './workflows.type' import { TemplateCustom } from 'slices/workflows' import http from './http' @@ -29,31 +28,5 @@ export interface APITemplate { task?: TemplateCustom } -export const newWorkflow = (data: any) => http.post('/workflows', data) - -export const workflows = (params?: WorkflowParams) => - http.get('/workflows', { - params, - }) - -export const single = (uuid: uuid) => http.get(`/workflows/${uuid}`) - -export const update = (uuid: uuid, data: WorkflowSingle['kube_object']) => http.put(`/workflows/${uuid}`, data) - -export const del = (uuid: uuid) => http.delete(`/workflows/${uuid}`) - -export const archives = (namespace = null, name = null) => - http.get('/archives/workflows', { - params: { - namespace, - name, - }, - }) - -export const singleArchive = (uuid: uuid) => http.get(`archives/workflows/${uuid}`) - -export const delArchive = (uuid: uuid) => http.delete(`/archives/workflows/${uuid}`) -export const delArchives = (uuids: uuid[]) => http.delete(`/archives/workflows?uids=${uuids.join(',')}`) - export const renderHTTPTask = (form: RequestForm) => http.post('/workflows/render-task/http', form) export const parseHTTPTask = (t: APITemplate) => http.post('/workflows/parse-task/http', t) diff --git a/ui/app/src/components/AutoForm/data.ts b/ui/app/src/components/AutoForm/data.ts index 1c7eb8b84f..a598d68dc3 100644 --- a/ui/app/src/components/AutoForm/data.ts +++ b/ui/app/src/components/AutoForm/data.ts @@ -14,7 +14,6 @@ * limitations under the License. * */ - import _ from 'lodash' export const podPhases = ['Pending', 'Running', 'Succeeded', 'Failed', 'Unknown'] diff --git a/ui/app/src/components/DataTable/index.tsx b/ui/app/src/components/DataTable/index.tsx index efb4185ed8..8824fb9933 100644 --- a/ui/app/src/components/DataTable/index.tsx +++ b/ui/app/src/components/DataTable/index.tsx @@ -14,11 +14,9 @@ * limitations under the License. * */ - +import { Typography } from '@mui/material' import type { DataGridProps, GridRenderCellParams } from '@mui/x-data-grid' - import { DataGrid } from '@mui/x-data-grid' -import { Typography } from '@mui/material' export default function DataTable({ columns, sx, ...rest }: DataGridProps) { return ( diff --git a/ui/app/src/components/EventsChart/index.tsx b/ui/app/src/components/EventsChart/index.tsx index 1f617ff286..93fe6d31f2 100644 --- a/ui/app/src/components/EventsChart/index.tsx +++ b/ui/app/src/components/EventsChart/index.tsx @@ -14,17 +14,18 @@ * limitations under the License. * */ + import { Box, BoxProps } from '@mui/material' import { useEffect, useRef } from 'react' -import { Event } from 'api/events.type' +import { CoreEvent } from 'openapi' import NotFound from 'components/NotFound' import genEventsChart from 'lib/d3/eventsChart' import i18n from 'components/T' import { useStoreSelector } from 'store' interface EventsChartProps extends BoxProps { - events: Event[] + events: CoreEvent[] } const EventsChart: React.FC = ({ events, ...rest }) => { diff --git a/ui/app/src/components/EventsTable/index.tsx b/ui/app/src/components/EventsTable/index.tsx index 33de7894ca..f29a368292 100644 --- a/ui/app/src/components/EventsTable/index.tsx +++ b/ui/app/src/components/EventsTable/index.tsx @@ -14,7 +14,10 @@ * limitations under the License. * */ - +import FirstPageIcon from '@mui/icons-material/FirstPage' +import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft' +import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight' +import LastPageIcon from '@mui/icons-material/LastPage' import { Box, IconButton, @@ -28,18 +31,16 @@ import { TableRow, TableSortLabel, } from '@mui/material' -import { comparator, format } from 'lib/luxon' +import _ from 'lodash' +import { CoreEvent as Event } from 'openapi' +import { useState } from 'react' +import { useIntl } from 'react-intl' -import { Event } from 'api/events.type' -import FirstPageIcon from '@mui/icons-material/FirstPage' -import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft' -import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight' -import LastPageIcon from '@mui/icons-material/LastPage' import Paper from '@ui/mui-extends/esm/Paper' -import _ from 'lodash' + import i18n from 'components/T' -import { useIntl } from 'react-intl' -import { useState } from 'react' + +import { comparator, format } from 'lib/luxon' function descendingComparator>(a: T, b: T, orderBy: string) { if (['StartTime', 'EndTime'].includes(orderBy)) { @@ -131,7 +132,7 @@ const Row: React.FC = ({ event: e }) => ( {e.namespace} {e.name} {e.kind} - {format(e.created_at)} + {format(e.created_at!)} {e.message} ) diff --git a/ui/app/src/components/EventsTimeline/index.tsx b/ui/app/src/components/EventsTimeline/index.tsx index 0cc8276ce7..1622a79004 100644 --- a/ui/app/src/components/EventsTimeline/index.tsx +++ b/ui/app/src/components/EventsTimeline/index.tsx @@ -14,10 +14,11 @@ * limitations under the License. * */ + import { Box, Typography } from '@mui/material' import DateTime, { format } from 'lib/luxon' -import { Event } from 'api/events.type' +import { CoreEvent } from 'openapi' import NotFound from 'components/NotFound' import Timeline from '@mui/lab/Timeline' import TimelineConnector from '@mui/lab/TimelineConnector' @@ -31,7 +32,7 @@ import { iconByKind } from 'lib/byKind' import { useStoreSelector } from 'store' interface EventsTimelineProps { - events: Event[] + events: CoreEvent[] } const EventsTimeline: React.FC = ({ events }) => { @@ -44,7 +45,7 @@ const EventsTimeline: React.FC = ({ events }) => { - {iconByKind(e.kind, 'small')} + {iconByKind(e.kind as any, 'small')} @@ -54,8 +55,8 @@ const EventsTimeline: React.FC = ({ events }) => { {e.message} - - {DateTime.fromISO(e.created_at, { + + {DateTime.fromISO(e.created_at!, { locale: lang, }).toRelative()} diff --git a/ui/app/src/components/FormField/LabelField.tsx b/ui/app/src/components/FormField/LabelField.tsx index 9bd89c323c..d91e93f065 100644 --- a/ui/app/src/components/FormField/LabelField.tsx +++ b/ui/app/src/components/FormField/LabelField.tsx @@ -14,7 +14,6 @@ * limitations under the License. * */ - import AutocompleteField, { AutocompleteFieldProps } from './AutocompleteField' const LabelField: React.FC> = (props) => { diff --git a/ui/app/src/components/FormField/SelectField.tsx b/ui/app/src/components/FormField/SelectField.tsx index 6dcf31bb71..2e04e7b78a 100644 --- a/ui/app/src/components/FormField/SelectField.tsx +++ b/ui/app/src/components/FormField/SelectField.tsx @@ -14,8 +14,8 @@ * limitations under the License. * */ - import { Field, getIn, useFormikContext } from 'formik' + import MuiExtendsSelectField, { SelectFieldProps } from '@ui/mui-extends/esm/SelectField' function SelectField(props: SelectFieldProps) { diff --git a/ui/app/src/components/FormField/Submit.tsx b/ui/app/src/components/FormField/Submit.tsx index bb69150772..43edead621 100644 --- a/ui/app/src/components/FormField/Submit.tsx +++ b/ui/app/src/components/FormField/Submit.tsx @@ -14,10 +14,9 @@ * limitations under the License. * */ - import { Box, Button } from '@mui/material' - import type { ButtonProps } from '@mui/material' + import { T } from 'components/T' export default function Submit({ sx, ...rest }: ButtonProps) { diff --git a/ui/app/src/components/FormField/TextField.tsx b/ui/app/src/components/FormField/TextField.tsx index 44028aca06..9403d80075 100644 --- a/ui/app/src/components/FormField/TextField.tsx +++ b/ui/app/src/components/FormField/TextField.tsx @@ -14,8 +14,8 @@ * limitations under the License. * */ - import { FastField, Field, FieldValidator } from 'formik' + import MuiExtendsTextField, { TextFieldProps } from '@ui/mui-extends/esm/TextField' const TextField: React.FC = ({ diff --git a/ui/app/src/components/FormField/TextTextField.tsx b/ui/app/src/components/FormField/TextTextField.tsx index bf4bbc402e..f4d8ad40da 100644 --- a/ui/app/src/components/FormField/TextTextField.tsx +++ b/ui/app/src/components/FormField/TextTextField.tsx @@ -14,16 +14,16 @@ * limitations under the License. * */ - +import AddCircleTwoToneIcon from '@mui/icons-material/AddCircleTwoTone' +import RemoveCircleTwoToneIcon from '@mui/icons-material/RemoveCircleTwoTone' import { Box, Button, FormHelperText, IconButton, Typography } from '@mui/material' import { getIn, useFormikContext } from 'formik' +import _ from 'lodash' -import AddCircleTwoToneIcon from '@mui/icons-material/AddCircleTwoTone' -import LabelField from './LabelField' -import RemoveCircleTwoToneIcon from '@mui/icons-material/RemoveCircleTwoTone' import Space from '@ui/mui-extends/esm/Space' + +import LabelField from './LabelField' import TextField from './TextField' -import _ from 'lodash' interface TextTextFieldProps { name: string diff --git a/ui/app/src/components/FormikEffect/index.tsx b/ui/app/src/components/FormikEffect/index.tsx index 24049817ea..b79a595aa4 100644 --- a/ui/app/src/components/FormikEffect/index.tsx +++ b/ui/app/src/components/FormikEffect/index.tsx @@ -14,9 +14,8 @@ * limitations under the License. * */ - -import { useEffect } from 'react' import { useFormikContext } from 'formik' +import { useEffect } from 'react' interface FormikEffectProps { didUpdate?: (values: any) => void diff --git a/ui/app/src/components/MoreOptions/index.tsx b/ui/app/src/components/MoreOptions/index.tsx index 20d8fc2fcd..8bd4f1b7e3 100644 --- a/ui/app/src/components/MoreOptions/index.tsx +++ b/ui/app/src/components/MoreOptions/index.tsx @@ -14,14 +14,14 @@ * limitations under the License. * */ - -import { Box, Button } from '@mui/material' - import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown' import ArrowDropUpIcon from '@mui/icons-material/ArrowDropUp' +import { Box, Button } from '@mui/material' +import { useState } from 'react' + import Space from '@ui/mui-extends/esm/Space' + import { T } from 'components/T' -import { useState } from 'react' interface MoreOptionsProps { isOpen?: boolean diff --git a/ui/app/src/components/NewExperimentNext/LoadFrom/RadioLabel.tsx b/ui/app/src/components/NewExperimentNext/LoadFrom/RadioLabel.tsx index ac46540468..314c574f7f 100644 --- a/ui/app/src/components/NewExperimentNext/LoadFrom/RadioLabel.tsx +++ b/ui/app/src/components/NewExperimentNext/LoadFrom/RadioLabel.tsx @@ -14,9 +14,7 @@ * limitations under the License. * */ - import { Box, Typography } from '@mui/material' - import _ from 'lodash' const RadioLabel = (label: string, uuid?: string) => ( diff --git a/ui/app/src/components/NewExperimentNext/LoadFrom/index.test.tsx b/ui/app/src/components/NewExperimentNext/LoadFrom/index.test.tsx index 40a8d66e84..8634d16bd7 100644 --- a/ui/app/src/components/NewExperimentNext/LoadFrom/index.test.tsx +++ b/ui/app/src/components/NewExperimentNext/LoadFrom/index.test.tsx @@ -64,15 +64,15 @@ const scheduleArchives = [ jest.mock('api', () => { return { experiments: { - experiments: jest.fn().mockResolvedValue({ data: experiments }), - single: jest.fn().mockResolvedValue({ data: { kube_object: { spec: {} } } }), + experimentsGet: jest.fn().mockResolvedValue({ data: experiments }), + experimentsUidGet: jest.fn().mockResolvedValue({ data: { kube_object: { spec: {} } } }), }, schedules: { - schedules: jest.fn().mockResolvedValue({ data: schedules }), - archives: jest.fn().mockResolvedValue({ data: scheduleArchives }), + schedulesGet: jest.fn().mockResolvedValue({ data: schedules }), }, archives: { - archives: jest.fn().mockResolvedValue({ data: archives }), + archivesGet: jest.fn().mockResolvedValue({ data: archives }), + archivesSchedulesGet: jest.fn().mockResolvedValue({ data: scheduleArchives }), }, } }) diff --git a/ui/app/src/components/NewExperimentNext/LoadFrom/index.tsx b/ui/app/src/components/NewExperimentNext/LoadFrom/index.tsx index bda4b105e5..09f018358f 100644 --- a/ui/app/src/components/NewExperimentNext/LoadFrom/index.tsx +++ b/ui/app/src/components/NewExperimentNext/LoadFrom/index.tsx @@ -15,22 +15,25 @@ * */ import { Box, Divider, FormControlLabel, Radio, RadioGroup, Typography } from '@mui/material' -import { PreDefinedValue, getDB } from 'lib/idb' +import api from 'api' +import { TypesArchive, TypesExperiment, TypesSchedule } from 'openapi' import { useEffect, useState } from 'react' +import { useIntl } from 'react-intl' -import { Archive } from 'api/archives.type' -import { Experiment } from 'api/experiments.type' import Paper from '@ui/mui-extends/esm/Paper' -import RadioLabel from './RadioLabel' -import { Schedule } from 'api/schedules.type' import SkeletonN from '@ui/mui-extends/esm/SkeletonN' import Space from '@ui/mui-extends/esm/Space' -import api from 'api' -import i18n from 'components/T' -import { setAlert } from 'slices/globalStatus' -import { useIntl } from 'react-intl' + import { useStoreDispatch } from 'store' +import { setAlert } from 'slices/globalStatus' + +import i18n from 'components/T' + +import { PreDefinedValue, getDB } from 'lib/idb' + +import RadioLabel from './RadioLabel' + interface LoadFromProps { callback?: (data: any) => void inSchedule?: boolean @@ -44,9 +47,9 @@ const LoadFrom: React.FC = ({ callback, inSchedule, inWorkflow }) const [loading, setLoading] = useState(true) const [data, setData] = useState<{ - experiments: Experiment[] - archives: Archive[] - schedules: Schedule[] + experiments: TypesExperiment[] + archives: TypesArchive[] + schedules: TypesSchedule[] }>({ experiments: [], archives: [], @@ -56,12 +59,12 @@ const LoadFrom: React.FC = ({ callback, inSchedule, inWorkflow }) const [radio, setRadio] = useState('') useEffect(() => { - const fetchExperiments = api.experiments.experiments - const fetchArchives = inSchedule ? api.schedules.archives : api.archives.archives + const fetchExperiments = api.experiments.experimentsGet + const fetchArchives = inSchedule ? api.archives.archivesSchedulesGet : api.archives.archivesGet const promises: Promise[] = [fetchExperiments(), fetchArchives()] if (inSchedule) { - promises.push(api.schedules.schedules()) + promises.push(api.schedules.schedulesGet()) } const fetchAll = async () => { @@ -110,20 +113,20 @@ const LoadFrom: React.FC = ({ callback, inSchedule, inWorkflow }) let apiRequest switch (type) { case 's': - apiRequest = api.schedules.single + apiRequest = api.schedules.schedulesUidGet break case 'e': - apiRequest = api.experiments.single + apiRequest = api.experiments.experimentsUidGet break case 'a': - apiRequest = inSchedule ? api.schedules.singleArchive : api.archives.single + apiRequest = inSchedule ? api.archives.archivesSchedulesUidGet : api.archives.archivesUidGet break } setRadio(e.target.value) if (apiRequest) { - apiRequest(uuid) + apiRequest({ uid: uuid }) .then(({ data }) => { callback && callback(data.kube_object) @@ -155,7 +158,7 @@ const LoadFrom: React.FC = ({ callback, inSchedule, inWorkflow }) key={d.uid} value={`s+${d.uid}`} control={} - label={RadioLabel(d.name, d.uid)} + label={RadioLabel(d.name!, d.uid)} /> ))} @@ -182,7 +185,7 @@ const LoadFrom: React.FC = ({ callback, inSchedule, inWorkflow }) key={d.uid} value={`e+${d.uid}`} control={} - label={RadioLabel(d.name, d.uid)} + label={RadioLabel(d.name!, d.uid)} /> ))} @@ -207,7 +210,7 @@ const LoadFrom: React.FC = ({ callback, inSchedule, inWorkflow }) key={d.uid} value={`a+${d.uid}`} control={} - label={RadioLabel(d.name, d.uid)} + label={RadioLabel(d.name!, d.uid)} /> ))} diff --git a/ui/app/src/components/NewExperimentNext/Step3.tsx b/ui/app/src/components/NewExperimentNext/Step3.tsx index fc2a0486d2..1dce188b4d 100644 --- a/ui/app/src/components/NewExperimentNext/Step3.tsx +++ b/ui/app/src/components/NewExperimentNext/Step3.tsx @@ -67,7 +67,9 @@ const Step3: React.FC = ({ onSubmit, inSchedule }) => { onSubmit(parsedValues) } else { api.experiments - .newExperiment(parsedValues) + .experimentsPost({ + chaos: parsedValues, + }) .then(() => { dispatch( setAlert({ diff --git a/ui/app/src/components/NewExperimentNext/data/basic.ts b/ui/app/src/components/NewExperimentNext/data/basic.ts index 4667a7eaaf..790a8acc2d 100644 --- a/ui/app/src/components/NewExperimentNext/data/basic.ts +++ b/ui/app/src/components/NewExperimentNext/data/basic.ts @@ -14,10 +14,10 @@ * limitations under the License. * */ - import * as Yup from 'yup' import { Env } from 'slices/experiments' + import { schema as scheduleSchema } from 'components/Schedule/types' const data = { diff --git a/ui/app/src/components/NewExperimentNext/form/Kernel.tsx b/ui/app/src/components/NewExperimentNext/form/Kernel.tsx index 7630704855..bd14742c9f 100644 --- a/ui/app/src/components/NewExperimentNext/form/Kernel.tsx +++ b/ui/app/src/components/NewExperimentNext/form/Kernel.tsx @@ -14,18 +14,21 @@ * limitations under the License. * */ +import AddCircleIcon from '@mui/icons-material/AddCircle' +import RemoveCircleIcon from '@mui/icons-material/RemoveCircle' import { Box, IconButton, InputAdornment, MenuItem, Typography } from '@mui/material' import { Form, Formik } from 'formik' -import { LabelField, SelectField, Submit, TextField } from 'components/FormField' import { useEffect, useState } from 'react' -import AddCircleIcon from '@mui/icons-material/AddCircle' import Paper from '@ui/mui-extends/esm/Paper' -import RemoveCircleIcon from '@mui/icons-material/RemoveCircle' import Space from '@ui/mui-extends/esm/Space' -import typesData from '../data/types' + import { useStoreSelector } from 'store' +import { LabelField, SelectField, Submit, TextField } from 'components/FormField' + +import typesData from '../data/types' + interface KernelProps { onSubmit: (values: Record) => void } diff --git a/ui/app/src/components/NewExperimentNext/form/TargetGenerated.tsx b/ui/app/src/components/NewExperimentNext/form/TargetGenerated.tsx index 661be93270..d0d79d6db2 100644 --- a/ui/app/src/components/NewExperimentNext/form/TargetGenerated.tsx +++ b/ui/app/src/components/NewExperimentNext/form/TargetGenerated.tsx @@ -14,21 +14,25 @@ * limitations under the License. * */ -import { AutocompleteField, LabelField, SelectField, Submit, TextField } from 'components/FormField' -import { Env, clearNetworkTargetPods } from 'slices/experiments' +import { MenuItem } from '@mui/material' import { Form, Formik, FormikErrors, FormikTouched, getIn, setIn } from 'formik' -import { Kind, Spec } from '../data/types' import { useEffect, useState } from 'react' +import { ObjectSchema } from 'yup' + +import Space from '@ui/mui-extends/esm/Space' + import { useStoreDispatch, useStoreSelector } from 'store' -import { MenuItem } from '@mui/material' +import { Env, clearNetworkTargetPods } from 'slices/experiments' + +import { AutocompleteField, LabelField, SelectField, Submit, TextField } from 'components/FormField' import MoreOptions from 'components/MoreOptions' -import { ObjectSchema } from 'yup' import Scope from 'components/Scope' -import Space from '@ui/mui-extends/esm/Space' -import basicData from '../data/basic' import i18n from 'components/T' +import basicData from '../data/basic' +import { Kind, Spec } from '../data/types' + interface TargetGeneratedProps { env: Env kind?: Kind | '' diff --git a/ui/app/src/components/NewWorkflow/index.tsx b/ui/app/src/components/NewWorkflow/index.tsx index 5a7bf8a3f5..c72f5285a0 100644 --- a/ui/app/src/components/NewWorkflow/index.tsx +++ b/ui/app/src/components/NewWorkflow/index.tsx @@ -14,7 +14,11 @@ * limitations under the License. * */ - +import loadable from '@loadable/component' +import CheckIcon from '@mui/icons-material/Check' +import PublishIcon from '@mui/icons-material/Publish' +import RemoveIcon from '@mui/icons-material/Remove' +import UndoIcon from '@mui/icons-material/Undo' import { Box, Button, @@ -28,33 +32,33 @@ import { Stepper, Typography, } from '@mui/material' +import { makeStyles } from '@mui/styles' +import { Ace } from 'ace-builds' +import api from 'api' import { Form, Formik } from 'formik' -import { SelectField, TextField } from 'components/FormField' -import { Template, deleteTemplate, resetWorkflow } from 'slices/workflows' -import { setAlert, setConfirm } from 'slices/globalStatus' +import yaml from 'js-yaml' +import _ from 'lodash' import { useEffect, useState } from 'react' -import { useStoreDispatch, useStoreSelector } from 'store' -import { validateDeadline, validateName } from 'lib/formikhelpers' +import { useIntl } from 'react-intl' +import { useNavigate } from 'react-router-dom' -import { Ace } from 'ace-builds' -import Add from './Add' -import CheckIcon from '@mui/icons-material/Check' import Menu from '@ui/mui-extends/esm/Menu' import Paper from '@ui/mui-extends/esm/Paper' -import PublishIcon from '@mui/icons-material/Publish' -import RemoveIcon from '@mui/icons-material/Remove' import Space from '@ui/mui-extends/esm/Space' -import UndoIcon from '@mui/icons-material/Undo' -import _ from 'lodash' -import api from 'api' -import { constructWorkflow } from 'lib/formikhelpers' -import i18n from 'components/T' -import loadable from '@loadable/component' -import { makeStyles } from '@mui/styles' + +import { useStoreDispatch, useStoreSelector } from 'store' + import { resetNewExperiment } from 'slices/experiments' -import { useIntl } from 'react-intl' -import { useNavigate } from 'react-router-dom' -import yaml from 'js-yaml' +import { setAlert, setConfirm } from 'slices/globalStatus' +import { Template, deleteTemplate, resetWorkflow } from 'slices/workflows' + +import { SelectField, TextField } from 'components/FormField' +import i18n from 'components/T' + +import { validateDeadline, validateName } from 'lib/formikhelpers' +import { constructWorkflow } from 'lib/formikhelpers' + +import Add from './Add' const YAMLEditor = loadable(() => import('components/YAMLEditor')) @@ -171,14 +175,16 @@ const NewWorkflow = () => { const onValidate = setWorkflowBasic const submitWorkflow = () => { - const workflow = yamlEditor?.getValue() + const workflow = yamlEditor?.getValue()! if (process.env.NODE_ENV === 'development') { console.debug('Debug workflow:', workflow) } api.workflows - .newWorkflow(yaml.load(workflow!)) + .workflowsPost({ + request: yaml.load(workflow) as any, + }) .then(() => { dispatch(resetWorkflow()) diff --git a/ui/app/src/components/NewWorkflowNext/SubmitWorkflow.tsx b/ui/app/src/components/NewWorkflowNext/SubmitWorkflow.tsx index 233c37d36a..57dcd9a193 100644 --- a/ui/app/src/components/NewWorkflowNext/SubmitWorkflow.tsx +++ b/ui/app/src/components/NewWorkflowNext/SubmitWorkflow.tsx @@ -99,7 +99,7 @@ export default function SubmitWorkflow({ open, setOpen, workflow }: SubmitWorkfl } api.workflows - .newWorkflow(payload) + .workflowsPost({ request: payload }) .then(() => { dispatch(resetWorkflow()) diff --git a/ui/app/src/components/NotFound/index.tsx b/ui/app/src/components/NotFound/index.tsx index 103ca5133b..ab9d200c1d 100644 --- a/ui/app/src/components/NotFound/index.tsx +++ b/ui/app/src/components/NotFound/index.tsx @@ -14,10 +14,9 @@ * limitations under the License. * */ - import { Box, useTheme } from '@mui/material' - import type { BoxProps } from '@mui/material' + import EmptyStreetDark from 'images/assets/undraw_empty_street-dark.svg' import undrawNotFound from 'images/assets/undraw_not_found.svg' diff --git a/ui/app/src/components/ObjectConfiguration/index.tsx b/ui/app/src/components/ObjectConfiguration/index.tsx index 03e949f99d..118bcade39 100644 --- a/ui/app/src/components/ObjectConfiguration/index.tsx +++ b/ui/app/src/components/ObjectConfiguration/index.tsx @@ -14,20 +14,22 @@ * limitations under the License. * */ - -import { Experiment, Selector, TableCell } from './common' import { Grid, Table, TableBody, TableRow, Typography } from '@mui/material' +import { templateTypeToFieldName } from 'api/zz_generated.frontend.chaos-mesh' +import { TypesArchiveDetail, TypesExperimentDetail } from 'openapi' -import { ArchiveSingle } from 'api/archives.type' -import { ExperimentSingle } from 'api/experiments.type' import Space from '@ui/mui-extends/esm/Space' + +import { useStoreSelector } from 'store' + import StatusLabel from 'components/StatusLabel' -import { format } from 'lib/luxon' import i18n from 'components/T' -import { templateTypeToFieldName } from 'api/zz_generated.frontend.chaos-mesh' -import { useStoreSelector } from 'store' -type Config = ExperimentSingle | ArchiveSingle +import { format } from 'lib/luxon' + +import { Experiment, Selector, TableCell } from './common' + +type Config = TypesExperimentDetail | TypesArchiveDetail interface ObjectConfigurationProps { config: Config @@ -46,7 +48,7 @@ const ObjectConfiguration: React.FC = ({ }) => { const { lang } = useStoreSelector((state) => state.settings) - const spec = inNode ? config : config.kube_object.spec + const spec: any = inNode ? config : config!.kube_object!.spec const experiment = inSchedule || inNode ? spec[templateTypeToFieldName(inSchedule ? spec.type : (config as any).templateType)] : spec @@ -91,7 +93,7 @@ const ObjectConfiguration: React.FC = ({ {i18n('table.created')} - {format(config.created_at, lang)} + {format(config.created_at!, lang)} diff --git a/ui/app/src/components/ObjectListItem/index.tsx b/ui/app/src/components/ObjectListItem/index.tsx index 0c99e4f3bc..845ede3084 100644 --- a/ui/app/src/components/ObjectListItem/index.tsx +++ b/ui/app/src/components/ObjectListItem/index.tsx @@ -14,29 +14,30 @@ * limitations under the License. * */ -import { Box, IconButton, Typography } from '@mui/material' -import DateTime, { format } from 'lib/luxon' - -import { Archive } from 'api/archives.type' import ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined' import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined' -import { Experiment } from 'api/experiments.type' -import Paper from '@ui/mui-extends/esm/Paper' import PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline' import PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline' -import { Schedule } from 'api/schedules.type' -import Space from '@ui/mui-extends/esm/Space' -import StatusLabel from 'components/StatusLabel' +import { Box, IconButton, Typography } from '@mui/material' import _ from 'lodash' -import i18n from 'components/T' +import { TypesArchive, TypesExperiment, TypesSchedule } from 'openapi' import { useIntl } from 'react-intl' import { useNavigate } from 'react-router-dom' + +import Paper from '@ui/mui-extends/esm/Paper' +import Space from '@ui/mui-extends/esm/Space' + import { useStoreSelector } from 'store' +import StatusLabel from 'components/StatusLabel' +import i18n from 'components/T' + +import DateTime, { format } from 'lib/luxon' + interface ObjectListItemProps { type?: 'schedule' | 'experiment' | 'archive' archive?: 'workflow' | 'schedule' | 'experiment' - data: Schedule | Experiment | Archive + data: TypesSchedule | TypesExperiment | TypesArchive onSelect: (info: { uuid: uuid; title: string; description: string; action: string }) => void } @@ -55,7 +56,7 @@ const ObjectListItem: React.FC = ({ data, type = 'experimen title: `${i18n('archives.single', intl)} ${data.name}`, description: i18n(`${type}s.deleteDesc`, intl), action, - uuid: data.uid, + uuid: data.uid!, }) return @@ -64,7 +65,7 @@ const ObjectListItem: React.FC = ({ data, type = 'experimen title: `${i18n('common.pause', intl)} ${data.name}`, description: i18n('experiments.pauseDesc', intl), action, - uuid: data.uid, + uuid: data.uid!, }) return @@ -73,7 +74,7 @@ const ObjectListItem: React.FC = ({ data, type = 'experimen title: `${i18n('common.start', intl)} ${data.name}`, description: i18n('experiments.startDesc', intl), action, - uuid: data.uid, + uuid: data.uid!, }) return @@ -82,7 +83,7 @@ const ObjectListItem: React.FC = ({ data, type = 'experimen title: `${i18n('common.delete', intl)} ${data.name}`, description: i18n('archives.deleteDesc', intl), action, - uuid: data.uid, + uuid: data.uid!, }) return @@ -155,7 +156,7 @@ const ObjectListItem: React.FC = ({ data, type = 'experimen > - {type !== 'archive' && } + {type !== 'archive' && } {_.truncate(data.name!)} diff --git a/ui/app/src/components/RBACGenerator/index.tsx b/ui/app/src/components/RBACGenerator/index.tsx index 46a8407265..e2a4d3a5bb 100644 --- a/ui/app/src/components/RBACGenerator/index.tsx +++ b/ui/app/src/components/RBACGenerator/index.tsx @@ -17,10 +17,10 @@ import { Box, Button, Checkbox, FormControl, FormControlLabel, MenuItem, Typography } from '@mui/material' import { makeStyles } from '@mui/styles' import api from 'api' -import { RBACConfigParams } from 'api/common.type' import copy from 'copy-text-to-clipboard' import { Field, Form, Formik } from 'formik' import _ from 'lodash' +import { CommonApiCommonRbacConfigGetRequest } from 'openapi' import { useEffect, useRef, useState } from 'react' import { useIntl } from 'react-intl' @@ -61,9 +61,9 @@ const RBACGenerator = () => { const containerRef = useRef(null) - const fetchRBACConfig = (values: RBACConfigParams) => - api.common.rbacConfig(values).then(({ data }) => { - const entries = Object.entries(data) + const fetchRBACConfig = (values: CommonApiCommonRbacConfigGetRequest) => + api.common.commonRbacConfigGet(values).then(({ data }) => { + const entries = Object.entries(data) const [name, yaml] = entries[0] setRBAC(yaml) @@ -74,7 +74,7 @@ const RBACGenerator = () => { fetchRBACConfig({ namespace: 'default', role: 'viewer' }) }, []) - const onValidate = ({ namespace, role, clustered }: RBACConfigParams & { clustered: boolean }) => { + const onValidate = ({ namespace, role, clustered }: CommonApiCommonRbacConfigGetRequest & { clustered: boolean }) => { fetchRBACConfig({ namespace: clustered ? '' : namespace, role, diff --git a/ui/app/src/components/Schedule/types.tsx b/ui/app/src/components/Schedule/types.tsx index 8cee63381c..b32a125f3b 100644 --- a/ui/app/src/components/Schedule/types.tsx +++ b/ui/app/src/components/Schedule/types.tsx @@ -14,12 +14,11 @@ * limitations under the License. * */ - -import { FormikProps, FormikValues, getIn } from 'formik' import { InputAdornment, MenuItem } from '@mui/material' -import { SelectField, TextField } from 'components/FormField' +import { FormikProps, FormikValues, getIn } from 'formik' import { number, string } from 'yup' +import { SelectField, TextField } from 'components/FormField' import { T } from 'components/T' export interface ScheduleSpecific { diff --git a/ui/app/src/components/Scope/Mode.tsx b/ui/app/src/components/Scope/Mode.tsx index 616ac0dcff..8ea3c66b22 100644 --- a/ui/app/src/components/Scope/Mode.tsx +++ b/ui/app/src/components/Scope/Mode.tsx @@ -14,11 +14,10 @@ * limitations under the License. * */ - import { InputAdornment, MenuItem } from '@mui/material' -import { SelectField, TextField } from 'components/FormField' import { getIn, useFormikContext } from 'formik' +import { SelectField, TextField } from 'components/FormField' import { T } from 'components/T' const modes = [ diff --git a/ui/app/src/components/Scope/ScopePodsTable.tsx b/ui/app/src/components/Scope/ScopePodsTable.tsx index 4fc0e2df3a..c19ddfe4c2 100644 --- a/ui/app/src/components/Scope/ScopePodsTable.tsx +++ b/ui/app/src/components/Scope/ScopePodsTable.tsx @@ -16,13 +16,16 @@ */ import { Checkbox, Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material' import { getIn, useFormikContext } from 'formik' +import { useMemo } from 'react' import PaperContainer from '@ui/mui-extends/esm/PaperContainer' -import i18n from 'components/T' -import { setAlert } from 'slices/globalStatus' -import { useMemo } from 'react' + import { useStoreDispatch } from 'store' +import { setAlert } from 'slices/globalStatus' + +import i18n from 'components/T' + interface ScopePodsTableProps { scope?: string pods: any[] diff --git a/ui/app/src/components/Scope/index.test.tsx b/ui/app/src/components/Scope/index.test.tsx index afb393bd37..d2cbe5b41b 100644 --- a/ui/app/src/components/Scope/index.test.tsx +++ b/ui/app/src/components/Scope/index.test.tsx @@ -22,10 +22,12 @@ import { scopeInitialValues } from '../AutoForm/data' jest.mock('api', () => ({ common: { - labels: jest.fn().mockImplementation((ns) => { + commonLabelsGet: jest.fn().mockImplementation(({ podNamespaceList: nsStr }) => { + const ns = nsStr.split(',') + return Promise.resolve({ data: ns[0] === 'ns1' ? { app: 'ns1' } : { app: 'ns2' } }) }), - pods: jest.fn().mockImplementation(({ namespaces: ns, labelSelectors }) => { + commonPodsPost: jest.fn().mockImplementation(({ request: { namespaces: ns, labelSelectors } }) => { const app1 = { ip: '172.17.0.10', name: 'app-1', diff --git a/ui/app/src/components/Search/index.tsx b/ui/app/src/components/Search/index.tsx index b2b0cab6f3..ba6cd2de27 100644 --- a/ui/app/src/components/Search/index.tsx +++ b/ui/app/src/components/Search/index.tsx @@ -14,6 +14,10 @@ * limitations under the License. * */ +import FingerprintIcon from '@mui/icons-material/Fingerprint' +import HelpOutlineIcon from '@mui/icons-material/HelpOutline' +import ScheduleIcon from '@mui/icons-material/Schedule' +import SearchIcon from '@mui/icons-material/Search' import { Autocomplete, Box, @@ -24,26 +28,21 @@ import { TextField, Typography, } from '@mui/material' +import { makeStyles } from '@mui/styles' +import api from 'api' +import _ from 'lodash' +import { CoreWorkflowMeta, TypesArchive, TypesExperiment, TypesSchedule } from 'openapi' import { useMemo, useState } from 'react' +import { useIntl } from 'react-intl' +import { useNavigate } from 'react-router-dom' -import { Archive } from 'api/archives.type' -import { Experiment } from 'api/experiments.type' -import FingerprintIcon from '@mui/icons-material/Fingerprint' -import HelpOutlineIcon from '@mui/icons-material/HelpOutline' import Paper from '@ui/mui-extends/esm/Paper' -import { Schedule } from 'api/schedules.type' -import ScheduleIcon from '@mui/icons-material/Schedule' -import SearchIcon from '@mui/icons-material/Search' import Tooltip from '@ui/mui-extends/esm/Tooltip' -import { Workflow } from 'api/workflows.type' -import _ from 'lodash' -import api from 'api' -import { format } from 'lib/luxon' + import i18n from 'components/T' -import { makeStyles } from '@mui/styles' + +import { format } from 'lib/luxon' import search from 'lib/search' -import { useIntl } from 'react-intl' -import { useNavigate } from 'react-router-dom' const Chip = (props: ChipProps) => @@ -65,7 +64,8 @@ const useStyles = makeStyles((theme) => ({ }, })) -type Option = Workflow | Schedule | Experiment | Archive +type OptionCategory = CoreWorkflowMeta | TypesSchedule | TypesExperiment | TypesArchive +type Option = OptionCategory & { is?: string } const Search: React.FC = () => { const classes = useStyles() @@ -84,16 +84,16 @@ const Search: React.FC = () => { setOpen(true) const [workflows, schedules, experiments, archives, archivedWorkflows, archivedSchedules] = [ - (await api.workflows.workflows()).data.map((d) => ({ + (await api.workflows.workflowsGet()).data.map((d) => ({ ...d, is: 'workflow' as 'workflow', kind: 'Workflow', })), - (await api.schedules.schedules()).data.map((d) => ({ ...d, is: 'schedule' as 'schedule' })), - (await api.experiments.experiments()).data.map((d) => ({ ...d, is: 'experiment' as 'experiment' })), - (await api.archives.archives()).data.map((d) => ({ ...d, is: 'archive' as 'archive' })), - (await api.workflows.archives()).data.map((d) => ({ ...d, is: 'archive' as 'archive' })), - (await api.schedules.archives()).data.map((d) => ({ ...d, is: 'archive' as 'archive' })), + (await api.schedules.schedulesGet()).data.map((d) => ({ ...d, is: 'schedule' })), + (await api.experiments.experimentsGet()).data.map((d) => ({ ...d, is: 'experiment' })), + (await api.archives.archivesGet()).data.map((d) => ({ ...d, is: 'archive' })), + (await api.archives.archivesWorkflowsGet()).data.map((d) => ({ ...d, is: 'archive' })), + (await api.archives.archivesSchedulesGet()).data.map((d) => ({ ...d, is: 'archive' })), ] const result = search( @@ -139,10 +139,10 @@ const Search: React.FC = () => { const renderOption = (props: any, option: Option) => { const type = option.is - const uuid = option.uid + const uuid = option.uid! const name = option.name const kind = determineKind(option) - const time = option.created_at + const time = option.created_at! const onClick = () => { navigate(determineLink(uuid, type, kind)) @@ -165,9 +165,9 @@ const Search: React.FC = () => { ) } - const onChange = (_: any, value: Option | null, reason: string) => { + const onChange = (_: any, value: Option, reason: string) => { if (reason === 'selectOption') { - navigate(determineLink(value!.uid, value!.is, determineKind(value!))) + navigate(determineLink(value.uid!, value.is, determineKind(value!))) } } diff --git a/ui/app/src/components/StatusLabel/index.tsx b/ui/app/src/components/StatusLabel/index.tsx index d947c77694..9d91062262 100644 --- a/ui/app/src/components/StatusLabel/index.tsx +++ b/ui/app/src/components/StatusLabel/index.tsx @@ -14,10 +14,10 @@ * limitations under the License. * */ - import { CircularProgress, Typography, styled, useTheme } from '@mui/material' import Space from '@ui/mui-extends/esm/Space' + import { T } from 'components/T' const Circle = styled('div')((props) => ({ diff --git a/ui/app/src/components/T/index.tsx b/ui/app/src/components/T/index.tsx index db9cc50a0c..24da1cb108 100644 --- a/ui/app/src/components/T/index.tsx +++ b/ui/app/src/components/T/index.tsx @@ -25,7 +25,6 @@ * 3. `T` is an alias of `FormattedMessage`. Mostly you will often use `T` instead of `i18n`. * */ - import { FormattedMessage } from 'react-intl' import type { IntlShape } from 'react-intl' diff --git a/ui/app/src/components/Token/index.tsx b/ui/app/src/components/Token/index.tsx index a592fd3315..f5c62ef1e0 100644 --- a/ui/app/src/components/Token/index.tsx +++ b/ui/app/src/components/Token/index.tsx @@ -14,6 +14,7 @@ * limitations under the License. * */ + import { Form, Formik, FormikHelpers } from 'formik' import { Submit, TextField } from 'components/FormField' import { setAlert, setTokenName, setTokens } from 'slices/globalStatus' @@ -79,7 +80,7 @@ const Token: React.FC = ({ onSubmitCallback }) => { // Test the validity of the token in advance api.experiments - .state() + .experimentsStateGet() .then(restSteps) .catch((error) => { const data = error.response?.data diff --git a/ui/app/src/components/TopContainer/Namespace.tsx b/ui/app/src/components/TopContainer/Namespace.tsx index e7ada9118d..c908024365 100644 --- a/ui/app/src/components/TopContainer/Namespace.tsx +++ b/ui/app/src/components/TopContainer/Namespace.tsx @@ -14,17 +14,19 @@ * limitations under the License. * */ - import { Autocomplete, TextField } from '@mui/material' +import api from 'api' +import { useEffect } from 'react' import { useLocation, useNavigate } from 'react-router-dom' -import { useStoreDispatch, useStoreSelector } from 'store' import Paper from '@ui/mui-extends/esm/Paper' -import api from 'api' + +import { useStoreDispatch, useStoreSelector } from 'store' + import { getNamespaces } from 'slices/experiments' -import i18n from 'components/T' import { setNameSpace } from 'slices/globalStatus' -import { useEffect } from 'react' + +import i18n from 'components/T' const Namespace = () => { const navigate = useNavigate() diff --git a/ui/app/src/components/TopContainer/Navbar.tsx b/ui/app/src/components/TopContainer/Navbar.tsx index d03b7f7dfe..b4e18c3ae3 100644 --- a/ui/app/src/components/TopContainer/Navbar.tsx +++ b/ui/app/src/components/TopContainer/Navbar.tsx @@ -14,15 +14,16 @@ * limitations under the License. * */ - -import { AppBar, Box, IconButton, Toolbar } from '@mui/material' - import MenuIcon from '@mui/icons-material/Menu' import MenuOpenIcon from '@mui/icons-material/MenuOpen' -import Namespace from './Namespace' -import Search from 'components/Search' +import { AppBar, Box, IconButton, Toolbar } from '@mui/material' + import Space from '@ui/mui-extends/esm/Space' +import Search from 'components/Search' + +import Namespace from './Namespace' + interface HeaderProps { openDrawer: boolean handleDrawerToggle: () => void diff --git a/ui/app/src/components/TopContainer/Sidebar.tsx b/ui/app/src/components/TopContainer/Sidebar.tsx index a256613a97..6b934078e2 100644 --- a/ui/app/src/components/TopContainer/Sidebar.tsx +++ b/ui/app/src/components/TopContainer/Sidebar.tsx @@ -14,7 +14,14 @@ * limitations under the License. * */ - +import AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined' +import ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined' +import DashboardOutlinedIcon from '@mui/icons-material/DashboardOutlined' +import MenuBookOutlinedIcon from '@mui/icons-material/MenuBookOutlined' +import ScheduleIcon from '@mui/icons-material/Schedule' +import ScienceOutlinedIcon from '@mui/icons-material/ScienceOutlined' +import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined' +import TimelineOutlinedIcon from '@mui/icons-material/TimelineOutlined' import { Box, CSSObject, @@ -26,22 +33,16 @@ import { ListItemText as MuiListItemText, } from '@mui/material' import { Theme, styled } from '@mui/material/styles' - -import AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined' -import ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined' -import DashboardOutlinedIcon from '@mui/icons-material/DashboardOutlined' -import MenuBookOutlinedIcon from '@mui/icons-material/MenuBookOutlined' import { NavLink } from 'react-router-dom' -import ScheduleIcon from '@mui/icons-material/Schedule' -import ScienceOutlinedIcon from '@mui/icons-material/ScienceOutlined' -import SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined' -import TimelineOutlinedIcon from '@mui/icons-material/TimelineOutlined' + +import { useStoreSelector } from 'store' + import i18n from 'components/T' -import logo from 'images/logo.svg' -import logoMini from 'images/logo-mini.svg' + import logoMiniWhite from 'images/logo-mini-white.svg' +import logoMini from 'images/logo-mini.svg' import logoWhite from 'images/logo-white.svg' -import { useStoreSelector } from 'store' +import logo from 'images/logo.svg' export const openedWidth = 256 export const closedWidth = 64 diff --git a/ui/app/src/components/TopContainer/index.tsx b/ui/app/src/components/TopContainer/index.tsx index 19563d3476..a2d866bc96 100644 --- a/ui/app/src/components/TopContainer/index.tsx +++ b/ui/app/src/components/TopContainer/index.tsx @@ -138,7 +138,7 @@ const TopContainer = () => { */ function fetchServerConfig() { api.common - .config() + .commonConfigGet() .then(({ data }) => { if (data.security_mode) { setAuth() diff --git a/ui/app/src/formik/JVMChaos.ts b/ui/app/src/formik/JVMChaos.ts index 9b21d5d2e6..171bf5afdc 100644 --- a/ui/app/src/formik/JVMChaos.ts +++ b/ui/app/src/formik/JVMChaos.ts @@ -3,7 +3,7 @@ * Do not make direct changes to the file. */ -export const actions = ['latency', 'return', 'exception', 'stress', 'gc', 'ruleData'], +export const actions = ['latency', 'return', 'exception', 'stress', 'gc', 'ruleData', 'mysql'], data = [ { field: 'text', @@ -24,17 +24,25 @@ export const actions = ['latency', 'return', 'exception', 'stress', 'gc', 'ruleD value: 0, helperText: 'Optional. the CPU core number needs to use, only set it when action is stress', }, + { + field: 'text', + label: 'database', + value: '', + helperText: 'the match database default value is "", means match all database', + }, { field: 'text', label: 'exception', value: '', - helperText: 'Optional. the exception which needs to throw for action `exception`', + helperText: + 'Optional. the exception which needs to throw for action `exception` or the exception message needs to throw in action `mysql`', }, { field: 'number', label: 'latency', value: 0, - helperText: "Optional. the latency duration for action 'latency', unit ms", + helperText: + "Optional. the latency duration for action 'latency', unit ms or the latency duration in action `mysql`", }, { field: 'text', @@ -49,11 +57,17 @@ export const actions = ['latency', 'return', 'exception', 'stress', 'gc', 'ruleD value: '', helperText: 'Optional. the method in Java class', }, + { + field: 'text', + label: 'mysqlConnectorVersion', + value: '', + helperText: 'the version of mysql-connector-java, only support 5.X.X(set to "5") and 8.X.X(set to "8") now', + }, { field: 'text', label: 'name', value: '', - helperText: "Optional. byteman rule name, should be unique, and will use JVMChaos' name if not set", + helperText: 'Optional. byteman rule name, should be unique, and will generate one if not set', }, { field: 'number', @@ -73,4 +87,17 @@ export const actions = ['latency', 'return', 'exception', 'stress', 'gc', 'ruleD value: '', helperText: "Optional. the byteman rule's data for action 'ruleData'", }, + { + field: 'text', + label: 'sqlType', + value: '', + helperText: + "the match sql type default value is \"\", means match all SQL type. The value can be 'select', 'insert', 'update', 'delete', 'replace'.", + }, + { + field: 'text', + label: 'table', + value: '', + helperText: 'the match table default value is "", means match all table', + }, ] diff --git a/ui/app/src/formik/PhysicalMachineChaos.ts b/ui/app/src/formik/PhysicalMachineChaos.ts index 08e9ccc35a..3785f51cbc 100644 --- a/ui/app/src/formik/PhysicalMachineChaos.ts +++ b/ui/app/src/formik/PhysicalMachineChaos.ts @@ -723,9 +723,9 @@ export const actions = [ 'specifies P percent loading per CPU worker. 0 is effectively a sleep (no load) and 100 is full loading.', }, { - field: 'text', + field: 'label', label: 'options', - value: '', + value: [], helperText: 'extend stress-ng options', }, { @@ -742,9 +742,9 @@ export const actions = [ label: 'stress-mem', children: [ { - field: 'text', + field: 'label', label: 'options', - value: '', + value: [], helperText: 'extend stress-ng options', }, { diff --git a/ui/app/src/formik/actions.ts b/ui/app/src/formik/actions.ts index e0a9be86d2..f1642eeea5 100644 --- a/ui/app/src/formik/actions.ts +++ b/ui/app/src/formik/actions.ts @@ -9,7 +9,7 @@ const actions = { GCPChaos: ['node-stop', 'node-reset', 'disk-loss'], HTTPChaos: [], IOChaos: ['latency', 'fault', 'attrOverride', 'mistake'], - JVMChaos: ['latency', 'return', 'exception', 'stress', 'gc', 'ruleData'], + JVMChaos: ['latency', 'return', 'exception', 'stress', 'gc', 'ruleData', 'mysql'], KernelChaos: [], NetworkChaos: ['netem', 'delay', 'loss', 'duplicate', 'corrupt', 'partition', 'bandwidth'], PhysicalMachineChaos: [ diff --git a/ui/app/src/lib/cytoscape.ts b/ui/app/src/lib/cytoscape.ts index 27d5f06c93..13bcbe8289 100644 --- a/ui/app/src/lib/cytoscape.ts +++ b/ui/app/src/lib/cytoscape.ts @@ -14,12 +14,11 @@ * limitations under the License. * */ +import { Theme } from '@mui/material' import { Node, WorkflowSingle } from 'api/workflows.type' import cytoscape, { EdgeDefinition, EventHandler, NodeDefinition, Stylesheet } from 'cytoscape' - -import { Theme } from '@mui/material' -import _ from 'lodash' import dagre from 'cytoscape-dagre' +import _ from 'lodash' cytoscape.use(dagre) diff --git a/ui/app/src/lib/d3/eventsChart.tsx b/ui/app/src/lib/d3/eventsChart.tsx index 846cadede6..4e31b58947 100644 --- a/ui/app/src/lib/d3/eventsChart.tsx +++ b/ui/app/src/lib/d3/eventsChart.tsx @@ -14,15 +14,16 @@ * limitations under the License. * */ +import { Box, Typography } from '@mui/material' import * as d3 from 'd3' +import _ from 'lodash' +import { CoreEvent as Event } from 'openapi' +import { renderToString } from 'react-dom/server' + +import { Theme } from 'slices/settings' -import { Box, Typography } from '@mui/material' import DateTime, { format, now } from 'lib/luxon' -import { Event } from 'api/events.type' -import { Theme } from 'slices/settings' -import _ from 'lodash' -import { renderToString } from 'react-dom/server' import wrapText from './wrapText' /** @@ -81,14 +82,14 @@ export default function gen({ margin.right = enableLegends && document.documentElement.offsetWidth > 768 ? 150 : 0 } - const halfHourLater = (events.length ? DateTime.fromISO(events[0].created_at) : now()).plus({ + const halfHourLater = (events.length ? DateTime.fromISO(events[0].created_at!) : now()).plus({ hours: 0.5, }) const colorPalette = d3 .scaleOrdinal() .range(d3.schemeTableau10) - .domain(events.map((d) => d.object_id)) + .domain(events.map((d) => d.object_id!)) const allUniqueExperiments = [...new Set(events.map((d) => d.name + '/' + d.object_id))].map((d) => { const [name, uuid] = d.split('/') @@ -198,7 +199,7 @@ export default function gen({ d3.zoomIdentity .translate((width - margin.left - margin.right) / 2, 0) .scale(3) - .translate(-x(DateTime.fromISO(event.created_at)), 0) + .translate(-x(DateTime.fromISO(event.created_at!)), 0) ) }) legends @@ -220,7 +221,7 @@ export default function gen({ return renderToString( {d.name} - {format(d.created_at)} + {format(d.created_at!)} {d.message} @@ -244,7 +245,7 @@ export default function gen({ .selectAll('circle') .data(events) .join((enter) => { - const newCx = (d: Event) => newX(DateTime.fromISO(d.created_at)) + const newCx = (d: Event) => newX(DateTime.fromISO(d.created_at!)) return enter .append('circle') @@ -252,8 +253,8 @@ export default function gen({ .attr('cx', (d) => newCx(d) + 30) .call((enter) => enter.transition().duration(750).attr('opacity', 1).attr('cx', newCx)) }) - .attr('cy', (d) => y(d.object_id)! + y.bandwidth() / 2 + margin.top) - .attr('fill', (d) => colorPalette(d.object_id)) + .attr('cy', (d) => y(d.object_id!)! + y.bandwidth() / 2 + margin.top) + .attr('fill', (d) => colorPalette(d.object_id!)) .attr('r', 4) .style('cursor', 'pointer') .on('click', (_, d) => { @@ -288,7 +289,7 @@ export default function gen({ gXAxis.call(xAxis.scale(newX)) gXAxis.selectAll('.tick text').call(wrapText, 30) - circles.attr('cx', (d) => newX(DateTime.fromISO(d.created_at))!) + circles.attr('cx', (d) => newX(DateTime.fromISO(d.created_at!))!) } zoom = d3.zoom().scaleExtent([0.1, 6]).on('zoom', zoomed) @@ -305,7 +306,7 @@ export default function gen({ gXAxis.selectAll('.tick text').call(wrapText, 30) gYAxisRight.attr('transform', `translate(${width - margin.right + 0.5}, ${margin.top})`) timelines.attr('x2', width - margin.right - margin.left) - circles.attr('cx', (d) => x(DateTime.fromISO(d.created_at))) + circles.attr('cx', (d) => x(DateTime.fromISO(d.created_at!))) } d3.select(window).on('resize', _.debounce(reGen, 250)) diff --git a/ui/app/src/lib/hooks.ts b/ui/app/src/lib/hooks.ts index f9f1b947e4..57407ece15 100644 --- a/ui/app/src/lib/hooks.ts +++ b/ui/app/src/lib/hooks.ts @@ -14,9 +14,7 @@ * limitations under the License. * */ - import { useEffect, useRef } from 'react' - import { useLocation } from 'react-router-dom' export function usePrevious(value: T) { diff --git a/ui/app/src/lib/luxon.ts b/ui/app/src/lib/luxon.ts index 691fb45f92..b4d3774851 100644 --- a/ui/app/src/lib/luxon.ts +++ b/ui/app/src/lib/luxon.ts @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { DateTime } from 'luxon' export function comparator(a: string, b: string) { diff --git a/ui/app/src/lib/search.ts b/ui/app/src/lib/search.ts index bdb3f16af5..a4051ec1d7 100644 --- a/ui/app/src/lib/search.ts +++ b/ui/app/src/lib/search.ts @@ -14,18 +14,15 @@ * limitations under the License. * */ -import { Archive } from 'api/archives.type' -import { Experiment } from 'api/experiments.type' -import { Schedule } from 'api/schedules.type' -import { Workflow } from 'api/workflows.type' +import { CoreWorkflowMeta, TypesArchive, TypesExperiment, TypesSchedule } from 'openapi' type Keyword = 'namespace' | 'ns' | 'kind' interface SearchData { - workflows: Workflow[] - schedules: Schedule[] - experiments: Experiment[] - archives: Archive[] + workflows: CoreWorkflowMeta[] + schedules: TypesSchedule[] + experiments: TypesExperiment[] + archives: TypesArchive[] } interface KeywordToken { @@ -122,7 +119,7 @@ function searchCommon(data: any, keyword: Keyword, value: string) { return data.filter((d: any) => d[keyword].toLowerCase().includes(value)) } -function searchObjects(data: T[], tokens: Token[]) { +function searchObjects(data: T[], tokens: Token[]) { let filtered = data tokens.forEach((t) => { @@ -131,7 +128,7 @@ function searchObjects(data: T[], tokens: Token[]) { if (t.type === 'keyword') { filtered = searchCommon(filtered, t.keyword, val) } else if (t.type === 'content') { - filtered = filtered.filter((d) => d.name.toLowerCase().includes(val)) + filtered = filtered.filter((d) => d.name!.toLowerCase().includes(val)) } }) diff --git a/ui/app/src/openapi/api.ts b/ui/app/src/openapi/api.ts index 34bafaf1b6..b1dae82948 100644 --- a/ui/app/src/openapi/api.ts +++ b/ui/app/src/openapi/api.ts @@ -1,16 +1,19 @@ /* tslint:disable */ + /* eslint-disable */ + /** * Chaos Mesh Dashboard API * Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report. * - * The version of the OpenAPI document: 2.0 + * The version of the OpenAPI document: 2.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ +import globalAxios, { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios' // @ts-ignore import { BASE_PATH, BaseAPI, COLLECTION_FORMATS, RequestArgs, RequiredError } from './base' @@ -28,79 +31,8 @@ import { setSearchParams, toPathString, } from './common' -import globalAxios, { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios' - import { Configuration } from './configuration' -/** - * - * @export - * @interface ArchiveDetail - */ -export interface ArchiveDetail { - /** - * - * @type {CoreKubeObjectDesc} - * @memberof ArchiveDetail - */ - kube_object?: CoreKubeObjectDesc -} -/** - * - * @export - * @interface CommonPhysicalMachine - */ -export interface CommonPhysicalMachine { - /** - * - * @type {string} - * @memberof CommonPhysicalMachine - */ - address?: string - /** - * - * @type {string} - * @memberof CommonPhysicalMachine - */ - name?: string - /** - * - * @type {string} - * @memberof CommonPhysicalMachine - */ - namespace?: string -} -/** - * - * @export - * @interface CommonPod - */ -export interface CommonPod { - /** - * - * @type {string} - * @memberof CommonPod - */ - ip?: string - /** - * - * @type {string} - * @memberof CommonPod - */ - name?: string - /** - * - * @type {string} - * @memberof CommonPod - */ - namespace?: string - /** - * - * @type {string} - * @memberof CommonPod - */ - state?: string -} /** * * @export @@ -260,6 +192,18 @@ export interface CoreEvent { * @interface CoreKubeObjectDesc */ export interface CoreKubeObjectDesc { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +optional + * @type {string} + * @memberof CoreKubeObjectDesc + */ + apiVersion?: string + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional + * @type {string} + * @memberof CoreKubeObjectDesc + */ + kind?: string /** * * @type {CoreKubeObjectMeta} @@ -378,43 +322,6 @@ export interface CoreNodeNameWithTemplate { */ template?: string } -/** - * - * @export - * @interface CoreObjectBase - */ -export interface CoreObjectBase { - /** - * - * @type {string} - * @memberof CoreObjectBase - */ - created_at?: string - /** - * - * @type {string} - * @memberof CoreObjectBase - */ - kind?: string - /** - * - * @type {string} - * @memberof CoreObjectBase - */ - name?: string - /** - * - * @type {string} - * @memberof CoreObjectBase - */ - namespace?: string - /** - * - * @type {string} - * @memberof CoreObjectBase - */ - uid?: string -} /** * * @export @@ -614,396 +521,3109 @@ export interface CurlRequestForm { /** * * @export - * @interface ExperimentDetail + * @interface IntstrIntOrString */ -export interface ExperimentDetail { +export interface IntstrIntOrString { /** * - * @type {string} - * @memberof ExperimentDetail + * @type {number} + * @memberof IntstrIntOrString */ - created_at?: string + intVal?: number /** * * @type {string} - * @memberof ExperimentDetail + * @memberof IntstrIntOrString */ - failed_message?: string + strVal?: string + /** + * + * @type {number} + * @memberof IntstrIntOrString + */ + type?: number +} +/** + * + * @export + * @interface ResourceQuantity + */ +export interface ResourceQuantity { /** * * @type {string} - * @memberof ExperimentDetail + * @memberof ResourceQuantity */ - kind?: string + Format?: string +} +/** + * + * @export + * @interface StatusAllChaosStatus + */ +export interface StatusAllChaosStatus { /** * - * @type {CoreKubeObjectDesc} - * @memberof ExperimentDetail + * @type {number} + * @memberof StatusAllChaosStatus */ - kube_object?: CoreKubeObjectDesc + deleting?: number + /** + * + * @type {number} + * @memberof StatusAllChaosStatus + */ + finished?: number + /** + * + * @type {number} + * @memberof StatusAllChaosStatus + */ + injecting?: number + /** + * + * @type {number} + * @memberof StatusAllChaosStatus + */ + paused?: number + /** + * + * @type {number} + * @memberof StatusAllChaosStatus + */ + running?: number +} +/** + * + * @export + * @interface TypesArchive + */ +export interface TypesArchive { /** * * @type {string} - * @memberof ExperimentDetail + * @memberof TypesArchive */ - name?: string + created_at?: string /** * * @type {string} - * @memberof ExperimentDetail + * @memberof TypesArchive */ - namespace?: string + kind?: string /** * * @type {string} - * @memberof ExperimentDetail + * @memberof TypesArchive */ - status?: string + name?: string /** * * @type {string} - * @memberof ExperimentDetail + * @memberof TypesArchive + */ + namespace?: string + /** + * + * @type {string} + * @memberof TypesArchive */ uid?: string } /** * * @export - * @interface ExperimentExperiment + * @interface TypesArchiveDetail */ -export interface ExperimentExperiment { +export interface TypesArchiveDetail { /** * * @type {string} - * @memberof ExperimentExperiment + * @memberof TypesArchiveDetail */ created_at?: string /** * * @type {string} - * @memberof ExperimentExperiment + * @memberof TypesArchiveDetail */ - failed_message?: string + kind?: string /** * - * @type {string} - * @memberof ExperimentExperiment + * @type {CoreKubeObjectDesc} + * @memberof TypesArchiveDetail */ - kind?: string + kube_object?: CoreKubeObjectDesc /** * * @type {string} - * @memberof ExperimentExperiment + * @memberof TypesArchiveDetail */ name?: string /** * * @type {string} - * @memberof ExperimentExperiment + * @memberof TypesArchiveDetail */ namespace?: string /** * * @type {string} - * @memberof ExperimentExperiment - */ - status?: string - /** - * - * @type {string} - * @memberof ExperimentExperiment + * @memberof TypesArchiveDetail */ uid?: string } /** * * @export - * @interface ScheduleDetail + * @interface TypesExperiment */ -export interface ScheduleDetail { +export interface TypesExperiment { /** * * @type {string} - * @memberof ScheduleDetail + * @memberof TypesExperiment */ created_at?: string /** * - * @type {Array} - * @memberof ScheduleDetail + * @type {string} + * @memberof TypesExperiment */ - experiment_uids?: Array + failed_message?: string /** * * @type {string} - * @memberof ScheduleDetail + * @memberof TypesExperiment */ kind?: string - /** - * - * @type {CoreKubeObjectDesc} - * @memberof ScheduleDetail - */ - kube_object?: CoreKubeObjectDesc /** * * @type {string} - * @memberof ScheduleDetail + * @memberof TypesExperiment */ name?: string /** * * @type {string} - * @memberof ScheduleDetail + * @memberof TypesExperiment */ namespace?: string /** * * @type {string} - * @memberof ScheduleDetail + * @memberof TypesExperiment */ status?: string /** * * @type {string} - * @memberof ScheduleDetail + * @memberof TypesExperiment */ uid?: string } /** * * @export - * @interface ScheduleSchedule + * @interface TypesExperimentDetail */ -export interface ScheduleSchedule { +export interface TypesExperimentDetail { /** * * @type {string} - * @memberof ScheduleSchedule + * @memberof TypesExperimentDetail */ created_at?: string /** * * @type {string} - * @memberof ScheduleSchedule + * @memberof TypesExperimentDetail + */ + failed_message?: string + /** + * + * @type {string} + * @memberof TypesExperimentDetail */ kind?: string + /** + * + * @type {CoreKubeObjectDesc} + * @memberof TypesExperimentDetail + */ + kube_object?: CoreKubeObjectDesc /** * * @type {string} - * @memberof ScheduleSchedule + * @memberof TypesExperimentDetail */ name?: string /** * * @type {string} - * @memberof ScheduleSchedule + * @memberof TypesExperimentDetail */ namespace?: string /** * * @type {string} - * @memberof ScheduleSchedule + * @memberof TypesExperimentDetail */ status?: string /** * * @type {string} - * @memberof ScheduleSchedule + * @memberof TypesExperimentDetail */ uid?: string } /** * * @export - * @interface StatusAllChaosStatus + * @interface TypesPhysicalMachine */ -export interface StatusAllChaosStatus { - /** - * - * @type {number} - * @memberof StatusAllChaosStatus - */ - deleting?: number - /** - * - * @type {number} - * @memberof StatusAllChaosStatus - */ - finished?: number +export interface TypesPhysicalMachine { /** * - * @type {number} - * @memberof StatusAllChaosStatus + * @type {string} + * @memberof TypesPhysicalMachine */ - injecting?: number + address?: string /** * - * @type {number} - * @memberof StatusAllChaosStatus + * @type {string} + * @memberof TypesPhysicalMachine */ - paused?: number + name?: string /** * - * @type {number} - * @memberof StatusAllChaosStatus + * @type {string} + * @memberof TypesPhysicalMachine */ - running?: number + namespace?: string } /** * * @export - * @interface TemplateStatusCheckTemplate + * @interface TypesPod */ -export interface TemplateStatusCheckTemplate { +export interface TypesPod { /** * * @type {string} - * @memberof TemplateStatusCheckTemplate + * @memberof TypesPod */ - description?: string + ip?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplate + * @memberof TypesPod */ name?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplate + * @memberof TypesPod */ namespace?: string /** * - * @type {V1alpha1StatusCheckTemplate} - * @memberof TemplateStatusCheckTemplate + * @type {string} + * @memberof TypesPod */ - spec?: V1alpha1StatusCheckTemplate + state?: string } /** * * @export - * @interface TemplateStatusCheckTemplateBase + * @interface TypesSchedule */ -export interface TemplateStatusCheckTemplateBase { +export interface TypesSchedule { /** * * @type {string} - * @memberof TemplateStatusCheckTemplateBase + * @memberof TypesSchedule */ created_at?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplateBase + * @memberof TypesSchedule */ - description?: string + kind?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplateBase + * @memberof TypesSchedule */ name?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplateBase + * @memberof TypesSchedule */ namespace?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplateBase + * @memberof TypesSchedule + */ + status?: string + /** + * + * @type {string} + * @memberof TypesSchedule */ uid?: string } /** * * @export - * @interface TemplateStatusCheckTemplateDetail + * @interface TypesScheduleDetail */ -export interface TemplateStatusCheckTemplateDetail { +export interface TypesScheduleDetail { /** * * @type {string} - * @memberof TemplateStatusCheckTemplateDetail + * @memberof TypesScheduleDetail */ created_at?: string + /** + * + * @type {Array} + * @memberof TypesScheduleDetail + */ + experiment_uids?: Array /** * * @type {string} - * @memberof TemplateStatusCheckTemplateDetail + * @memberof TypesScheduleDetail */ - description?: string + kind?: string + /** + * + * @type {CoreKubeObjectDesc} + * @memberof TypesScheduleDetail + */ + kube_object?: CoreKubeObjectDesc /** * * @type {string} - * @memberof TemplateStatusCheckTemplateDetail + * @memberof TypesScheduleDetail */ name?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplateDetail + * @memberof TypesScheduleDetail */ namespace?: string /** * - * @type {V1alpha1StatusCheckTemplate} - * @memberof TemplateStatusCheckTemplateDetail + * @type {string} + * @memberof TypesScheduleDetail */ - spec?: V1alpha1StatusCheckTemplate + status?: string /** * * @type {string} - * @memberof TemplateStatusCheckTemplateDetail + * @memberof TypesScheduleDetail */ uid?: string } /** * * @export - * @interface UtilsAPIError + * @interface TypesStatusCheckTemplate */ -export interface UtilsAPIError { +export interface TypesStatusCheckTemplate { /** * - * @type {number} + * @type {string} + * @memberof TypesStatusCheckTemplate + */ + description?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplate + */ + name?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplate + */ + namespace?: string + /** + * + * @type {V1alpha1StatusCheckTemplate} + * @memberof TypesStatusCheckTemplate + */ + spec?: V1alpha1StatusCheckTemplate +} +/** + * + * @export + * @interface TypesStatusCheckTemplateBase + */ +export interface TypesStatusCheckTemplateBase { + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateBase + */ + created_at?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateBase + */ + description?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateBase + */ + name?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateBase + */ + namespace?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateBase + */ + uid?: string +} +/** + * + * @export + * @interface TypesStatusCheckTemplateDetail + */ +export interface TypesStatusCheckTemplateDetail { + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateDetail + */ + created_at?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateDetail + */ + description?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateDetail + */ + name?: string + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateDetail + */ + namespace?: string + /** + * + * @type {V1alpha1StatusCheckTemplate} + * @memberof TypesStatusCheckTemplateDetail + */ + spec?: V1alpha1StatusCheckTemplate + /** + * + * @type {string} + * @memberof TypesStatusCheckTemplateDetail + */ + uid?: string +} +/** + * + * @export + * @interface UtilsAPIError + */ +export interface UtilsAPIError { + /** + * + * @type {number} * @memberof UtilsAPIError */ code?: number /** * * @type {string} - * @memberof UtilsAPIError + * @memberof UtilsAPIError + */ + full_text?: string + /** + * + * @type {string} + * @memberof UtilsAPIError + */ + message?: string + /** + * + * @type {string} + * @memberof UtilsAPIError + */ + type?: string +} +/** + * + * @export + * @interface UtilsResponse + */ +export interface UtilsResponse { + /** + * + * @type {string} + * @memberof UtilsResponse + */ + status?: string +} +/** + * + * @export + * @interface V1AWSElasticBlockStoreVolumeSource + */ +export interface V1AWSElasticBlockStoreVolumeSource { + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine +optional + * @type {string} + * @memberof V1AWSElasticBlockStoreVolumeSource + */ + fsType?: string + /** + * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). +optional + * @type {number} + * @memberof V1AWSElasticBlockStoreVolumeSource + */ + partition?: number + /** + * Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore +optional + * @type {boolean} + * @memberof V1AWSElasticBlockStoreVolumeSource + */ + readOnly?: boolean + /** + * Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + * @type {string} + * @memberof V1AWSElasticBlockStoreVolumeSource + */ + volumeID?: string +} +/** + * + * @export + * @interface V1AzureDiskVolumeSource + */ +export interface V1AzureDiskVolumeSource { + /** + * Host Caching mode: None, Read Only, Read Write. +optional + * @type {string} + * @memberof V1AzureDiskVolumeSource + */ + cachingMode?: string + /** + * The Name of the data disk in the blob storage + * @type {string} + * @memberof V1AzureDiskVolumeSource + */ + diskName?: string + /** + * The URI the data disk in the blob storage + * @type {string} + * @memberof V1AzureDiskVolumeSource + */ + diskURI?: string + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. +optional + * @type {string} + * @memberof V1AzureDiskVolumeSource + */ + fsType?: string + /** + * Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared + * @type {string} + * @memberof V1AzureDiskVolumeSource + */ + kind?: string + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. +optional + * @type {boolean} + * @memberof V1AzureDiskVolumeSource + */ + readOnly?: boolean +} +/** + * + * @export + * @interface V1AzureFileVolumeSource + */ +export interface V1AzureFileVolumeSource { + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. +optional + * @type {boolean} + * @memberof V1AzureFileVolumeSource + */ + readOnly?: boolean + /** + * the name of secret that contains Azure Storage Account Name and Key + * @type {string} + * @memberof V1AzureFileVolumeSource + */ + secretName?: string + /** + * Share Name + * @type {string} + * @memberof V1AzureFileVolumeSource + */ + shareName?: string +} +/** + * + * @export + * @interface V1CSIVolumeSource + */ +export interface V1CSIVolumeSource { + /** + * Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + * @type {string} + * @memberof V1CSIVolumeSource + */ + driver?: string + /** + * Filesystem type to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. +optional + * @type {string} + * @memberof V1CSIVolumeSource + */ + fsType?: string + /** + * + * @type {V1LocalObjectReference} + * @memberof V1CSIVolumeSource + */ + nodePublishSecretRef?: V1LocalObjectReference + /** + * Specifies a read-only configuration for the volume. Defaults to false (read/write). +optional + * @type {boolean} + * @memberof V1CSIVolumeSource + */ + readOnly?: boolean + /** + * VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver\'s documentation for supported values. +optional + * @type {{ [key: string]: string; }} + * @memberof V1CSIVolumeSource + */ + volumeAttributes?: { [key: string]: string } +} +/** + * + * @export + * @interface V1Capabilities + */ +export interface V1Capabilities { + /** + * Added capabilities +optional + * @type {Array} + * @memberof V1Capabilities + */ + add?: Array + /** + * Removed capabilities +optional + * @type {Array} + * @memberof V1Capabilities + */ + drop?: Array +} +/** + * + * @export + * @interface V1CephFSVolumeSource + */ +export interface V1CephFSVolumeSource { + /** + * Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * @type {Array} + * @memberof V1CephFSVolumeSource + */ + monitors?: Array + /** + * Optional: Used as the mounted root, rather than the full Ceph tree, default is / +optional + * @type {string} + * @memberof V1CephFSVolumeSource + */ + path?: string + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +optional + * @type {boolean} + * @memberof V1CephFSVolumeSource + */ + readOnly?: boolean + /** + * Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +optional + * @type {string} + * @memberof V1CephFSVolumeSource + */ + secretFile?: string + /** + * + * @type {V1LocalObjectReference} + * @memberof V1CephFSVolumeSource + */ + secretRef?: V1LocalObjectReference + /** + * Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it +optional + * @type {string} + * @memberof V1CephFSVolumeSource + */ + user?: string +} +/** + * + * @export + * @interface V1CinderVolumeSource + */ +export interface V1CinderVolumeSource { + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md +optional + * @type {string} + * @memberof V1CinderVolumeSource + */ + fsType?: string + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md +optional + * @type {boolean} + * @memberof V1CinderVolumeSource + */ + readOnly?: boolean + /** + * + * @type {V1LocalObjectReference} + * @memberof V1CinderVolumeSource + */ + secretRef?: V1LocalObjectReference + /** + * volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + * @type {string} + * @memberof V1CinderVolumeSource + */ + volumeID?: string +} +/** + * + * @export + * @interface V1ConfigMapEnvSource + */ +export interface V1ConfigMapEnvSource { + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1ConfigMapEnvSource + */ + name?: string + /** + * Specify whether the ConfigMap must be defined +optional + * @type {boolean} + * @memberof V1ConfigMapEnvSource + */ + optional?: boolean +} +/** + * + * @export + * @interface V1ConfigMapKeySelector + */ +export interface V1ConfigMapKeySelector { + /** + * The key to select. + * @type {string} + * @memberof V1ConfigMapKeySelector + */ + key?: string + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1ConfigMapKeySelector + */ + name?: string + /** + * Specify whether the ConfigMap or its key must be defined +optional + * @type {boolean} + * @memberof V1ConfigMapKeySelector + */ + optional?: boolean +} +/** + * + * @export + * @interface V1ConfigMapProjection + */ +export interface V1ConfigMapProjection { + /** + * If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. +optional + * @type {Array} + * @memberof V1ConfigMapProjection + */ + items?: Array + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1ConfigMapProjection + */ + name?: string + /** + * Specify whether the ConfigMap or its keys must be defined +optional + * @type {boolean} + * @memberof V1ConfigMapProjection + */ + optional?: boolean +} +/** + * + * @export + * @interface V1ConfigMapVolumeSource + */ +export interface V1ConfigMapVolumeSource { + /** + * Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. +optional + * @type {number} + * @memberof V1ConfigMapVolumeSource + */ + defaultMode?: number + /** + * If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. +optional + * @type {Array} + * @memberof V1ConfigMapVolumeSource + */ + items?: Array + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1ConfigMapVolumeSource + */ + name?: string + /** + * Specify whether the ConfigMap or its keys must be defined +optional + * @type {boolean} + * @memberof V1ConfigMapVolumeSource + */ + optional?: boolean +} +/** + * + * @export + * @interface V1Container + */ +export interface V1Container { + /** + * Arguments to the entrypoint. The docker image\'s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +optional + * @type {Array} + * @memberof V1Container + */ + args?: Array + /** + * Entrypoint array. Not executed within a shell. The docker image\'s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell +optional + * @type {Array} + * @memberof V1Container + */ + command?: Array + /** + * List of environment variables to set in the container. Cannot be updated. +optional +patchMergeKey=name +patchStrategy=merge + * @type {Array} + * @memberof V1Container + */ + env?: Array + /** + * List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. +optional + * @type {Array} + * @memberof V1Container + */ + envFrom?: Array + /** + * Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. +optional + * @type {string} + * @memberof V1Container + */ + image?: string + /** + * Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images +optional + * @type {string} + * @memberof V1Container + */ + imagePullPolicy?: string + /** + * + * @type {V1Lifecycle} + * @memberof V1Container + */ + lifecycle?: V1Lifecycle + /** + * + * @type {V1Probe} + * @memberof V1Container + */ + livenessProbe?: V1Probe + /** + * Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + * @type {string} + * @memberof V1Container + */ + name?: string + /** + * List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated. +optional +patchMergeKey=containerPort +patchStrategy=merge +listType=map +listMapKey=containerPort +listMapKey=protocol + * @type {Array} + * @memberof V1Container + */ + ports?: Array + /** + * + * @type {V1Probe} + * @memberof V1Container + */ + readinessProbe?: V1Probe + /** + * + * @type {V1ResourceRequirements} + * @memberof V1Container + */ + resources?: V1ResourceRequirements + /** + * + * @type {V1SecurityContext} + * @memberof V1Container + */ + securityContext?: V1SecurityContext + /** + * + * @type {V1Probe} + * @memberof V1Container + */ + startupProbe?: V1Probe + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. +optional + * @type {boolean} + * @memberof V1Container + */ + stdin?: boolean + /** + * Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false +optional + * @type {boolean} + * @memberof V1Container + */ + stdinOnce?: boolean + /** + * Optional: Path at which the file to which the container\'s termination message will be written is mounted into the container\'s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. +optional + * @type {string} + * @memberof V1Container + */ + terminationMessagePath?: string + /** + * Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. +optional + * @type {string} + * @memberof V1Container + */ + terminationMessagePolicy?: string + /** + * Whether this container should allocate a TTY for itself, also requires \'stdin\' to be true. Default is false. +optional + * @type {boolean} + * @memberof V1Container + */ + tty?: boolean + /** + * volumeDevices is the list of block devices to be used by the container. +patchMergeKey=devicePath +patchStrategy=merge +optional + * @type {Array} + * @memberof V1Container + */ + volumeDevices?: Array + /** + * Pod volumes to mount into the container\'s filesystem. Cannot be updated. +optional +patchMergeKey=mountPath +patchStrategy=merge + * @type {Array} + * @memberof V1Container + */ + volumeMounts?: Array + /** + * Container\'s working directory. If not specified, the container runtime\'s default will be used, which might be configured in the container image. Cannot be updated. +optional + * @type {string} + * @memberof V1Container + */ + workingDir?: string +} +/** + * + * @export + * @interface V1ContainerPort + */ +export interface V1ContainerPort { + /** + * Number of port to expose on the pod\'s IP address. This must be a valid port number, 0 < x < 65536. + * @type {number} + * @memberof V1ContainerPort + */ + containerPort?: number + /** + * What host IP to bind the external port to. +optional + * @type {string} + * @memberof V1ContainerPort + */ + hostIP?: string + /** + * Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. +optional + * @type {number} + * @memberof V1ContainerPort + */ + hostPort?: number + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. +optional + * @type {string} + * @memberof V1ContainerPort + */ + name?: string + /** + * Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\". +optional +default=\"TCP\" + * @type {string} + * @memberof V1ContainerPort + */ + protocol?: string +} +/** + * + * @export + * @interface V1DownwardAPIProjection + */ +export interface V1DownwardAPIProjection { + /** + * Items is a list of DownwardAPIVolume file +optional + * @type {Array} + * @memberof V1DownwardAPIProjection + */ + items?: Array +} +/** + * + * @export + * @interface V1DownwardAPIVolumeFile + */ +export interface V1DownwardAPIVolumeFile { + /** + * + * @type {V1ObjectFieldSelector} + * @memberof V1DownwardAPIVolumeFile + */ + fieldRef?: V1ObjectFieldSelector + /** + * Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. +optional + * @type {number} + * @memberof V1DownwardAPIVolumeFile + */ + mode?: number + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the \'..\' path. Must be utf-8 encoded. The first item of the relative path must not start with \'..\' + * @type {string} + * @memberof V1DownwardAPIVolumeFile + */ + path?: string + /** + * + * @type {V1ResourceFieldSelector} + * @memberof V1DownwardAPIVolumeFile + */ + resourceFieldRef?: V1ResourceFieldSelector +} +/** + * + * @export + * @interface V1DownwardAPIVolumeSource + */ +export interface V1DownwardAPIVolumeSource { + /** + * Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. +optional + * @type {number} + * @memberof V1DownwardAPIVolumeSource + */ + defaultMode?: number + /** + * Items is a list of downward API volume file +optional + * @type {Array} + * @memberof V1DownwardAPIVolumeSource + */ + items?: Array +} +/** + * + * @export + * @interface V1EmptyDirVolumeSource + */ +export interface V1EmptyDirVolumeSource { + /** + * What type of storage medium should back this directory. The default is \"\" which means to use the node\'s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir +optional + * @type {string} + * @memberof V1EmptyDirVolumeSource + */ + medium?: string + /** + * + * @type {ResourceQuantity} + * @memberof V1EmptyDirVolumeSource + */ + sizeLimit?: ResourceQuantity +} +/** + * + * @export + * @interface V1EnvFromSource + */ +export interface V1EnvFromSource { + /** + * + * @type {V1ConfigMapEnvSource} + * @memberof V1EnvFromSource + */ + configMapRef?: V1ConfigMapEnvSource + /** + * An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. +optional + * @type {string} + * @memberof V1EnvFromSource + */ + prefix?: string + /** + * + * @type {V1SecretEnvSource} + * @memberof V1EnvFromSource + */ + secretRef?: V1SecretEnvSource +} +/** + * + * @export + * @interface V1EnvVar + */ +export interface V1EnvVar { + /** + * Name of the environment variable. Must be a C_IDENTIFIER. + * @type {string} + * @memberof V1EnvVar + */ + name?: string + /** + * Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\". +optional + * @type {string} + * @memberof V1EnvVar + */ + value?: string + /** + * + * @type {V1EnvVarSource} + * @memberof V1EnvVar + */ + valueFrom?: V1EnvVarSource +} +/** + * + * @export + * @interface V1EnvVarSource + */ +export interface V1EnvVarSource { + /** + * + * @type {V1ConfigMapKeySelector} + * @memberof V1EnvVarSource + */ + configMapKeyRef?: V1ConfigMapKeySelector + /** + * + * @type {V1ObjectFieldSelector} + * @memberof V1EnvVarSource + */ + fieldRef?: V1ObjectFieldSelector + /** + * + * @type {V1ResourceFieldSelector} + * @memberof V1EnvVarSource + */ + resourceFieldRef?: V1ResourceFieldSelector + /** + * + * @type {V1SecretKeySelector} + * @memberof V1EnvVarSource + */ + secretKeyRef?: V1SecretKeySelector +} +/** + * + * @export + * @interface V1EphemeralVolumeSource + */ +export interface V1EphemeralVolumeSource { + /** + * + * @type {V1PersistentVolumeClaimTemplate} + * @memberof V1EphemeralVolumeSource + */ + volumeClaimTemplate?: V1PersistentVolumeClaimTemplate +} +/** + * + * @export + * @interface V1ExecAction + */ +export interface V1ExecAction { + /** + * Command is the command line to execute inside the container, the working directory for the command is root (\'/\') in the container\'s filesystem. The command is simply exec\'d, it is not run inside a shell, so traditional shell instructions (\'|\', etc) won\'t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. +optional + * @type {Array} + * @memberof V1ExecAction + */ + command?: Array +} +/** + * + * @export + * @interface V1FCVolumeSource + */ +export interface V1FCVolumeSource { + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. TODO: how do we prevent errors in the filesystem from compromising the machine +optional + * @type {string} + * @memberof V1FCVolumeSource + */ + fsType?: string + /** + * Optional: FC target lun number +optional + * @type {number} + * @memberof V1FCVolumeSource + */ + lun?: number + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. +optional + * @type {boolean} + * @memberof V1FCVolumeSource + */ + readOnly?: boolean + /** + * Optional: FC target worldwide names (WWNs) +optional + * @type {Array} + * @memberof V1FCVolumeSource + */ + targetWWNs?: Array + /** + * Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. +optional + * @type {Array} + * @memberof V1FCVolumeSource + */ + wwids?: Array +} +/** + * + * @export + * @interface V1FlexVolumeSource + */ +export interface V1FlexVolumeSource { + /** + * Driver is the name of the driver to use for this volume. + * @type {string} + * @memberof V1FlexVolumeSource + */ + driver?: string + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script. +optional + * @type {string} + * @memberof V1FlexVolumeSource + */ + fsType?: string + /** + * Optional: Extra command options if any. +optional + * @type {{ [key: string]: string; }} + * @memberof V1FlexVolumeSource + */ + options?: { [key: string]: string } + /** + * Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. +optional + * @type {boolean} + * @memberof V1FlexVolumeSource + */ + readOnly?: boolean + /** + * + * @type {V1LocalObjectReference} + * @memberof V1FlexVolumeSource + */ + secretRef?: V1LocalObjectReference +} +/** + * + * @export + * @interface V1FlockerVolumeSource + */ +export interface V1FlockerVolumeSource { + /** + * Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated +optional + * @type {string} + * @memberof V1FlockerVolumeSource + */ + datasetName?: string + /** + * UUID of the dataset. This is unique identifier of a Flocker dataset +optional + * @type {string} + * @memberof V1FlockerVolumeSource + */ + datasetUUID?: string +} +/** + * + * @export + * @interface V1GCEPersistentDiskVolumeSource + */ +export interface V1GCEPersistentDiskVolumeSource { + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine +optional + * @type {string} + * @memberof V1GCEPersistentDiskVolumeSource + */ + fsType?: string + /** + * The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk +optional + * @type {number} + * @memberof V1GCEPersistentDiskVolumeSource + */ + partition?: number + /** + * Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * @type {string} + * @memberof V1GCEPersistentDiskVolumeSource + */ + pdName?: string + /** + * ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk +optional + * @type {boolean} + * @memberof V1GCEPersistentDiskVolumeSource + */ + readOnly?: boolean +} +/** + * + * @export + * @interface V1GRPCAction + */ +export interface V1GRPCAction { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + * @type {number} + * @memberof V1GRPCAction + */ + port?: number + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. +optional +default=\"\" + * @type {string} + * @memberof V1GRPCAction + */ + service?: string +} +/** + * + * @export + * @interface V1GitRepoVolumeSource + */ +export interface V1GitRepoVolumeSource { + /** + * Target directory name. Must not contain or start with \'..\'. If \'.\' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. +optional + * @type {string} + * @memberof V1GitRepoVolumeSource + */ + directory?: string + /** + * Repository URL + * @type {string} + * @memberof V1GitRepoVolumeSource + */ + repository?: string + /** + * Commit hash for the specified revision. +optional + * @type {string} + * @memberof V1GitRepoVolumeSource + */ + revision?: string +} +/** + * + * @export + * @interface V1GlusterfsVolumeSource + */ +export interface V1GlusterfsVolumeSource { + /** + * EndpointsName is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + * @type {string} + * @memberof V1GlusterfsVolumeSource + */ + endpoints?: string + /** + * Path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + * @type {string} + * @memberof V1GlusterfsVolumeSource + */ + path?: string + /** + * ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod +optional + * @type {boolean} + * @memberof V1GlusterfsVolumeSource + */ + readOnly?: boolean +} +/** + * + * @export + * @interface V1HTTPGetAction + */ +export interface V1HTTPGetAction { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead. +optional + * @type {string} + * @memberof V1HTTPGetAction + */ + host?: string + /** + * Custom headers to set in the request. HTTP allows repeated headers. +optional + * @type {Array} + * @memberof V1HTTPGetAction + */ + httpHeaders?: Array + /** + * Path to access on the HTTP server. +optional + * @type {string} + * @memberof V1HTTPGetAction + */ + path?: string + /** + * + * @type {IntstrIntOrString} + * @memberof V1HTTPGetAction + */ + port?: IntstrIntOrString + /** + * Scheme to use for connecting to the host. Defaults to HTTP. +optional + * @type {string} + * @memberof V1HTTPGetAction + */ + scheme?: string +} +/** + * + * @export + * @interface V1HTTPHeader + */ +export interface V1HTTPHeader { + /** + * The header field name + * @type {string} + * @memberof V1HTTPHeader + */ + name?: string + /** + * The header field value + * @type {string} + * @memberof V1HTTPHeader + */ + value?: string +} +/** + * + * @export + * @interface V1HostPathVolumeSource + */ +export interface V1HostPathVolumeSource { + /** + * Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + * @type {string} + * @memberof V1HostPathVolumeSource + */ + path?: string + /** + * Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath +optional + * @type {string} + * @memberof V1HostPathVolumeSource + */ + type?: string +} +/** + * + * @export + * @interface V1ISCSIVolumeSource + */ +export interface V1ISCSIVolumeSource { + /** + * whether support iSCSI Discovery CHAP authentication +optional + * @type {boolean} + * @memberof V1ISCSIVolumeSource + */ + chapAuthDiscovery?: boolean + /** + * whether support iSCSI Session CHAP authentication +optional + * @type {boolean} + * @memberof V1ISCSIVolumeSource + */ + chapAuthSession?: boolean + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine +optional + * @type {string} + * @memberof V1ISCSIVolumeSource + */ + fsType?: string + /** + * Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. +optional + * @type {string} + * @memberof V1ISCSIVolumeSource + */ + initiatorName?: string + /** + * Target iSCSI Qualified Name. + * @type {string} + * @memberof V1ISCSIVolumeSource + */ + iqn?: string + /** + * iSCSI Interface Name that uses an iSCSI transport. Defaults to \'default\' (tcp). +optional + * @type {string} + * @memberof V1ISCSIVolumeSource + */ + iscsiInterface?: string + /** + * iSCSI Target Lun number. + * @type {number} + * @memberof V1ISCSIVolumeSource + */ + lun?: number + /** + * iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). +optional + * @type {Array} + * @memberof V1ISCSIVolumeSource + */ + portals?: Array + /** + * ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. +optional + * @type {boolean} + * @memberof V1ISCSIVolumeSource + */ + readOnly?: boolean + /** + * + * @type {V1LocalObjectReference} + * @memberof V1ISCSIVolumeSource + */ + secretRef?: V1LocalObjectReference + /** + * iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + * @type {string} + * @memberof V1ISCSIVolumeSource + */ + targetPortal?: string +} +/** + * + * @export + * @interface V1KeyToPath + */ +export interface V1KeyToPath { + /** + * The key to project. + * @type {string} + * @memberof V1KeyToPath + */ + key?: string + /** + * Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. +optional + * @type {number} + * @memberof V1KeyToPath + */ + mode?: number + /** + * The relative path of the file to map the key to. May not be an absolute path. May not contain the path element \'..\'. May not start with the string \'..\'. + * @type {string} + * @memberof V1KeyToPath + */ + path?: string +} +/** + * + * @export + * @interface V1LabelSelector + */ +export interface V1LabelSelector { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. +optional + * @type {Array} + * @memberof V1LabelSelector + */ + matchExpressions?: Array + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed. +optional + * @type {{ [key: string]: string; }} + * @memberof V1LabelSelector + */ + matchLabels?: { [key: string]: string } +} +/** + * + * @export + * @interface V1LabelSelectorRequirement + */ +export interface V1LabelSelectorRequirement { + /** + * key is the label key that the selector applies to. +patchMergeKey=key +patchStrategy=merge + * @type {string} + * @memberof V1LabelSelectorRequirement + */ + key?: string + /** + * operator represents a key\'s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + * @type {string} + * @memberof V1LabelSelectorRequirement + */ + operator?: string + /** + * values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. +optional + * @type {Array} + * @memberof V1LabelSelectorRequirement + */ + values?: Array +} +/** + * + * @export + * @interface V1Lifecycle + */ +export interface V1Lifecycle { + /** + * + * @type {V1LifecycleHandler} + * @memberof V1Lifecycle + */ + postStart?: V1LifecycleHandler + /** + * + * @type {V1LifecycleHandler} + * @memberof V1Lifecycle + */ + preStop?: V1LifecycleHandler +} +/** + * + * @export + * @interface V1LifecycleHandler + */ +export interface V1LifecycleHandler { + /** + * + * @type {V1ExecAction} + * @memberof V1LifecycleHandler + */ + exec?: V1ExecAction + /** + * + * @type {V1HTTPGetAction} + * @memberof V1LifecycleHandler + */ + httpGet?: V1HTTPGetAction + /** + * + * @type {V1TCPSocketAction} + * @memberof V1LifecycleHandler + */ + tcpSocket?: V1TCPSocketAction +} +/** + * + * @export + * @interface V1LocalObjectReference + */ +export interface V1LocalObjectReference { + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1LocalObjectReference + */ + name?: string +} +/** + * + * @export + * @interface V1ManagedFieldsEntry + */ +export interface V1ManagedFieldsEntry { + /** + * APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. + * @type {string} + * @memberof V1ManagedFieldsEntry + */ + apiVersion?: string + /** + * FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\" + * @type {string} + * @memberof V1ManagedFieldsEntry + */ + fieldsType?: string + /** + * + * @type {object} + * @memberof V1ManagedFieldsEntry + */ + fieldsV1?: object + /** + * Manager is an identifier of the workflow managing these fields. + * @type {string} + * @memberof V1ManagedFieldsEntry + */ + manager?: string + /** + * Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are \'Apply\' and \'Update\'. + * @type {string} + * @memberof V1ManagedFieldsEntry + */ + operation?: string + /** + * Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource. + * @type {string} + * @memberof V1ManagedFieldsEntry + */ + subresource?: string + /** + * Time is timestamp of when these fields were set. It should always be empty if Operation is \'Apply\' +optional + * @type {string} + * @memberof V1ManagedFieldsEntry + */ + time?: string +} +/** + * + * @export + * @interface V1NFSVolumeSource + */ +export interface V1NFSVolumeSource { + /** + * Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * @type {string} + * @memberof V1NFSVolumeSource + */ + path?: string + /** + * ReadOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs +optional + * @type {boolean} + * @memberof V1NFSVolumeSource + */ + readOnly?: boolean + /** + * Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * @type {string} + * @memberof V1NFSVolumeSource + */ + server?: string +} +/** + * + * @export + * @interface V1ObjectFieldSelector + */ +export interface V1ObjectFieldSelector { + /** + * Version of the schema the FieldPath is written in terms of, defaults to \"v1\". +optional + * @type {string} + * @memberof V1ObjectFieldSelector + */ + apiVersion?: string + /** + * Path of the field to select in the specified API version. + * @type {string} + * @memberof V1ObjectFieldSelector + */ + fieldPath?: string +} +/** + * + * @export + * @interface V1ObjectReference + */ +export interface V1ObjectReference { + /** + * API version of the referent. +optional + * @type {string} + * @memberof V1ObjectReference + */ + apiVersion?: string + /** + * If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: \"spec.containers{name}\" (where \"name\" refers to the name of the container that triggered the event) or if no container name is specified \"spec.containers[2]\" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future. +optional + * @type {string} + * @memberof V1ObjectReference + */ + fieldPath?: string + /** + * Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional + * @type {string} + * @memberof V1ObjectReference + */ + kind?: string + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names +optional + * @type {string} + * @memberof V1ObjectReference + */ + name?: string + /** + * Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ +optional + * @type {string} + * @memberof V1ObjectReference + */ + namespace?: string + /** + * Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +optional + * @type {string} + * @memberof V1ObjectReference + */ + resourceVersion?: string + /** + * UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids +optional + * @type {string} + * @memberof V1ObjectReference + */ + uid?: string +} +/** + * + * @export + * @interface V1OwnerReference + */ +export interface V1OwnerReference { + /** + * API version of the referent. + * @type {string} + * @memberof V1OwnerReference + */ + apiVersion?: string + /** + * If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. +optional + * @type {boolean} + * @memberof V1OwnerReference + */ + blockOwnerDeletion?: boolean + /** + * If true, this reference points to the managing controller. +optional + * @type {boolean} + * @memberof V1OwnerReference + */ + controller?: boolean + /** + * Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * @type {string} + * @memberof V1OwnerReference + */ + kind?: string + /** + * Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names + * @type {string} + * @memberof V1OwnerReference + */ + name?: string + /** + * UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + * @type {string} + * @memberof V1OwnerReference + */ + uid?: string +} +/** + * + * @export + * @interface V1PersistentVolumeClaimSpec + */ +export interface V1PersistentVolumeClaimSpec { + /** + * AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 +optional + * @type {Array} + * @memberof V1PersistentVolumeClaimSpec + */ + accessModes?: Array + /** + * + * @type {V1TypedLocalObjectReference} + * @memberof V1PersistentVolumeClaimSpec + */ + dataSource?: V1TypedLocalObjectReference + /** + * + * @type {V1TypedLocalObjectReference} + * @memberof V1PersistentVolumeClaimSpec + */ + dataSourceRef?: V1TypedLocalObjectReference + /** + * + * @type {V1ResourceRequirements} + * @memberof V1PersistentVolumeClaimSpec + */ + resources?: V1ResourceRequirements + /** + * + * @type {V1LabelSelector} + * @memberof V1PersistentVolumeClaimSpec + */ + selector?: V1LabelSelector + /** + * Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 +optional + * @type {string} + * @memberof V1PersistentVolumeClaimSpec + */ + storageClassName?: string + /** + * volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. +optional + * @type {string} + * @memberof V1PersistentVolumeClaimSpec + */ + volumeMode?: string + /** + * VolumeName is the binding reference to the PersistentVolume backing this claim. +optional + * @type {string} + * @memberof V1PersistentVolumeClaimSpec + */ + volumeName?: string +} +/** + * + * @export + * @interface V1PersistentVolumeClaimTemplate + */ +export interface V1PersistentVolumeClaimTemplate { + /** + * Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations +optional + * @type {{ [key: string]: string; }} + * @memberof V1PersistentVolumeClaimTemplate + */ + annotations?: { [key: string]: string } + /** + * The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + clusterName?: string + /** + * CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + creationTimestamp?: string + /** + * Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. +optional + * @type {number} + * @memberof V1PersistentVolumeClaimTemplate + */ + deletionGracePeriodSeconds?: number + /** + * DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + deletionTimestamp?: string + /** + * Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. +optional +patchStrategy=merge + * @type {Array} + * @memberof V1PersistentVolumeClaimTemplate + */ + finalizers?: Array + /** + * GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + generateName?: string + /** + * A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. +optional + * @type {number} + * @memberof V1PersistentVolumeClaimTemplate + */ + generation?: number + /** + * Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels +optional + * @type {{ [key: string]: string; }} + * @memberof V1PersistentVolumeClaimTemplate + */ + labels?: { [key: string]: string } + /** + * ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn\'t need to set or understand this field. A workflow can be the user\'s name, a controller\'s name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object. +optional + * @type {Array} + * @memberof V1PersistentVolumeClaimTemplate + */ + managedFields?: Array + /** + * Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + name?: string + /** + * Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + namespace?: string + /** + * List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. +optional +patchMergeKey=uid +patchStrategy=merge + * @type {Array} + * @memberof V1PersistentVolumeClaimTemplate + */ + ownerReferences?: Array + /** + * An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + resourceVersion?: string + /** + * SelfLink is a URL representing this object. Populated by the system. Read-only. DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release. +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + selfLink?: string + /** + * + * @type {V1PersistentVolumeClaimSpec} + * @memberof V1PersistentVolumeClaimTemplate + */ + spec?: V1PersistentVolumeClaimSpec + /** + * UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids +optional + * @type {string} + * @memberof V1PersistentVolumeClaimTemplate + */ + uid?: string +} +/** + * + * @export + * @interface V1PersistentVolumeClaimVolumeSource + */ +export interface V1PersistentVolumeClaimVolumeSource { + /** + * ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + * @type {string} + * @memberof V1PersistentVolumeClaimVolumeSource + */ + claimName?: string + /** + * Will force the ReadOnly setting in VolumeMounts. Default false. +optional + * @type {boolean} + * @memberof V1PersistentVolumeClaimVolumeSource + */ + readOnly?: boolean +} +/** + * + * @export + * @interface V1PhotonPersistentDiskVolumeSource + */ +export interface V1PhotonPersistentDiskVolumeSource { + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * @type {string} + * @memberof V1PhotonPersistentDiskVolumeSource + */ + fsType?: string + /** + * ID that identifies Photon Controller persistent disk + * @type {string} + * @memberof V1PhotonPersistentDiskVolumeSource + */ + pdID?: string +} +/** + * + * @export + * @interface V1PortworxVolumeSource + */ +export interface V1PortworxVolumeSource { + /** + * FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified. + * @type {string} + * @memberof V1PortworxVolumeSource + */ + fsType?: string + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. +optional + * @type {boolean} + * @memberof V1PortworxVolumeSource + */ + readOnly?: boolean + /** + * VolumeID uniquely identifies a Portworx volume + * @type {string} + * @memberof V1PortworxVolumeSource + */ + volumeID?: string +} +/** + * + * @export + * @interface V1Probe + */ +export interface V1Probe { + /** + * + * @type {V1ExecAction} + * @memberof V1Probe + */ + exec?: V1ExecAction + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. +optional + * @type {number} + * @memberof V1Probe + */ + failureThreshold?: number + /** + * + * @type {V1GRPCAction} + * @memberof V1Probe + */ + grpc?: V1GRPCAction + /** + * + * @type {V1HTTPGetAction} + * @memberof V1Probe + */ + httpGet?: V1HTTPGetAction + /** + * Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +optional + * @type {number} + * @memberof V1Probe + */ + initialDelaySeconds?: number + /** + * How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. +optional + * @type {number} + * @memberof V1Probe + */ + periodSeconds?: number + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. +optional + * @type {number} + * @memberof V1Probe + */ + successThreshold?: number + /** + * + * @type {V1TCPSocketAction} + * @memberof V1Probe + */ + tcpSocket?: V1TCPSocketAction + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod\'s terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. +optional + * @type {number} + * @memberof V1Probe + */ + terminationGracePeriodSeconds?: number + /** + * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +optional + * @type {number} + * @memberof V1Probe + */ + timeoutSeconds?: number +} +/** + * + * @export + * @interface V1ProjectedVolumeSource + */ +export interface V1ProjectedVolumeSource { + /** + * Mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. +optional + * @type {number} + * @memberof V1ProjectedVolumeSource + */ + defaultMode?: number + /** + * list of volume projections +optional + * @type {Array} + * @memberof V1ProjectedVolumeSource + */ + sources?: Array +} +/** + * + * @export + * @interface V1QuobyteVolumeSource + */ +export interface V1QuobyteVolumeSource { + /** + * Group to map volume access to Default is no group +optional + * @type {string} + * @memberof V1QuobyteVolumeSource + */ + group?: string + /** + * ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. +optional + * @type {boolean} + * @memberof V1QuobyteVolumeSource + */ + readOnly?: boolean + /** + * Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes + * @type {string} + * @memberof V1QuobyteVolumeSource + */ + registry?: string + /** + * Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin +optional + * @type {string} + * @memberof V1QuobyteVolumeSource + */ + tenant?: string + /** + * User to map volume access to Defaults to serivceaccount user +optional + * @type {string} + * @memberof V1QuobyteVolumeSource + */ + user?: string + /** + * Volume is a string that references an already created Quobyte volume by name. + * @type {string} + * @memberof V1QuobyteVolumeSource + */ + volume?: string +} +/** + * + * @export + * @interface V1RBDVolumeSource + */ +export interface V1RBDVolumeSource { + /** + * Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine +optional + * @type {string} + * @memberof V1RBDVolumeSource + */ + fsType?: string + /** + * The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @type {string} + * @memberof V1RBDVolumeSource + */ + image?: string + /** + * Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +optional + * @type {string} + * @memberof V1RBDVolumeSource + */ + keyring?: string + /** + * A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * @type {Array} + * @memberof V1RBDVolumeSource + */ + monitors?: Array + /** + * The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +optional + * @type {string} + * @memberof V1RBDVolumeSource + */ + pool?: string + /** + * ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +optional + * @type {boolean} + * @memberof V1RBDVolumeSource + */ + readOnly?: boolean + /** + * + * @type {V1LocalObjectReference} + * @memberof V1RBDVolumeSource + */ + secretRef?: V1LocalObjectReference + /** + * The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it +optional + * @type {string} + * @memberof V1RBDVolumeSource + */ + user?: string +} +/** + * + * @export + * @interface V1ResourceFieldSelector + */ +export interface V1ResourceFieldSelector { + /** + * Container name: required for volumes, optional for env vars +optional + * @type {string} + * @memberof V1ResourceFieldSelector + */ + containerName?: string + /** + * + * @type {ResourceQuantity} + * @memberof V1ResourceFieldSelector + */ + divisor?: ResourceQuantity + /** + * Required: resource to select + * @type {string} + * @memberof V1ResourceFieldSelector + */ + resource?: string +} +/** + * + * @export + * @interface V1ResourceRequirements + */ +export interface V1ResourceRequirements { + /** + * + * @type {{ [key: string]: ResourceQuantity; }} + * @memberof V1ResourceRequirements + */ + limits?: { [key: string]: ResourceQuantity } + /** + * + * @type {{ [key: string]: ResourceQuantity; }} + * @memberof V1ResourceRequirements + */ + requests?: { [key: string]: ResourceQuantity } +} +/** + * + * @export + * @interface V1SELinuxOptions + */ +export interface V1SELinuxOptions { + /** + * Level is SELinux level label that applies to the container. +optional + * @type {string} + * @memberof V1SELinuxOptions + */ + level?: string + /** + * Role is a SELinux role label that applies to the container. +optional + * @type {string} + * @memberof V1SELinuxOptions + */ + role?: string + /** + * Type is a SELinux type label that applies to the container. +optional + * @type {string} + * @memberof V1SELinuxOptions + */ + type?: string + /** + * User is a SELinux user label that applies to the container. +optional + * @type {string} + * @memberof V1SELinuxOptions + */ + user?: string +} +/** + * + * @export + * @interface V1ScaleIOVolumeSource + */ +export interface V1ScaleIOVolumeSource { + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\". +optional + * @type {string} + * @memberof V1ScaleIOVolumeSource + */ + fsType?: string + /** + * The host address of the ScaleIO API Gateway. + * @type {string} + * @memberof V1ScaleIOVolumeSource + */ + gateway?: string + /** + * The name of the ScaleIO Protection Domain for the configured storage. +optional + * @type {string} + * @memberof V1ScaleIOVolumeSource + */ + protectionDomain?: string + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. +optional + * @type {boolean} + * @memberof V1ScaleIOVolumeSource + */ + readOnly?: boolean + /** + * + * @type {V1LocalObjectReference} + * @memberof V1ScaleIOVolumeSource + */ + secretRef?: V1LocalObjectReference + /** + * Flag to enable/disable SSL communication with Gateway, default false +optional + * @type {boolean} + * @memberof V1ScaleIOVolumeSource + */ + sslEnabled?: boolean + /** + * Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. +optional + * @type {string} + * @memberof V1ScaleIOVolumeSource + */ + storageMode?: string + /** + * The ScaleIO Storage Pool associated with the protection domain. +optional + * @type {string} + * @memberof V1ScaleIOVolumeSource + */ + storagePool?: string + /** + * The name of the storage system as configured in ScaleIO. + * @type {string} + * @memberof V1ScaleIOVolumeSource + */ + system?: string + /** + * The name of a volume already created in the ScaleIO system that is associated with this volume source. + * @type {string} + * @memberof V1ScaleIOVolumeSource + */ + volumeName?: string +} +/** + * + * @export + * @interface V1SeccompProfile + */ +export interface V1SeccompProfile { + /** + * localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet\'s configured seccomp profile location. Must only be set if type is \"Localhost\". +optional + * @type {string} + * @memberof V1SeccompProfile + */ + localhostProfile?: string + /** + * type indicates which kind of seccomp profile will be applied. Valid options are: Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. +unionDiscriminator + * @type {string} + * @memberof V1SeccompProfile + */ + type?: string +} +/** + * + * @export + * @interface V1SecretEnvSource + */ +export interface V1SecretEnvSource { + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1SecretEnvSource + */ + name?: string + /** + * Specify whether the Secret must be defined +optional + * @type {boolean} + * @memberof V1SecretEnvSource + */ + optional?: boolean +} +/** + * + * @export + * @interface V1SecretKeySelector + */ +export interface V1SecretKeySelector { + /** + * The key of the secret to select from. Must be a valid secret key. + * @type {string} + * @memberof V1SecretKeySelector + */ + key?: string + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1SecretKeySelector + */ + name?: string + /** + * Specify whether the Secret or its key must be defined +optional + * @type {boolean} + * @memberof V1SecretKeySelector + */ + optional?: boolean +} +/** + * + * @export + * @interface V1SecretProjection + */ +export interface V1SecretProjection { + /** + * If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. +optional + * @type {Array} + * @memberof V1SecretProjection + */ + items?: Array + /** + * Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid? +optional + * @type {string} + * @memberof V1SecretProjection + */ + name?: string + /** + * Specify whether the Secret or its key must be defined +optional + * @type {boolean} + * @memberof V1SecretProjection + */ + optional?: boolean +} +/** + * + * @export + * @interface V1SecretVolumeSource + */ +export interface V1SecretVolumeSource { + /** + * Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. +optional + * @type {number} + * @memberof V1SecretVolumeSource + */ + defaultMode?: number + /** + * If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. +optional + * @type {Array} + * @memberof V1SecretVolumeSource + */ + items?: Array + /** + * Specify whether the Secret or its keys must be defined +optional + * @type {boolean} + * @memberof V1SecretVolumeSource + */ + optional?: boolean + /** + * Name of the secret in the pod\'s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret +optional + * @type {string} + * @memberof V1SecretVolumeSource + */ + secretName?: string +} +/** + * + * @export + * @interface V1SecurityContext + */ +export interface V1SecurityContext { + /** + * AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows. +optional + * @type {boolean} + * @memberof V1SecurityContext + */ + allowPrivilegeEscalation?: boolean + /** + * + * @type {V1Capabilities} + * @memberof V1SecurityContext + */ + capabilities?: V1Capabilities + /** + * Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows. +optional + * @type {boolean} + * @memberof V1SecurityContext + */ + privileged?: boolean + /** + * procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows. +optional + * @type {string} + * @memberof V1SecurityContext + */ + procMount?: string + /** + * Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows. +optional + * @type {boolean} + * @memberof V1SecurityContext + */ + readOnlyRootFilesystem?: boolean + /** + * The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional + * @type {number} + * @memberof V1SecurityContext + */ + runAsGroup?: number + /** + * Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +optional + * @type {boolean} + * @memberof V1SecurityContext + */ + runAsNonRoot?: boolean + /** + * The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows. +optional + * @type {number} + * @memberof V1SecurityContext + */ + runAsUser?: number + /** + * + * @type {V1SELinuxOptions} + * @memberof V1SecurityContext + */ + seLinuxOptions?: V1SELinuxOptions + /** + * + * @type {V1SeccompProfile} + * @memberof V1SecurityContext + */ + seccompProfile?: V1SeccompProfile + /** + * + * @type {V1WindowsSecurityContextOptions} + * @memberof V1SecurityContext + */ + windowsOptions?: V1WindowsSecurityContextOptions +} +/** + * + * @export + * @interface V1ServiceAccountTokenProjection + */ +export interface V1ServiceAccountTokenProjection { + /** + * Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. +optional + * @type {string} + * @memberof V1ServiceAccountTokenProjection + */ + audience?: string + /** + * ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. +optional + * @type {number} + * @memberof V1ServiceAccountTokenProjection + */ + expirationSeconds?: number + /** + * Path is the path relative to the mount point of the file to project the token into. + * @type {string} + * @memberof V1ServiceAccountTokenProjection + */ + path?: string +} +/** + * + * @export + * @interface V1StorageOSVolumeSource + */ +export interface V1StorageOSVolumeSource { + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. +optional + * @type {string} + * @memberof V1StorageOSVolumeSource + */ + fsType?: string + /** + * Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. +optional + * @type {boolean} + * @memberof V1StorageOSVolumeSource + */ + readOnly?: boolean + /** + * + * @type {V1LocalObjectReference} + * @memberof V1StorageOSVolumeSource + */ + secretRef?: V1LocalObjectReference + /** + * VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + * @type {string} + * @memberof V1StorageOSVolumeSource + */ + volumeName?: string + /** + * VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod\'s namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. +optional + * @type {string} + * @memberof V1StorageOSVolumeSource + */ + volumeNamespace?: string +} +/** + * + * @export + * @interface V1TCPSocketAction + */ +export interface V1TCPSocketAction { + /** + * Optional: Host name to connect to, defaults to the pod IP. +optional + * @type {string} + * @memberof V1TCPSocketAction + */ + host?: string + /** + * + * @type {IntstrIntOrString} + * @memberof V1TCPSocketAction + */ + port?: IntstrIntOrString +} +/** + * + * @export + * @interface V1TypedLocalObjectReference + */ +export interface V1TypedLocalObjectReference { + /** + * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. +optional + * @type {string} + * @memberof V1TypedLocalObjectReference + */ + apiGroup?: string + /** + * Kind is the type of resource being referenced + * @type {string} + * @memberof V1TypedLocalObjectReference + */ + kind?: string + /** + * Name is the name of resource being referenced + * @type {string} + * @memberof V1TypedLocalObjectReference + */ + name?: string +} +/** + * + * @export + * @interface V1Volume + */ +export interface V1Volume { + /** + * + * @type {V1AWSElasticBlockStoreVolumeSource} + * @memberof V1Volume + */ + awsElasticBlockStore?: V1AWSElasticBlockStoreVolumeSource + /** + * + * @type {V1AzureDiskVolumeSource} + * @memberof V1Volume + */ + azureDisk?: V1AzureDiskVolumeSource + /** + * + * @type {V1AzureFileVolumeSource} + * @memberof V1Volume + */ + azureFile?: V1AzureFileVolumeSource + /** + * + * @type {V1CephFSVolumeSource} + * @memberof V1Volume + */ + cephfs?: V1CephFSVolumeSource + /** + * + * @type {V1CinderVolumeSource} + * @memberof V1Volume + */ + cinder?: V1CinderVolumeSource + /** + * + * @type {V1ConfigMapVolumeSource} + * @memberof V1Volume + */ + configMap?: V1ConfigMapVolumeSource + /** + * + * @type {V1CSIVolumeSource} + * @memberof V1Volume + */ + csi?: V1CSIVolumeSource + /** + * + * @type {V1DownwardAPIVolumeSource} + * @memberof V1Volume + */ + downwardAPI?: V1DownwardAPIVolumeSource + /** + * + * @type {V1EmptyDirVolumeSource} + * @memberof V1Volume + */ + emptyDir?: V1EmptyDirVolumeSource + /** + * + * @type {V1EphemeralVolumeSource} + * @memberof V1Volume + */ + ephemeral?: V1EphemeralVolumeSource + /** + * + * @type {V1FCVolumeSource} + * @memberof V1Volume + */ + fc?: V1FCVolumeSource + /** + * + * @type {V1FlexVolumeSource} + * @memberof V1Volume + */ + flexVolume?: V1FlexVolumeSource + /** + * + * @type {V1FlockerVolumeSource} + * @memberof V1Volume + */ + flocker?: V1FlockerVolumeSource + /** + * + * @type {V1GCEPersistentDiskVolumeSource} + * @memberof V1Volume + */ + gcePersistentDisk?: V1GCEPersistentDiskVolumeSource + /** + * + * @type {V1GitRepoVolumeSource} + * @memberof V1Volume + */ + gitRepo?: V1GitRepoVolumeSource + /** + * + * @type {V1GlusterfsVolumeSource} + * @memberof V1Volume + */ + glusterfs?: V1GlusterfsVolumeSource + /** + * + * @type {V1HostPathVolumeSource} + * @memberof V1Volume + */ + hostPath?: V1HostPathVolumeSource + /** + * + * @type {V1ISCSIVolumeSource} + * @memberof V1Volume + */ + iscsi?: V1ISCSIVolumeSource + /** + * Volume\'s name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * @type {string} + * @memberof V1Volume + */ + name?: string + /** + * + * @type {V1NFSVolumeSource} + * @memberof V1Volume + */ + nfs?: V1NFSVolumeSource + /** + * + * @type {V1PersistentVolumeClaimVolumeSource} + * @memberof V1Volume + */ + persistentVolumeClaim?: V1PersistentVolumeClaimVolumeSource + /** + * + * @type {V1PhotonPersistentDiskVolumeSource} + * @memberof V1Volume + */ + photonPersistentDisk?: V1PhotonPersistentDiskVolumeSource + /** + * + * @type {V1PortworxVolumeSource} + * @memberof V1Volume + */ + portworxVolume?: V1PortworxVolumeSource + /** + * + * @type {V1ProjectedVolumeSource} + * @memberof V1Volume + */ + projected?: V1ProjectedVolumeSource + /** + * + * @type {V1QuobyteVolumeSource} + * @memberof V1Volume + */ + quobyte?: V1QuobyteVolumeSource + /** + * + * @type {V1RBDVolumeSource} + * @memberof V1Volume + */ + rbd?: V1RBDVolumeSource + /** + * + * @type {V1ScaleIOVolumeSource} + * @memberof V1Volume + */ + scaleIO?: V1ScaleIOVolumeSource + /** + * + * @type {V1SecretVolumeSource} + * @memberof V1Volume + */ + secret?: V1SecretVolumeSource + /** + * + * @type {V1StorageOSVolumeSource} + * @memberof V1Volume + */ + storageos?: V1StorageOSVolumeSource + /** + * + * @type {V1VsphereVirtualDiskVolumeSource} + * @memberof V1Volume + */ + vsphereVolume?: V1VsphereVirtualDiskVolumeSource +} +/** + * + * @export + * @interface V1VolumeDevice + */ +export interface V1VolumeDevice { + /** + * devicePath is the path inside of the container that the device will be mapped to. + * @type {string} + * @memberof V1VolumeDevice + */ + devicePath?: string + /** + * name must match the name of a persistentVolumeClaim in the pod + * @type {string} + * @memberof V1VolumeDevice + */ + name?: string +} +/** + * + * @export + * @interface V1VolumeMount + */ +export interface V1VolumeMount { + /** + * Path within the container at which the volume should be mounted. Must not contain \':\'. + * @type {string} + * @memberof V1VolumeMount + */ + mountPath?: string + /** + * mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. +optional + * @type {string} + * @memberof V1VolumeMount + */ + mountPropagation?: string + /** + * This must match the Name of a Volume. + * @type {string} + * @memberof V1VolumeMount + */ + name?: string + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. +optional + * @type {boolean} + * @memberof V1VolumeMount + */ + readOnly?: boolean + /** + * Path within the volume from which the container\'s volume should be mounted. Defaults to \"\" (volume\'s root). +optional + * @type {string} + * @memberof V1VolumeMount + */ + subPath?: string + /** + * Expanded path within the volume from which the container\'s volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container\'s environment. Defaults to \"\" (volume\'s root). SubPathExpr and SubPath are mutually exclusive. +optional + * @type {string} + * @memberof V1VolumeMount + */ + subPathExpr?: string +} +/** + * + * @export + * @interface V1VolumeProjection + */ +export interface V1VolumeProjection { + /** + * + * @type {V1ConfigMapProjection} + * @memberof V1VolumeProjection + */ + configMap?: V1ConfigMapProjection + /** + * + * @type {V1DownwardAPIProjection} + * @memberof V1VolumeProjection + */ + downwardAPI?: V1DownwardAPIProjection + /** + * + * @type {V1SecretProjection} + * @memberof V1VolumeProjection + */ + secret?: V1SecretProjection + /** + * + * @type {V1ServiceAccountTokenProjection} + * @memberof V1VolumeProjection + */ + serviceAccountToken?: V1ServiceAccountTokenProjection +} +/** + * + * @export + * @interface V1VsphereVirtualDiskVolumeSource + */ +export interface V1VsphereVirtualDiskVolumeSource { + /** + * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. +optional + * @type {string} + * @memberof V1VsphereVirtualDiskVolumeSource + */ + fsType?: string + /** + * Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. +optional + * @type {string} + * @memberof V1VsphereVirtualDiskVolumeSource */ - full_text?: string + storagePolicyID?: string /** - * + * Storage Policy Based Management (SPBM) profile name. +optional * @type {string} - * @memberof UtilsAPIError + * @memberof V1VsphereVirtualDiskVolumeSource */ - message?: string + storagePolicyName?: string /** - * + * Path that identifies vSphere volume vmdk * @type {string} - * @memberof UtilsAPIError + * @memberof V1VsphereVirtualDiskVolumeSource */ - type?: string + volumePath?: string } /** * * @export - * @interface UtilsResponse + * @interface V1WindowsSecurityContextOptions */ -export interface UtilsResponse { +export interface V1WindowsSecurityContextOptions { /** - * + * GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. +optional * @type {string} - * @memberof UtilsResponse + * @memberof V1WindowsSecurityContextOptions */ - status?: string + gmsaCredentialSpec?: string + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. +optional + * @type {string} + * @memberof V1WindowsSecurityContextOptions + */ + gmsaCredentialSpecName?: string + /** + * HostProcess determines if a container should be run as a \'Host Process\' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod\'s containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. +optional + * @type {boolean} + * @memberof V1WindowsSecurityContextOptions + */ + hostProcess?: boolean + /** + * The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. +optional + * @type {string} + * @memberof V1WindowsSecurityContextOptions + */ + runAsUserName?: string } /** * @@ -1915,11 +4535,11 @@ export interface V1alpha1HTTPStatusCheck { */ criteria?: V1alpha1HTTPCriteria /** - * +optional - * @type {string} + * + * @type {{ [key: string]: Array; }} * @memberof V1alpha1HTTPStatusCheck */ - headers?: string + headers?: { [key: string]: Array } /** * +optional +kubebuilder:validation:Enum=GET;POST +kubebuilder:default=GET * @type {string} @@ -2031,7 +4651,7 @@ export interface V1alpha1IOChaosSpec { */ export interface V1alpha1JVMChaosSpec { /** - * Action defines the specific jvm chaos action. Supported action: latency;return;exception;stress;gc;ruleData +kubebuilder:validation:Enum=latency;return;exception;stress;gc;ruleData + * Action defines the specific jvm chaos action. Supported action: latency;return;exception;stress;gc;ruleData +kubebuilder:validation:Enum=latency;return;exception;stress;gc;ruleData;mysql * @type {string} * @memberof V1alpha1JVMChaosSpec */ @@ -2054,6 +4674,12 @@ export interface V1alpha1JVMChaosSpec { * @memberof V1alpha1JVMChaosSpec */ cpuCount?: number + /** + * the match database default value is \"\", means match all database + * @type {string} + * @memberof V1alpha1JVMChaosSpec + */ + database?: string /** * Duration represents the duration of the chaos action +optional * @type {string} @@ -2061,13 +4687,13 @@ export interface V1alpha1JVMChaosSpec { */ duration?: string /** - * +optional the exception which needs to throw for action `exception` + * +optional the exception which needs to throw for action `exception` or the exception message needs to throw in action `mysql` * @type {string} * @memberof V1alpha1JVMChaosSpec */ exception?: string /** - * +optional the latency duration for action \'latency\', unit ms + * +optional the latency duration for action \'latency\', unit ms or the latency duration in action `mysql` * @type {number} * @memberof V1alpha1JVMChaosSpec */ @@ -2091,7 +4717,13 @@ export interface V1alpha1JVMChaosSpec { */ mode?: string /** - * +optional byteman rule name, should be unique, and will use JVMChaos\' name if not set + * the version of mysql-connector-java, only support 5.X.X(set to \"5\") and 8.X.X(set to \"8\") now + * @type {string} + * @memberof V1alpha1JVMChaosSpec + */ + mysqlConnectorVersion?: string + /** + * +optional byteman rule name, should be unique, and will generate one if not set * @type {string} * @memberof V1alpha1JVMChaosSpec */ @@ -2120,6 +4752,18 @@ export interface V1alpha1JVMChaosSpec { * @memberof V1alpha1JVMChaosSpec */ selector?: V1alpha1PodSelectorSpec + /** + * the match sql type default value is \"\", means match all SQL type. The value can be \'select\', \'insert\', \'update\', \'delete\', \'replace\'. + * @type {string} + * @memberof V1alpha1JVMChaosSpec + */ + sqlType?: string + /** + * the match table default value is \"\", means match all table + * @type {string} + * @memberof V1alpha1JVMChaosSpec + */ + table?: string /** * +optional the return value for action \'return\' * @type {string} @@ -3343,6 +5987,108 @@ export interface V1alpha1ReorderSpec { * @interface V1alpha1Schedule */ export interface V1alpha1Schedule { + /** + * Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations +optional + * @type {{ [key: string]: string; }} + * @memberof V1alpha1Schedule + */ + annotations?: { [key: string]: string } + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + apiVersion?: string + /** + * The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + clusterName?: string + /** + * CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + creationTimestamp?: string + /** + * Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. +optional + * @type {number} + * @memberof V1alpha1Schedule + */ + deletionGracePeriodSeconds?: number + /** + * DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + deletionTimestamp?: string + /** + * Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. +optional +patchStrategy=merge + * @type {Array} + * @memberof V1alpha1Schedule + */ + finalizers?: Array + /** + * GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + generateName?: string + /** + * A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. +optional + * @type {number} + * @memberof V1alpha1Schedule + */ + generation?: number + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + kind?: string + /** + * Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels +optional + * @type {{ [key: string]: string; }} + * @memberof V1alpha1Schedule + */ + labels?: { [key: string]: string } + /** + * ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn\'t need to set or understand this field. A workflow can be the user\'s name, a controller\'s name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object. +optional + * @type {Array} + * @memberof V1alpha1Schedule + */ + managedFields?: Array + /** + * Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + name?: string + /** + * Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + namespace?: string + /** + * List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. +optional +patchMergeKey=uid +patchStrategy=merge + * @type {Array} + * @memberof V1alpha1Schedule + */ + ownerReferences?: Array + /** + * An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + resourceVersion?: string + /** + * SelfLink is a URL representing this object. Populated by the system. Read-only. DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release. +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + selfLink?: string /** * * @type {V1alpha1ScheduleSpec} @@ -3355,6 +6101,12 @@ export interface V1alpha1Schedule { * @memberof V1alpha1Schedule */ status?: V1alpha1ScheduleStatus + /** + * UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids +optional + * @type {string} + * @memberof V1alpha1Schedule + */ + uid?: string } /** * @@ -3491,10 +6243,10 @@ export interface V1alpha1ScheduleSpec { export interface V1alpha1ScheduleStatus { /** * +optional - * @type {string} + * @type {Array} * @memberof V1alpha1ScheduleStatus */ - active?: string + active?: Array /** * +optional +nullable * @type {string} @@ -3638,10 +6390,10 @@ export interface V1alpha1StressCPUSpec { load?: number /** * extend stress-ng options - * @type {string} + * @type {Array} * @memberof V1alpha1StressCPUSpec */ - options?: string + options?: Array /** * specifies N workers to apply the stressor. * @type {number} @@ -3706,10 +6458,10 @@ export interface V1alpha1StressChaosSpec { export interface V1alpha1StressMemorySpec { /** * extend stress-ng options - * @type {string} + * @type {Array} * @memberof V1alpha1StressMemorySpec */ - options?: string + options?: Array /** * specifies N bytes consumed per vm worker, default is the total available memory. One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB.. * @type {string} @@ -3743,17 +6495,17 @@ export interface V1alpha1Stressors { */ export interface V1alpha1Task { /** - * Container is the main container image to run in the pod - * @type {string} + * + * @type {V1Container} * @memberof V1alpha1Task */ - container?: string + container?: V1Container /** * Volumes is a list of volumes that can be mounted by containers in a template. +patchStrategy=merge +patchMergeKey=name - * @type {string} + * @type {Array} * @memberof V1alpha1Task */ - volumes?: string + volumes?: Array } /** * @@ -3974,6 +6726,108 @@ export interface V1alpha1Timespec { * @interface V1alpha1Workflow */ export interface V1alpha1Workflow { + /** + * Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations +optional + * @type {{ [key: string]: string; }} + * @memberof V1alpha1Workflow + */ + annotations?: { [key: string]: string } + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + apiVersion?: string + /** + * The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + clusterName?: string + /** + * CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + creationTimestamp?: string + /** + * Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. +optional + * @type {number} + * @memberof V1alpha1Workflow + */ + deletionGracePeriodSeconds?: number + /** + * DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + deletionTimestamp?: string + /** + * Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. +optional +patchStrategy=merge + * @type {Array} + * @memberof V1alpha1Workflow + */ + finalizers?: Array + /** + * GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + generateName?: string + /** + * A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. +optional + * @type {number} + * @memberof V1alpha1Workflow + */ + generation?: number + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + kind?: string + /** + * Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels +optional + * @type {{ [key: string]: string; }} + * @memberof V1alpha1Workflow + */ + labels?: { [key: string]: string } + /** + * ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn\'t need to set or understand this field. A workflow can be the user\'s name, a controller\'s name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object. +optional + * @type {Array} + * @memberof V1alpha1Workflow + */ + managedFields?: Array + /** + * Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + name?: string + /** + * Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + namespace?: string + /** + * List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. +optional +patchMergeKey=uid +patchStrategy=merge + * @type {Array} + * @memberof V1alpha1Workflow + */ + ownerReferences?: Array + /** + * An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + resourceVersion?: string + /** + * SelfLink is a URL representing this object. Populated by the system. Read-only. DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release. +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + selfLink?: string /** * * @type {V1alpha1WorkflowSpec} @@ -3986,6 +6840,12 @@ export interface V1alpha1Workflow { * @memberof V1alpha1Workflow */ status?: V1alpha1WorkflowStatus + /** + * UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids +optional + * @type {string} + * @memberof V1alpha1Workflow + */ + uid?: string } /** * @@ -4068,19 +6928,6 @@ export interface V1alpha1WorkflowStatus { */ startTime?: string } -/** - * - * @export - * @interface WorkflowStatusResponse - */ -export interface WorkflowStatusResponse { - /** - * - * @type {string} - * @memberof WorkflowStatusResponse - */ - status?: string -} /** * ArchivesApi - axios parameter creator @@ -4549,7 +7396,7 @@ export const ArchivesApiFp = function (configuration?: Configuration) { name?: string, kind?: 'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos', options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.archivesGet(namespace, name, kind, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -4579,7 +7426,7 @@ export const ArchivesApiFp = function (configuration?: Configuration) { namespace?: string, name?: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.archivesSchedulesGet(namespace, name, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -4607,7 +7454,7 @@ export const ArchivesApiFp = function (configuration?: Configuration) { async archivesSchedulesUidGet( uid: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.archivesSchedulesUidGet(uid, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -4635,7 +7482,7 @@ export const ArchivesApiFp = function (configuration?: Configuration) { async archivesUidGet( uid: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.archivesUidGet(uid, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -4665,7 +7512,7 @@ export const ArchivesApiFp = function (configuration?: Configuration) { namespace?: string, name?: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.archivesWorkflowsGet(namespace, name, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -4693,7 +7540,7 @@ export const ArchivesApiFp = function (configuration?: Configuration) { async archivesWorkflowsUidGet( uid: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.archivesWorkflowsUidGet(uid, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -4731,7 +7578,7 @@ export const ArchivesApiFactory = function (configuration?: Configuration, baseP name?: string, kind?: 'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos', options?: any - ): AxiosPromise> { + ): AxiosPromise> { return localVarFp.archivesGet(namespace, name, kind, options).then((request) => request(axios, basePath)) }, /** @@ -4752,7 +7599,7 @@ export const ArchivesApiFactory = function (configuration?: Configuration, baseP * @param {*} [options] Override http request option. * @throws {RequiredError} */ - archivesSchedulesGet(namespace?: string, name?: string, options?: any): AxiosPromise> { + archivesSchedulesGet(namespace?: string, name?: string, options?: any): AxiosPromise> { return localVarFp.archivesSchedulesGet(namespace, name, options).then((request) => request(axios, basePath)) }, /** @@ -4772,7 +7619,7 @@ export const ArchivesApiFactory = function (configuration?: Configuration, baseP * @param {*} [options] Override http request option. * @throws {RequiredError} */ - archivesSchedulesUidGet(uid: string, options?: any): AxiosPromise { + archivesSchedulesUidGet(uid: string, options?: any): AxiosPromise { return localVarFp.archivesSchedulesUidGet(uid, options).then((request) => request(axios, basePath)) }, /** @@ -4792,7 +7639,7 @@ export const ArchivesApiFactory = function (configuration?: Configuration, baseP * @param {*} [options] Override http request option. * @throws {RequiredError} */ - archivesUidGet(uid: string, options?: any): AxiosPromise { + archivesUidGet(uid: string, options?: any): AxiosPromise { return localVarFp.archivesUidGet(uid, options).then((request) => request(axios, basePath)) }, /** @@ -4813,7 +7660,7 @@ export const ArchivesApiFactory = function (configuration?: Configuration, baseP * @param {*} [options] Override http request option. * @throws {RequiredError} */ - archivesWorkflowsGet(namespace?: string, name?: string, options?: any): AxiosPromise> { + archivesWorkflowsGet(namespace?: string, name?: string, options?: any): AxiosPromise> { return localVarFp.archivesWorkflowsGet(namespace, name, options).then((request) => request(axios, basePath)) }, /** @@ -4833,12 +7680,208 @@ export const ArchivesApiFactory = function (configuration?: Configuration, baseP * @param {*} [options] Override http request option. * @throws {RequiredError} */ - archivesWorkflowsUidGet(uid: string, options?: any): AxiosPromise { + archivesWorkflowsUidGet(uid: string, options?: any): AxiosPromise { return localVarFp.archivesWorkflowsUidGet(uid, options).then((request) => request(axios, basePath)) }, } } +/** + * Request parameters for archivesDelete operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesDeleteRequest + */ +export interface ArchivesApiArchivesDeleteRequest { + /** + * uids + * @type {string} + * @memberof ArchivesApiArchivesDelete + */ + readonly uids: string +} + +/** + * Request parameters for archivesGet operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesGetRequest + */ +export interface ArchivesApiArchivesGetRequest { + /** + * namespace + * @type {string} + * @memberof ArchivesApiArchivesGet + */ + readonly namespace?: string + + /** + * name + * @type {string} + * @memberof ArchivesApiArchivesGet + */ + readonly name?: string + + /** + * kind + * @type {'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos'} + * @memberof ArchivesApiArchivesGet + */ + readonly kind?: 'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos' +} + +/** + * Request parameters for archivesSchedulesDelete operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesSchedulesDeleteRequest + */ +export interface ArchivesApiArchivesSchedulesDeleteRequest { + /** + * uids + * @type {string} + * @memberof ArchivesApiArchivesSchedulesDelete + */ + readonly uids: string +} + +/** + * Request parameters for archivesSchedulesGet operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesSchedulesGetRequest + */ +export interface ArchivesApiArchivesSchedulesGetRequest { + /** + * namespace + * @type {string} + * @memberof ArchivesApiArchivesSchedulesGet + */ + readonly namespace?: string + + /** + * name + * @type {string} + * @memberof ArchivesApiArchivesSchedulesGet + */ + readonly name?: string +} + +/** + * Request parameters for archivesSchedulesUidDelete operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesSchedulesUidDeleteRequest + */ +export interface ArchivesApiArchivesSchedulesUidDeleteRequest { + /** + * uid + * @type {string} + * @memberof ArchivesApiArchivesSchedulesUidDelete + */ + readonly uid: string +} + +/** + * Request parameters for archivesSchedulesUidGet operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesSchedulesUidGetRequest + */ +export interface ArchivesApiArchivesSchedulesUidGetRequest { + /** + * uid + * @type {string} + * @memberof ArchivesApiArchivesSchedulesUidGet + */ + readonly uid: string +} + +/** + * Request parameters for archivesUidDelete operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesUidDeleteRequest + */ +export interface ArchivesApiArchivesUidDeleteRequest { + /** + * uid + * @type {string} + * @memberof ArchivesApiArchivesUidDelete + */ + readonly uid: string +} + +/** + * Request parameters for archivesUidGet operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesUidGetRequest + */ +export interface ArchivesApiArchivesUidGetRequest { + /** + * the archive uid + * @type {string} + * @memberof ArchivesApiArchivesUidGet + */ + readonly uid: string +} + +/** + * Request parameters for archivesWorkflowsDelete operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesWorkflowsDeleteRequest + */ +export interface ArchivesApiArchivesWorkflowsDeleteRequest { + /** + * uids + * @type {string} + * @memberof ArchivesApiArchivesWorkflowsDelete + */ + readonly uids: string +} + +/** + * Request parameters for archivesWorkflowsGet operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesWorkflowsGetRequest + */ +export interface ArchivesApiArchivesWorkflowsGetRequest { + /** + * namespace + * @type {string} + * @memberof ArchivesApiArchivesWorkflowsGet + */ + readonly namespace?: string + + /** + * name + * @type {string} + * @memberof ArchivesApiArchivesWorkflowsGet + */ + readonly name?: string +} + +/** + * Request parameters for archivesWorkflowsUidDelete operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesWorkflowsUidDeleteRequest + */ +export interface ArchivesApiArchivesWorkflowsUidDeleteRequest { + /** + * uid + * @type {string} + * @memberof ArchivesApiArchivesWorkflowsUidDelete + */ + readonly uid: string +} + +/** + * Request parameters for archivesWorkflowsUidGet operation in ArchivesApi. + * @export + * @interface ArchivesApiArchivesWorkflowsUidGetRequest + */ +export interface ArchivesApiArchivesWorkflowsUidGetRequest { + /** + * uid + * @type {string} + * @memberof ArchivesApiArchivesWorkflowsUidGet + */ + readonly uid: string +} + /** * ArchivesApi - object-oriented interface * @export @@ -4849,177 +7892,192 @@ export class ArchivesApi extends BaseAPI { /** * Delete the specified archived experiment. * @summary Delete the specified archived experiment. - * @param {string} uids uids + * @param {ArchivesApiArchivesDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesDelete(uids: string, options?: AxiosRequestConfig) { + public archivesDelete(requestParameters: ArchivesApiArchivesDeleteRequest, options?: AxiosRequestConfig) { return ArchivesApiFp(this.configuration) - .archivesDelete(uids, options) + .archivesDelete(requestParameters.uids, options) .then((request) => request(this.axios, this.basePath)) } /** * Get archived chaos experiments. * @summary Get archived chaos experiments. - * @param {string} [namespace] namespace - * @param {string} [name] name - * @param {'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos'} [kind] kind + * @param {ArchivesApiArchivesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesGet( - namespace?: string, - name?: string, - kind?: 'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos', - options?: AxiosRequestConfig - ) { + public archivesGet(requestParameters: ArchivesApiArchivesGetRequest = {}, options?: AxiosRequestConfig) { return ArchivesApiFp(this.configuration) - .archivesGet(namespace, name, kind, options) + .archivesGet(requestParameters.namespace, requestParameters.name, requestParameters.kind, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the specified archived schedule. * @summary Delete the specified archived schedule. - * @param {string} uids uids + * @param {ArchivesApiArchivesSchedulesDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesSchedulesDelete(uids: string, options?: AxiosRequestConfig) { + public archivesSchedulesDelete( + requestParameters: ArchivesApiArchivesSchedulesDeleteRequest, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesSchedulesDelete(uids, options) + .archivesSchedulesDelete(requestParameters.uids, options) .then((request) => request(this.axios, this.basePath)) } /** * Get archived schedule experiments. * @summary Get archived schedule experiments. - * @param {string} [namespace] namespace - * @param {string} [name] name + * @param {ArchivesApiArchivesSchedulesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesSchedulesGet(namespace?: string, name?: string, options?: AxiosRequestConfig) { + public archivesSchedulesGet( + requestParameters: ArchivesApiArchivesSchedulesGetRequest = {}, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesSchedulesGet(namespace, name, options) + .archivesSchedulesGet(requestParameters.namespace, requestParameters.name, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the specified archived schedule. * @summary Delete the specified archived schedule. - * @param {string} uid uid + * @param {ArchivesApiArchivesSchedulesUidDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesSchedulesUidDelete(uid: string, options?: AxiosRequestConfig) { + public archivesSchedulesUidDelete( + requestParameters: ArchivesApiArchivesSchedulesUidDeleteRequest, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesSchedulesUidDelete(uid, options) + .archivesSchedulesUidDelete(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the detail of an archived schedule experiment. * @summary Get the detail of an archived schedule experiment. - * @param {string} uid uid + * @param {ArchivesApiArchivesSchedulesUidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesSchedulesUidGet(uid: string, options?: AxiosRequestConfig) { + public archivesSchedulesUidGet( + requestParameters: ArchivesApiArchivesSchedulesUidGetRequest, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesSchedulesUidGet(uid, options) + .archivesSchedulesUidGet(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the specified archived experiment. * @summary Delete the specified archived experiment. - * @param {string} uid uid + * @param {ArchivesApiArchivesUidDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesUidDelete(uid: string, options?: AxiosRequestConfig) { + public archivesUidDelete(requestParameters: ArchivesApiArchivesUidDeleteRequest, options?: AxiosRequestConfig) { return ArchivesApiFp(this.configuration) - .archivesUidDelete(uid, options) + .archivesUidDelete(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the archived chaos experiment\'s detail by uid. * @summary Get an archived chaos experiment. - * @param {string} uid the archive uid + * @param {ArchivesApiArchivesUidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesUidGet(uid: string, options?: AxiosRequestConfig) { + public archivesUidGet(requestParameters: ArchivesApiArchivesUidGetRequest, options?: AxiosRequestConfig) { return ArchivesApiFp(this.configuration) - .archivesUidGet(uid, options) + .archivesUidGet(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the specified archived workflows. * @summary Delete the specified archived workflows. - * @param {string} uids uids + * @param {ArchivesApiArchivesWorkflowsDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesWorkflowsDelete(uids: string, options?: AxiosRequestConfig) { + public archivesWorkflowsDelete( + requestParameters: ArchivesApiArchivesWorkflowsDeleteRequest, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesWorkflowsDelete(uids, options) + .archivesWorkflowsDelete(requestParameters.uids, options) .then((request) => request(this.axios, this.basePath)) } /** * Get archived workflow. * @summary Get archived workflow. - * @param {string} [namespace] namespace - * @param {string} [name] name + * @param {ArchivesApiArchivesWorkflowsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesWorkflowsGet(namespace?: string, name?: string, options?: AxiosRequestConfig) { + public archivesWorkflowsGet( + requestParameters: ArchivesApiArchivesWorkflowsGetRequest = {}, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesWorkflowsGet(namespace, name, options) + .archivesWorkflowsGet(requestParameters.namespace, requestParameters.name, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the specified archived workflow. * @summary Delete the specified archived workflow. - * @param {string} uid uid + * @param {ArchivesApiArchivesWorkflowsUidDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesWorkflowsUidDelete(uid: string, options?: AxiosRequestConfig) { + public archivesWorkflowsUidDelete( + requestParameters: ArchivesApiArchivesWorkflowsUidDeleteRequest, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesWorkflowsUidDelete(uid, options) + .archivesWorkflowsUidDelete(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the detail of an archived workflow. * @summary Get the detail of an archived workflow. - * @param {string} uid uid + * @param {ArchivesApiArchivesWorkflowsUidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ArchivesApi */ - public archivesWorkflowsUidGet(uid: string, options?: AxiosRequestConfig) { + public archivesWorkflowsUidGet( + requestParameters: ArchivesApiArchivesWorkflowsUidGetRequest, + options?: AxiosRequestConfig + ) { return ArchivesApiFp(this.configuration) - .archivesWorkflowsUidGet(uid, options) + .archivesWorkflowsUidGet(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } } @@ -5370,10 +8428,16 @@ export const CommonApiAxiosParamCreator = function (configuration?: Configuratio /** * Get the rbac config according to the user\'s choice. * @summary Get the rbac config according to the user\'s choice. + * @param {string} [namespace] The namespace of RBAC + * @param {string} [role] The role of RBAC * @param {*} [options] Override http request option. * @throws {RequiredError} */ - commonRbacConfigGet: async (options: AxiosRequestConfig = {}): Promise => { + commonRbacConfigGet: async ( + namespace?: string, + role?: string, + options: AxiosRequestConfig = {} + ): Promise => { const localVarPath = `/common/rbac-config` // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL) @@ -5386,6 +8450,14 @@ export const CommonApiAxiosParamCreator = function (configuration?: Configuratio const localVarHeaderParameter = {} as any const localVarQueryParameter = {} as any + if (namespace !== undefined) { + localVarQueryParameter['namespace'] = namespace + } + + if (role !== undefined) { + localVarQueryParameter['role'] = role + } + setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers } @@ -5526,7 +8598,7 @@ export const CommonApiFp = function (configuration?: Configuration) { async commonPhysicalmachinesPost( request: V1alpha1PhysicalMachineSelectorSpec, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.commonPhysicalmachinesPost(request, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -5540,20 +8612,24 @@ export const CommonApiFp = function (configuration?: Configuration) { async commonPodsPost( request: V1alpha1PodSelectorSpec, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.commonPodsPost(request, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, /** * Get the rbac config according to the user\'s choice. * @summary Get the rbac config according to the user\'s choice. + * @param {string} [namespace] The namespace of RBAC + * @param {string} [role] The role of RBAC * @param {*} [options] Override http request option. * @throws {RequiredError} */ async commonRbacConfigGet( + namespace?: string, + role?: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: Array }>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.commonRbacConfigGet(options) + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.commonRbacConfigGet(namespace, role, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, } @@ -5663,7 +8739,7 @@ export const CommonApiFactory = function (configuration?: Configuration, basePat commonPhysicalmachinesPost( request: V1alpha1PhysicalMachineSelectorSpec, options?: any - ): AxiosPromise> { + ): AxiosPromise> { return localVarFp.commonPhysicalmachinesPost(request, options).then((request) => request(axios, basePath)) }, /** @@ -5673,21 +8749,128 @@ export const CommonApiFactory = function (configuration?: Configuration, basePat * @param {*} [options] Override http request option. * @throws {RequiredError} */ - commonPodsPost(request: V1alpha1PodSelectorSpec, options?: any): AxiosPromise> { + commonPodsPost(request: V1alpha1PodSelectorSpec, options?: any): AxiosPromise> { return localVarFp.commonPodsPost(request, options).then((request) => request(axios, basePath)) }, /** * Get the rbac config according to the user\'s choice. * @summary Get the rbac config according to the user\'s choice. + * @param {string} [namespace] The namespace of RBAC + * @param {string} [role] The role of RBAC * @param {*} [options] Override http request option. * @throws {RequiredError} */ - commonRbacConfigGet(options?: any): AxiosPromise<{ [key: string]: Array }> { - return localVarFp.commonRbacConfigGet(options).then((request) => request(axios, basePath)) + commonRbacConfigGet(namespace?: string, role?: string, options?: any): AxiosPromise<{ [key: string]: string }> { + return localVarFp.commonRbacConfigGet(namespace, role, options).then((request) => request(axios, basePath)) }, } } +/** + * Request parameters for commonAnnotationsGet operation in CommonApi. + * @export + * @interface CommonApiCommonAnnotationsGetRequest + */ +export interface CommonApiCommonAnnotationsGetRequest { + /** + * The pod\'s namespace list, split by , + * @type {string} + * @memberof CommonApiCommonAnnotationsGet + */ + readonly podNamespaceList: string +} + +/** + * Request parameters for commonLabelsGet operation in CommonApi. + * @export + * @interface CommonApiCommonLabelsGetRequest + */ +export interface CommonApiCommonLabelsGetRequest { + /** + * The pod\'s namespace list, split by , + * @type {string} + * @memberof CommonApiCommonLabelsGet + */ + readonly podNamespaceList: string +} + +/** + * Request parameters for commonPhysicalmachineAnnotationsGet operation in CommonApi. + * @export + * @interface CommonApiCommonPhysicalmachineAnnotationsGetRequest + */ +export interface CommonApiCommonPhysicalmachineAnnotationsGetRequest { + /** + * The physicalMachine\'s namespace list, split by , + * @type {string} + * @memberof CommonApiCommonPhysicalmachineAnnotationsGet + */ + readonly physicalMachineNamespaceList: string +} + +/** + * Request parameters for commonPhysicalmachineLabelsGet operation in CommonApi. + * @export + * @interface CommonApiCommonPhysicalmachineLabelsGetRequest + */ +export interface CommonApiCommonPhysicalmachineLabelsGetRequest { + /** + * The physicalMachine\'s namespace list, split by , + * @type {string} + * @memberof CommonApiCommonPhysicalmachineLabelsGet + */ + readonly physicalMachineNamespaceList: string +} + +/** + * Request parameters for commonPhysicalmachinesPost operation in CommonApi. + * @export + * @interface CommonApiCommonPhysicalmachinesPostRequest + */ +export interface CommonApiCommonPhysicalmachinesPostRequest { + /** + * Request body + * @type {V1alpha1PhysicalMachineSelectorSpec} + * @memberof CommonApiCommonPhysicalmachinesPost + */ + readonly request: V1alpha1PhysicalMachineSelectorSpec +} + +/** + * Request parameters for commonPodsPost operation in CommonApi. + * @export + * @interface CommonApiCommonPodsPostRequest + */ +export interface CommonApiCommonPodsPostRequest { + /** + * Request body + * @type {V1alpha1PodSelectorSpec} + * @memberof CommonApiCommonPodsPost + */ + readonly request: V1alpha1PodSelectorSpec +} + +/** + * Request parameters for commonRbacConfigGet operation in CommonApi. + * @export + * @interface CommonApiCommonRbacConfigGetRequest + */ +export interface CommonApiCommonRbacConfigGetRequest { + /** + * The namespace of RBAC + * @type {string} + * @memberof CommonApiCommonRbacConfigGet + */ + readonly namespace?: string + + /** + * The role of RBAC + * @type {string} + * @memberof CommonApiCommonRbacConfigGet + */ + readonly role?: string +} + /** * CommonApi - object-oriented interface * @export @@ -5698,14 +8881,14 @@ export class CommonApi extends BaseAPI { /** * Get the annotations of the pods in the specified namespace from Kubernetes cluster. * @summary Get the annotations of the pods in the specified namespace from Kubernetes cluster. - * @param {string} podNamespaceList The pod\'s namespace list, split by , + * @param {CommonApiCommonAnnotationsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonApi */ - public commonAnnotationsGet(podNamespaceList: string, options?: AxiosRequestConfig) { + public commonAnnotationsGet(requestParameters: CommonApiCommonAnnotationsGetRequest, options?: AxiosRequestConfig) { return CommonApiFp(this.configuration) - .commonAnnotationsGet(podNamespaceList, options) + .commonAnnotationsGet(requestParameters.podNamespaceList, options) .then((request) => request(this.axios, this.basePath)) } @@ -5751,14 +8934,14 @@ export class CommonApi extends BaseAPI { /** * Get the labels of the pods in the specified namespace from Kubernetes cluster. * @summary Get the labels of the pods in the specified namespace from Kubernetes cluster. - * @param {string} podNamespaceList The pod\'s namespace list, split by , + * @param {CommonApiCommonLabelsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonApi */ - public commonLabelsGet(podNamespaceList: string, options?: AxiosRequestConfig) { + public commonLabelsGet(requestParameters: CommonApiCommonLabelsGetRequest, options?: AxiosRequestConfig) { return CommonApiFp(this.configuration) - .commonLabelsGet(podNamespaceList, options) + .commonLabelsGet(requestParameters.podNamespaceList, options) .then((request) => request(this.axios, this.basePath)) } @@ -5779,69 +8962,82 @@ export class CommonApi extends BaseAPI { /** * Get the annotations of the physicalMachines in the specified namespace from Kubernetes cluster. * @summary Get the annotations of the physicalMachines in the specified namespace from Kubernetes cluster. - * @param {string} physicalMachineNamespaceList The physicalMachine\'s namespace list, split by , + * @param {CommonApiCommonPhysicalmachineAnnotationsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonApi */ - public commonPhysicalmachineAnnotationsGet(physicalMachineNamespaceList: string, options?: AxiosRequestConfig) { + public commonPhysicalmachineAnnotationsGet( + requestParameters: CommonApiCommonPhysicalmachineAnnotationsGetRequest, + options?: AxiosRequestConfig + ) { return CommonApiFp(this.configuration) - .commonPhysicalmachineAnnotationsGet(physicalMachineNamespaceList, options) + .commonPhysicalmachineAnnotationsGet(requestParameters.physicalMachineNamespaceList, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the labels of the physicalMachines in the specified namespace from Kubernetes cluster. * @summary Get the labels of the physicalMachines in the specified namespace from Kubernetes cluster. - * @param {string} physicalMachineNamespaceList The physicalMachine\'s namespace list, split by , + * @param {CommonApiCommonPhysicalmachineLabelsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonApi */ - public commonPhysicalmachineLabelsGet(physicalMachineNamespaceList: string, options?: AxiosRequestConfig) { + public commonPhysicalmachineLabelsGet( + requestParameters: CommonApiCommonPhysicalmachineLabelsGetRequest, + options?: AxiosRequestConfig + ) { return CommonApiFp(this.configuration) - .commonPhysicalmachineLabelsGet(physicalMachineNamespaceList, options) + .commonPhysicalmachineLabelsGet(requestParameters.physicalMachineNamespaceList, options) .then((request) => request(this.axios, this.basePath)) } /** * Get physicalMachines from Kubernetes cluster. * @summary Get physicalMachines from Kubernetes cluster. - * @param {V1alpha1PhysicalMachineSelectorSpec} request Request body + * @param {CommonApiCommonPhysicalmachinesPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonApi */ - public commonPhysicalmachinesPost(request: V1alpha1PhysicalMachineSelectorSpec, options?: AxiosRequestConfig) { + public commonPhysicalmachinesPost( + requestParameters: CommonApiCommonPhysicalmachinesPostRequest, + options?: AxiosRequestConfig + ) { return CommonApiFp(this.configuration) - .commonPhysicalmachinesPost(request, options) + .commonPhysicalmachinesPost(requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } /** * Get pods from Kubernetes cluster. * @summary Get pods from Kubernetes cluster. - * @param {V1alpha1PodSelectorSpec} request Request body + * @param {CommonApiCommonPodsPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonApi */ - public commonPodsPost(request: V1alpha1PodSelectorSpec, options?: AxiosRequestConfig) { + public commonPodsPost(requestParameters: CommonApiCommonPodsPostRequest, options?: AxiosRequestConfig) { return CommonApiFp(this.configuration) - .commonPodsPost(request, options) + .commonPodsPost(requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the rbac config according to the user\'s choice. * @summary Get the rbac config according to the user\'s choice. + * @param {CommonApiCommonRbacConfigGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof CommonApi */ - public commonRbacConfigGet(options?: AxiosRequestConfig) { + public commonRbacConfigGet( + requestParameters: CommonApiCommonRbacConfigGetRequest = {}, + options?: AxiosRequestConfig + ) { return CommonApiFp(this.configuration) - .commonRbacConfigGet(options) + .commonRbacConfigGet(requestParameters.namespace, requestParameters.role, options) .then((request) => request(this.axios, this.basePath)) } } @@ -5860,7 +9056,7 @@ export const EventsApiAxiosParamCreator = function (configuration?: Configuratio * @param {string} [namespace] The namespace of the object * @param {string} [objectId] The UID of the object * @param {'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos' | 'AWSChaos' | 'GCPChaos' | 'DNSChaos' | 'Schedule'} [kind] kind - * @param {string} [limit] The max length of events list + * @param {number} [limit] The max length of events list * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -5880,7 +9076,7 @@ export const EventsApiAxiosParamCreator = function (configuration?: Configuratio | 'GCPChaos' | 'DNSChaos' | 'Schedule', - limit?: string, + limit?: number, options: AxiosRequestConfig = {} ): Promise => { const localVarPath = `/events` @@ -5964,14 +9160,14 @@ export const EventsApiAxiosParamCreator = function (configuration?: Configuratio * @summary cascadeFetchEventsForWorkflow list all events for Workflow and related WorkflowNode. * @param {string} uid The UID of the Workflow * @param {string} [namespace] The namespace of the object - * @param {string} [limit] The max length of events list + * @param {number} [limit] The max length of events list * @param {*} [options] Override http request option. * @throws {RequiredError} */ eventsWorkflowUidGet: async ( uid: string, namespace?: string, - limit?: string, + limit?: number, options: AxiosRequestConfig = {} ): Promise => { // verify required parameter 'uid' is not null or undefined @@ -6023,7 +9219,7 @@ export const EventsApiFp = function (configuration?: Configuration) { * @param {string} [namespace] The namespace of the object * @param {string} [objectId] The UID of the object * @param {'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos' | 'AWSChaos' | 'GCPChaos' | 'DNSChaos' | 'Schedule'} [kind] kind - * @param {string} [limit] The max length of events list + * @param {number} [limit] The max length of events list * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -6043,7 +9239,7 @@ export const EventsApiFp = function (configuration?: Configuration) { | 'GCPChaos' | 'DNSChaos' | 'Schedule', - limit?: string, + limit?: number, options?: AxiosRequestConfig ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.eventsGet( @@ -6076,14 +9272,14 @@ export const EventsApiFp = function (configuration?: Configuration) { * @summary cascadeFetchEventsForWorkflow list all events for Workflow and related WorkflowNode. * @param {string} uid The UID of the Workflow * @param {string} [namespace] The namespace of the object - * @param {string} [limit] The max length of events list + * @param {number} [limit] The max length of events list * @param {*} [options] Override http request option. * @throws {RequiredError} */ async eventsWorkflowUidGet( uid: string, namespace?: string, - limit?: string, + limit?: number, options?: AxiosRequestConfig ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.eventsWorkflowUidGet(uid, namespace, limit, options) @@ -6107,7 +9303,7 @@ export const EventsApiFactory = function (configuration?: Configuration, basePat * @param {string} [namespace] The namespace of the object * @param {string} [objectId] The UID of the object * @param {'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos' | 'AWSChaos' | 'GCPChaos' | 'DNSChaos' | 'Schedule'} [kind] kind - * @param {string} [limit] The max length of events list + * @param {number} [limit] The max length of events list * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -6127,7 +9323,7 @@ export const EventsApiFactory = function (configuration?: Configuration, basePat | 'GCPChaos' | 'DNSChaos' | 'Schedule', - limit?: string, + limit?: number, options?: any ): AxiosPromise> { return localVarFp @@ -6149,14 +9345,14 @@ export const EventsApiFactory = function (configuration?: Configuration, basePat * @summary cascadeFetchEventsForWorkflow list all events for Workflow and related WorkflowNode. * @param {string} uid The UID of the Workflow * @param {string} [namespace] The namespace of the object - * @param {string} [limit] The max length of events list + * @param {number} [limit] The max length of events list * @param {*} [options] Override http request option. * @throws {RequiredError} */ eventsWorkflowUidGet( uid: string, namespace?: string, - limit?: string, + limit?: number, options?: any ): AxiosPromise> { return localVarFp.eventsWorkflowUidGet(uid, namespace, limit, options).then((request) => request(axios, basePath)) @@ -6164,6 +9360,107 @@ export const EventsApiFactory = function (configuration?: Configuration, basePat } } +/** + * Request parameters for eventsGet operation in EventsApi. + * @export + * @interface EventsApiEventsGetRequest + */ +export interface EventsApiEventsGetRequest { + /** + * The create time of events + * @type {string} + * @memberof EventsApiEventsGet + */ + readonly createdAt?: string + + /** + * The name of the object + * @type {string} + * @memberof EventsApiEventsGet + */ + readonly name?: string + + /** + * The namespace of the object + * @type {string} + * @memberof EventsApiEventsGet + */ + readonly namespace?: string + + /** + * The UID of the object + * @type {string} + * @memberof EventsApiEventsGet + */ + readonly objectId?: string + + /** + * kind + * @type {'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos' | 'AWSChaos' | 'GCPChaos' | 'DNSChaos' | 'Schedule'} + * @memberof EventsApiEventsGet + */ + readonly kind?: + | 'PodChaos' + | 'IOChaos' + | 'NetworkChaos' + | 'TimeChaos' + | 'KernelChaos' + | 'StressChaos' + | 'AWSChaos' + | 'GCPChaos' + | 'DNSChaos' + | 'Schedule' + + /** + * The max length of events list + * @type {number} + * @memberof EventsApiEventsGet + */ + readonly limit?: number +} + +/** + * Request parameters for eventsIdGet operation in EventsApi. + * @export + * @interface EventsApiEventsIdGetRequest + */ +export interface EventsApiEventsIdGetRequest { + /** + * The event ID + * @type {number} + * @memberof EventsApiEventsIdGet + */ + readonly id: number +} + +/** + * Request parameters for eventsWorkflowUidGet operation in EventsApi. + * @export + * @interface EventsApiEventsWorkflowUidGetRequest + */ +export interface EventsApiEventsWorkflowUidGetRequest { + /** + * The UID of the Workflow + * @type {string} + * @memberof EventsApiEventsWorkflowUidGet + */ + readonly uid: string + + /** + * The namespace of the object + * @type {string} + * @memberof EventsApiEventsWorkflowUidGet + */ + readonly namespace?: string + + /** + * The max length of events list + * @type {number} + * @memberof EventsApiEventsWorkflowUidGet + */ + readonly limit?: number +} + /** * EventsApi - object-oriented interface * @export @@ -6174,67 +9471,50 @@ export class EventsApi extends BaseAPI { /** * Get events from db. * @summary list events. - * @param {string} [createdAt] The create time of events - * @param {string} [name] The name of the object - * @param {string} [namespace] The namespace of the object - * @param {string} [objectId] The UID of the object - * @param {'PodChaos' | 'IOChaos' | 'NetworkChaos' | 'TimeChaos' | 'KernelChaos' | 'StressChaos' | 'AWSChaos' | 'GCPChaos' | 'DNSChaos' | 'Schedule'} [kind] kind - * @param {string} [limit] The max length of events list + * @param {EventsApiEventsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EventsApi */ - public eventsGet( - createdAt?: string, - name?: string, - namespace?: string, - objectId?: string, - kind?: - | 'PodChaos' - | 'IOChaos' - | 'NetworkChaos' - | 'TimeChaos' - | 'KernelChaos' - | 'StressChaos' - | 'AWSChaos' - | 'GCPChaos' - | 'DNSChaos' - | 'Schedule', - limit?: string, - options?: AxiosRequestConfig - ) { + public eventsGet(requestParameters: EventsApiEventsGetRequest = {}, options?: AxiosRequestConfig) { return EventsApiFp(this.configuration) - .eventsGet(createdAt, name, namespace, objectId, kind, limit, options) + .eventsGet( + requestParameters.createdAt, + requestParameters.name, + requestParameters.namespace, + requestParameters.objectId, + requestParameters.kind, + requestParameters.limit, + options + ) .then((request) => request(this.axios, this.basePath)) } /** * Get the event from db by ID. * @summary Get an event. - * @param {number} id The event ID + * @param {EventsApiEventsIdGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EventsApi */ - public eventsIdGet(id: number, options?: AxiosRequestConfig) { + public eventsIdGet(requestParameters: EventsApiEventsIdGetRequest, options?: AxiosRequestConfig) { return EventsApiFp(this.configuration) - .eventsIdGet(id, options) + .eventsIdGet(requestParameters.id, options) .then((request) => request(this.axios, this.basePath)) } /** * list all events for Workflow and related WorkflowNode. * @summary cascadeFetchEventsForWorkflow list all events for Workflow and related WorkflowNode. - * @param {string} uid The UID of the Workflow - * @param {string} [namespace] The namespace of the object - * @param {string} [limit] The max length of events list + * @param {EventsApiEventsWorkflowUidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EventsApi */ - public eventsWorkflowUidGet(uid: string, namespace?: string, limit?: string, options?: AxiosRequestConfig) { + public eventsWorkflowUidGet(requestParameters: EventsApiEventsWorkflowUidGetRequest, options?: AxiosRequestConfig) { return EventsApiFp(this.configuration) - .eventsWorkflowUidGet(uid, namespace, limit, options) + .eventsWorkflowUidGet(requestParameters.uid, requestParameters.namespace, requestParameters.limit, options) .then((request) => request(this.axios, this.basePath)) } } @@ -6607,7 +9887,7 @@ export const ExperimentsApiFp = function (configuration?: Configuration) { | 'HTTPChaos', status?: 'Injecting' | 'Running' | 'Finished' | 'Paused', options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.experimentsGet(namespace, name, kind, status, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -6693,7 +9973,7 @@ export const ExperimentsApiFp = function (configuration?: Configuration) { async experimentsUidGet( uid: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.experimentsUidGet(uid, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -6749,7 +10029,7 @@ export const ExperimentsApiFactory = function ( | 'HTTPChaos', status?: 'Injecting' | 'Running' | 'Finished' | 'Paused', options?: any - ): AxiosPromise> { + ): AxiosPromise> { return localVarFp .experimentsGet(namespace, name, kind, status, options) .then((request) => request(axios, basePath)) @@ -6812,12 +10092,170 @@ export const ExperimentsApiFactory = function ( * @param {*} [options] Override http request option. * @throws {RequiredError} */ - experimentsUidGet(uid: string, options?: any): AxiosPromise { + experimentsUidGet(uid: string, options?: any): AxiosPromise { return localVarFp.experimentsUidGet(uid, options).then((request) => request(axios, basePath)) }, } } +/** + * Request parameters for experimentsDelete operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsDeleteRequest + */ +export interface ExperimentsApiExperimentsDeleteRequest { + /** + * the experiment uids, split with comma. Example: ?uids=uid1,uid2 + * @type {string} + * @memberof ExperimentsApiExperimentsDelete + */ + readonly uids: string + + /** + * force + * @type {'true' | 'false'} + * @memberof ExperimentsApiExperimentsDelete + */ + readonly force?: 'true' | 'false' +} + +/** + * Request parameters for experimentsGet operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsGetRequest + */ +export interface ExperimentsApiExperimentsGetRequest { + /** + * filter exps by namespace + * @type {string} + * @memberof ExperimentsApiExperimentsGet + */ + readonly namespace?: string + + /** + * filter exps by name + * @type {string} + * @memberof ExperimentsApiExperimentsGet + */ + readonly name?: string + + /** + * filter exps by kind + * @type {'PodChaos' | 'NetworkChaos' | 'IOChaos' | 'StressChaos' | 'KernelChaos' | 'TimeChaos' | 'DNSChaos' | 'AWSChaos' | 'GCPChaos' | 'JVMChaos' | 'HTTPChaos'} + * @memberof ExperimentsApiExperimentsGet + */ + readonly kind?: + | 'PodChaos' + | 'NetworkChaos' + | 'IOChaos' + | 'StressChaos' + | 'KernelChaos' + | 'TimeChaos' + | 'DNSChaos' + | 'AWSChaos' + | 'GCPChaos' + | 'JVMChaos' + | 'HTTPChaos' + + /** + * filter exps by status + * @type {'Injecting' | 'Running' | 'Finished' | 'Paused'} + * @memberof ExperimentsApiExperimentsGet + */ + readonly status?: 'Injecting' | 'Running' | 'Finished' | 'Paused' +} + +/** + * Request parameters for experimentsPauseUidPut operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsPauseUidPutRequest + */ +export interface ExperimentsApiExperimentsPauseUidPutRequest { + /** + * the experiment uid + * @type {string} + * @memberof ExperimentsApiExperimentsPauseUidPut + */ + readonly uid: string +} + +/** + * Request parameters for experimentsPost operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsPostRequest + */ +export interface ExperimentsApiExperimentsPostRequest { + /** + * the chaos definition + * @type {object} + * @memberof ExperimentsApiExperimentsPost + */ + readonly chaos: object +} + +/** + * Request parameters for experimentsStartUidPut operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsStartUidPutRequest + */ +export interface ExperimentsApiExperimentsStartUidPutRequest { + /** + * the experiment uid + * @type {string} + * @memberof ExperimentsApiExperimentsStartUidPut + */ + readonly uid: string +} + +/** + * Request parameters for experimentsStateGet operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsStateGetRequest + */ +export interface ExperimentsApiExperimentsStateGetRequest { + /** + * namespace + * @type {string} + * @memberof ExperimentsApiExperimentsStateGet + */ + readonly namespace?: string +} + +/** + * Request parameters for experimentsUidDelete operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsUidDeleteRequest + */ +export interface ExperimentsApiExperimentsUidDeleteRequest { + /** + * the experiment uid + * @type {string} + * @memberof ExperimentsApiExperimentsUidDelete + */ + readonly uid: string + + /** + * force + * @type {'true' | 'false'} + * @memberof ExperimentsApiExperimentsUidDelete + */ + readonly force?: 'true' | 'false' +} + +/** + * Request parameters for experimentsUidGet operation in ExperimentsApi. + * @export + * @interface ExperimentsApiExperimentsUidGetRequest + */ +export interface ExperimentsApiExperimentsUidGetRequest { + /** + * the experiment uid + * @type {string} + * @memberof ExperimentsApiExperimentsUidGet + */ + readonly uid: string +} + /** * ExperimentsApi - object-oriented interface * @export @@ -6828,134 +10266,130 @@ export class ExperimentsApi extends BaseAPI { /** * Batch delete chaos experiments by uids. * @summary Batch delete chaos experiments. - * @param {string} uids the experiment uids, split with comma. Example: ?uids=uid1,uid2 - * @param {'true' | 'false'} [force] force + * @param {ExperimentsApiExperimentsDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsDelete(uids: string, force?: 'true' | 'false', options?: AxiosRequestConfig) { + public experimentsDelete(requestParameters: ExperimentsApiExperimentsDeleteRequest, options?: AxiosRequestConfig) { return ExperimentsApiFp(this.configuration) - .experimentsDelete(uids, force, options) + .experimentsDelete(requestParameters.uids, requestParameters.force, options) .then((request) => request(this.axios, this.basePath)) } /** * Get chaos experiments from k8s clusters in real time. * @summary List chaos experiments. - * @param {string} [namespace] filter exps by namespace - * @param {string} [name] filter exps by name - * @param {'PodChaos' | 'NetworkChaos' | 'IOChaos' | 'StressChaos' | 'KernelChaos' | 'TimeChaos' | 'DNSChaos' | 'AWSChaos' | 'GCPChaos' | 'JVMChaos' | 'HTTPChaos'} [kind] filter exps by kind - * @param {'Injecting' | 'Running' | 'Finished' | 'Paused'} [status] filter exps by status + * @param {ExperimentsApiExperimentsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsGet( - namespace?: string, - name?: string, - kind?: - | 'PodChaos' - | 'NetworkChaos' - | 'IOChaos' - | 'StressChaos' - | 'KernelChaos' - | 'TimeChaos' - | 'DNSChaos' - | 'AWSChaos' - | 'GCPChaos' - | 'JVMChaos' - | 'HTTPChaos', - status?: 'Injecting' | 'Running' | 'Finished' | 'Paused', - options?: AxiosRequestConfig - ) { + public experimentsGet(requestParameters: ExperimentsApiExperimentsGetRequest = {}, options?: AxiosRequestConfig) { return ExperimentsApiFp(this.configuration) - .experimentsGet(namespace, name, kind, status, options) + .experimentsGet( + requestParameters.namespace, + requestParameters.name, + requestParameters.kind, + requestParameters.status, + options + ) .then((request) => request(this.axios, this.basePath)) } /** * Pause a chaos experiment. * @summary Pause a chaos experiment. - * @param {string} uid the experiment uid + * @param {ExperimentsApiExperimentsPauseUidPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsPauseUidPut(uid: string, options?: AxiosRequestConfig) { + public experimentsPauseUidPut( + requestParameters: ExperimentsApiExperimentsPauseUidPutRequest, + options?: AxiosRequestConfig + ) { return ExperimentsApiFp(this.configuration) - .experimentsPauseUidPut(uid, options) + .experimentsPauseUidPut(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Pass a JSON object to create a new chaos experiment. The schema for JSON is the same as the YAML schema for the Kubernetes object. * @summary Create a new chaos experiment. - * @param {object} chaos the chaos definition + * @param {ExperimentsApiExperimentsPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsPost(chaos: object, options?: AxiosRequestConfig) { + public experimentsPost(requestParameters: ExperimentsApiExperimentsPostRequest, options?: AxiosRequestConfig) { return ExperimentsApiFp(this.configuration) - .experimentsPost(chaos, options) + .experimentsPost(requestParameters.chaos, options) .then((request) => request(this.axios, this.basePath)) } /** * Start a chaos experiment. * @summary Start a chaos experiment. - * @param {string} uid the experiment uid + * @param {ExperimentsApiExperimentsStartUidPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsStartUidPut(uid: string, options?: AxiosRequestConfig) { + public experimentsStartUidPut( + requestParameters: ExperimentsApiExperimentsStartUidPutRequest, + options?: AxiosRequestConfig + ) { return ExperimentsApiFp(this.configuration) - .experimentsStartUidPut(uid, options) + .experimentsStartUidPut(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the status of all experiments. * @summary Get the status of all experiments. - * @param {string} [namespace] namespace + * @param {ExperimentsApiExperimentsStateGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsStateGet(namespace?: string, options?: AxiosRequestConfig) { + public experimentsStateGet( + requestParameters: ExperimentsApiExperimentsStateGetRequest = {}, + options?: AxiosRequestConfig + ) { return ExperimentsApiFp(this.configuration) - .experimentsStateGet(namespace, options) + .experimentsStateGet(requestParameters.namespace, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the chaos experiment by uid. * @summary Delete a chaos experiment. - * @param {string} uid the experiment uid - * @param {'true' | 'false'} [force] force + * @param {ExperimentsApiExperimentsUidDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsUidDelete(uid: string, force?: 'true' | 'false', options?: AxiosRequestConfig) { + public experimentsUidDelete( + requestParameters: ExperimentsApiExperimentsUidDeleteRequest, + options?: AxiosRequestConfig + ) { return ExperimentsApiFp(this.configuration) - .experimentsUidDelete(uid, force, options) + .experimentsUidDelete(requestParameters.uid, requestParameters.force, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the chaos experiment\'s detail by uid. * @summary Get a chaos experiment. - * @param {string} uid the experiment uid + * @param {ExperimentsApiExperimentsUidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ExperimentsApi */ - public experimentsUidGet(uid: string, options?: AxiosRequestConfig) { + public experimentsUidGet(requestParameters: ExperimentsApiExperimentsUidGetRequest, options?: AxiosRequestConfig) { return ExperimentsApiFp(this.configuration) - .experimentsUidGet(uid, options) + .experimentsUidGet(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } } @@ -7233,7 +10667,7 @@ export const SchedulesApiFp = function (configuration?: Configuration) { namespace?: string, name?: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.schedulesGet(namespace, name, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -7303,7 +10737,7 @@ export const SchedulesApiFp = function (configuration?: Configuration) { async schedulesUidGet( uid: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.schedulesUidGet(uid, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -7335,7 +10769,7 @@ export const SchedulesApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - schedulesGet(namespace?: string, name?: string, options?: any): AxiosPromise> { + schedulesGet(namespace?: string, name?: string, options?: any): AxiosPromise> { return localVarFp.schedulesGet(namespace, name, options).then((request) => request(axios, basePath)) }, /** @@ -7385,12 +10819,117 @@ export const SchedulesApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - schedulesUidGet(uid: string, options?: any): AxiosPromise { + schedulesUidGet(uid: string, options?: any): AxiosPromise { return localVarFp.schedulesUidGet(uid, options).then((request) => request(axios, basePath)) }, } } +/** + * Request parameters for schedulesDelete operation in SchedulesApi. + * @export + * @interface SchedulesApiSchedulesDeleteRequest + */ +export interface SchedulesApiSchedulesDeleteRequest { + /** + * the schedule uids, split with comma. Example: ?uids=uid1,uid2 + * @type {string} + * @memberof SchedulesApiSchedulesDelete + */ + readonly uids: string +} + +/** + * Request parameters for schedulesGet operation in SchedulesApi. + * @export + * @interface SchedulesApiSchedulesGetRequest + */ +export interface SchedulesApiSchedulesGetRequest { + /** + * filter schedules by namespace + * @type {string} + * @memberof SchedulesApiSchedulesGet + */ + readonly namespace?: string + + /** + * filter schedules by name + * @type {string} + * @memberof SchedulesApiSchedulesGet + */ + readonly name?: string +} + +/** + * Request parameters for schedulesPauseUidPut operation in SchedulesApi. + * @export + * @interface SchedulesApiSchedulesPauseUidPutRequest + */ +export interface SchedulesApiSchedulesPauseUidPutRequest { + /** + * the schedule uid + * @type {string} + * @memberof SchedulesApiSchedulesPauseUidPut + */ + readonly uid: string +} + +/** + * Request parameters for schedulesPost operation in SchedulesApi. + * @export + * @interface SchedulesApiSchedulesPostRequest + */ +export interface SchedulesApiSchedulesPostRequest { + /** + * the schedule definition + * @type {V1alpha1Schedule} + * @memberof SchedulesApiSchedulesPost + */ + readonly schedule: V1alpha1Schedule +} + +/** + * Request parameters for schedulesStartUidPut operation in SchedulesApi. + * @export + * @interface SchedulesApiSchedulesStartUidPutRequest + */ +export interface SchedulesApiSchedulesStartUidPutRequest { + /** + * the schedule uid + * @type {string} + * @memberof SchedulesApiSchedulesStartUidPut + */ + readonly uid: string +} + +/** + * Request parameters for schedulesUidDelete operation in SchedulesApi. + * @export + * @interface SchedulesApiSchedulesUidDeleteRequest + */ +export interface SchedulesApiSchedulesUidDeleteRequest { + /** + * the schedule uid + * @type {string} + * @memberof SchedulesApiSchedulesUidDelete + */ + readonly uid: string +} + +/** + * Request parameters for schedulesUidGet operation in SchedulesApi. + * @export + * @interface SchedulesApiSchedulesUidGetRequest + */ +export interface SchedulesApiSchedulesUidGetRequest { + /** + * the schedule uid + * @type {string} + * @memberof SchedulesApiSchedulesUidGet + */ + readonly uid: string +} + /** * SchedulesApi - object-oriented interface * @export @@ -7401,99 +10940,104 @@ export class SchedulesApi extends BaseAPI { /** * Batch delete schedules by uids. * @summary Batch delete schedules. - * @param {string} uids the schedule uids, split with comma. Example: ?uids=uid1,uid2 + * @param {SchedulesApiSchedulesDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SchedulesApi */ - public schedulesDelete(uids: string, options?: AxiosRequestConfig) { + public schedulesDelete(requestParameters: SchedulesApiSchedulesDeleteRequest, options?: AxiosRequestConfig) { return SchedulesApiFp(this.configuration) - .schedulesDelete(uids, options) + .schedulesDelete(requestParameters.uids, options) .then((request) => request(this.axios, this.basePath)) } /** * Get chaos schedules from k8s cluster in real time. * @summary List chaos schedules. - * @param {string} [namespace] filter schedules by namespace - * @param {string} [name] filter schedules by name + * @param {SchedulesApiSchedulesGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SchedulesApi */ - public schedulesGet(namespace?: string, name?: string, options?: AxiosRequestConfig) { + public schedulesGet(requestParameters: SchedulesApiSchedulesGetRequest = {}, options?: AxiosRequestConfig) { return SchedulesApiFp(this.configuration) - .schedulesGet(namespace, name, options) + .schedulesGet(requestParameters.namespace, requestParameters.name, options) .then((request) => request(this.axios, this.basePath)) } /** * Pause a schedule. * @summary Pause a schedule. - * @param {string} uid the schedule uid + * @param {SchedulesApiSchedulesPauseUidPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SchedulesApi */ - public schedulesPauseUidPut(uid: string, options?: AxiosRequestConfig) { + public schedulesPauseUidPut( + requestParameters: SchedulesApiSchedulesPauseUidPutRequest, + options?: AxiosRequestConfig + ) { return SchedulesApiFp(this.configuration) - .schedulesPauseUidPut(uid, options) + .schedulesPauseUidPut(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Pass a JSON object to create a new schedule. The schema for JSON is the same as the YAML schema for the Kubernetes object. * @summary Create a new schedule. - * @param {V1alpha1Schedule} schedule the schedule definition + * @param {SchedulesApiSchedulesPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SchedulesApi */ - public schedulesPost(schedule: V1alpha1Schedule, options?: AxiosRequestConfig) { + public schedulesPost(requestParameters: SchedulesApiSchedulesPostRequest, options?: AxiosRequestConfig) { return SchedulesApiFp(this.configuration) - .schedulesPost(schedule, options) + .schedulesPost(requestParameters.schedule, options) .then((request) => request(this.axios, this.basePath)) } /** * Start a schedule. * @summary Start a schedule. - * @param {string} uid the schedule uid + * @param {SchedulesApiSchedulesStartUidPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SchedulesApi */ - public schedulesStartUidPut(uid: string, options?: AxiosRequestConfig) { + public schedulesStartUidPut( + requestParameters: SchedulesApiSchedulesStartUidPutRequest, + options?: AxiosRequestConfig + ) { return SchedulesApiFp(this.configuration) - .schedulesStartUidPut(uid, options) + .schedulesStartUidPut(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the schedule by uid. * @summary Delete a schedule. - * @param {string} uid the schedule uid + * @param {SchedulesApiSchedulesUidDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SchedulesApi */ - public schedulesUidDelete(uid: string, options?: AxiosRequestConfig) { + public schedulesUidDelete(requestParameters: SchedulesApiSchedulesUidDeleteRequest, options?: AxiosRequestConfig) { return SchedulesApiFp(this.configuration) - .schedulesUidDelete(uid, options) + .schedulesUidDelete(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the schedule\'s detail by uid. * @summary Get a schedule. - * @param {string} uid the schedule uid + * @param {SchedulesApiSchedulesUidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof SchedulesApi */ - public schedulesUidGet(uid: string, options?: AxiosRequestConfig) { + public schedulesUidGet(requestParameters: SchedulesApiSchedulesUidGetRequest, options?: AxiosRequestConfig) { return SchedulesApiFp(this.configuration) - .schedulesUidGet(uid, options) + .schedulesUidGet(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } } @@ -7568,7 +11112,7 @@ export const TemplateApiFp = function (configuration?: Configuration) { namespace?: string, name?: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.templatesStatuschecksGet(namespace, name, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -7594,12 +11138,33 @@ export const TemplateApiFactory = function (configuration?: Configuration, baseP namespace?: string, name?: string, options?: any - ): AxiosPromise> { + ): AxiosPromise> { return localVarFp.templatesStatuschecksGet(namespace, name, options).then((request) => request(axios, basePath)) }, } } +/** + * Request parameters for templatesStatuschecksGet operation in TemplateApi. + * @export + * @interface TemplateApiTemplatesStatuschecksGetRequest + */ +export interface TemplateApiTemplatesStatuschecksGetRequest { + /** + * filter status check templates by namespace + * @type {string} + * @memberof TemplateApiTemplatesStatuschecksGet + */ + readonly namespace?: string + + /** + * filter status check templates by name + * @type {string} + * @memberof TemplateApiTemplatesStatuschecksGet + */ + readonly name?: string +} + /** * TemplateApi - object-oriented interface * @export @@ -7610,15 +11175,17 @@ export class TemplateApi extends BaseAPI { /** * Get status check templates from k8s cluster in real time. * @summary List status check templates. - * @param {string} [namespace] filter status check templates by namespace - * @param {string} [name] filter status check templates by name + * @param {TemplateApiTemplatesStatuschecksGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplateApi */ - public templatesStatuschecksGet(namespace?: string, name?: string, options?: AxiosRequestConfig) { + public templatesStatuschecksGet( + requestParameters: TemplateApiTemplatesStatuschecksGetRequest = {}, + options?: AxiosRequestConfig + ) { return TemplateApiFp(this.configuration) - .templatesStatuschecksGet(namespace, name, options) + .templatesStatuschecksGet(requestParameters.namespace, requestParameters.name, options) .then((request) => request(this.axios, this.basePath)) } } @@ -7632,12 +11199,12 @@ export const TemplatesApiAxiosParamCreator = function (configuration?: Configura /** * Pass a JSON object to create a new status check template. * @summary Create a new status check template. - * @param {TemplateStatusCheckTemplate} statuscheck the status check definition + * @param {TypesStatusCheckTemplate} statuscheck the status check definition * @param {*} [options] Override http request option. * @throws {RequiredError} */ templatesStatuschecksPost: async ( - statuscheck: TemplateStatusCheckTemplate, + statuscheck: TypesStatusCheckTemplate, options: AxiosRequestConfig = {} ): Promise => { // verify required parameter 'statuscheck' is not null or undefined @@ -7761,12 +11328,12 @@ export const TemplatesApiAxiosParamCreator = function (configuration?: Configura /** * Update a status check template by namespaced name. * @summary Update a status check template. - * @param {TemplateStatusCheckTemplate} request Request body + * @param {TypesStatusCheckTemplate} request Request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ templatesStatuschecksStatuscheckPut: async ( - request: TemplateStatusCheckTemplate, + request: TypesStatusCheckTemplate, options: AxiosRequestConfig = {} ): Promise => { // verify required parameter 'request' is not null or undefined @@ -7808,14 +11375,14 @@ export const TemplatesApiFp = function (configuration?: Configuration) { /** * Pass a JSON object to create a new status check template. * @summary Create a new status check template. - * @param {TemplateStatusCheckTemplate} statuscheck the status check definition + * @param {TypesStatusCheckTemplate} statuscheck the status check definition * @param {*} [options] Override http request option. * @throws {RequiredError} */ async templatesStatuschecksPost( - statuscheck: TemplateStatusCheckTemplate, + statuscheck: TypesStatusCheckTemplate, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.templatesStatuschecksPost(statuscheck, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -7851,7 +11418,7 @@ export const TemplatesApiFp = function (configuration?: Configuration) { namespace: string, name: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.templatesStatuschecksStatuscheckGet( namespace, name, @@ -7862,14 +11429,14 @@ export const TemplatesApiFp = function (configuration?: Configuration) { /** * Update a status check template by namespaced name. * @summary Update a status check template. - * @param {TemplateStatusCheckTemplate} request Request body + * @param {TypesStatusCheckTemplate} request Request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ async templatesStatuschecksStatuscheckPut( - request: TemplateStatusCheckTemplate, + request: TypesStatusCheckTemplate, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.templatesStatuschecksStatuscheckPut(request, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -7886,14 +11453,14 @@ export const TemplatesApiFactory = function (configuration?: Configuration, base /** * Pass a JSON object to create a new status check template. * @summary Create a new status check template. - * @param {TemplateStatusCheckTemplate} statuscheck the status check definition + * @param {TypesStatusCheckTemplate} statuscheck the status check definition * @param {*} [options] Override http request option. * @throws {RequiredError} */ templatesStatuschecksPost( - statuscheck: TemplateStatusCheckTemplate, + statuscheck: TypesStatusCheckTemplate, options?: any - ): AxiosPromise { + ): AxiosPromise { return localVarFp.templatesStatuschecksPost(statuscheck, options).then((request) => request(axios, basePath)) }, /** @@ -7925,7 +11492,7 @@ export const TemplatesApiFactory = function (configuration?: Configuration, base namespace: string, name: string, options?: any - ): AxiosPromise { + ): AxiosPromise { return localVarFp .templatesStatuschecksStatuscheckGet(namespace, name, options) .then((request) => request(axios, basePath)) @@ -7933,14 +11500,14 @@ export const TemplatesApiFactory = function (configuration?: Configuration, base /** * Update a status check template by namespaced name. * @summary Update a status check template. - * @param {TemplateStatusCheckTemplate} request Request body + * @param {TypesStatusCheckTemplate} request Request body * @param {*} [options] Override http request option. * @throws {RequiredError} */ templatesStatuschecksStatuscheckPut( - request: TemplateStatusCheckTemplate, + request: TypesStatusCheckTemplate, options?: any - ): AxiosPromise { + ): AxiosPromise { return localVarFp .templatesStatuschecksStatuscheckPut(request, options) .then((request) => request(axios, basePath)) @@ -7948,6 +11515,76 @@ export const TemplatesApiFactory = function (configuration?: Configuration, base } } +/** + * Request parameters for templatesStatuschecksPost operation in TemplatesApi. + * @export + * @interface TemplatesApiTemplatesStatuschecksPostRequest + */ +export interface TemplatesApiTemplatesStatuschecksPostRequest { + /** + * the status check definition + * @type {TypesStatusCheckTemplate} + * @memberof TemplatesApiTemplatesStatuschecksPost + */ + readonly statuscheck: TypesStatusCheckTemplate +} + +/** + * Request parameters for templatesStatuschecksStatuscheckDelete operation in TemplatesApi. + * @export + * @interface TemplatesApiTemplatesStatuschecksStatuscheckDeleteRequest + */ +export interface TemplatesApiTemplatesStatuschecksStatuscheckDeleteRequest { + /** + * the namespace of status check templates + * @type {string} + * @memberof TemplatesApiTemplatesStatuschecksStatuscheckDelete + */ + readonly namespace: string + + /** + * the name of status check templates + * @type {string} + * @memberof TemplatesApiTemplatesStatuschecksStatuscheckDelete + */ + readonly name: string +} + +/** + * Request parameters for templatesStatuschecksStatuscheckGet operation in TemplatesApi. + * @export + * @interface TemplatesApiTemplatesStatuschecksStatuscheckGetRequest + */ +export interface TemplatesApiTemplatesStatuschecksStatuscheckGetRequest { + /** + * the namespace of status check templates + * @type {string} + * @memberof TemplatesApiTemplatesStatuschecksStatuscheckGet + */ + readonly namespace: string + + /** + * the name of status check templates + * @type {string} + * @memberof TemplatesApiTemplatesStatuschecksStatuscheckGet + */ + readonly name: string +} + +/** + * Request parameters for templatesStatuschecksStatuscheckPut operation in TemplatesApi. + * @export + * @interface TemplatesApiTemplatesStatuschecksStatuscheckPutRequest + */ +export interface TemplatesApiTemplatesStatuschecksStatuscheckPutRequest { + /** + * Request body + * @type {TypesStatusCheckTemplate} + * @memberof TemplatesApiTemplatesStatuschecksStatuscheckPut + */ + readonly request: TypesStatusCheckTemplate +} + /** * TemplatesApi - object-oriented interface * @export @@ -7958,58 +11595,68 @@ export class TemplatesApi extends BaseAPI { /** * Pass a JSON object to create a new status check template. * @summary Create a new status check template. - * @param {TemplateStatusCheckTemplate} statuscheck the status check definition + * @param {TemplatesApiTemplatesStatuschecksPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ - public templatesStatuschecksPost(statuscheck: TemplateStatusCheckTemplate, options?: AxiosRequestConfig) { + public templatesStatuschecksPost( + requestParameters: TemplatesApiTemplatesStatuschecksPostRequest, + options?: AxiosRequestConfig + ) { return TemplatesApiFp(this.configuration) - .templatesStatuschecksPost(statuscheck, options) + .templatesStatuschecksPost(requestParameters.statuscheck, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the status check template by namespaced name. * @summary Delete a status check template. - * @param {string} namespace the namespace of status check templates - * @param {string} name the name of status check templates + * @param {TemplatesApiTemplatesStatuschecksStatuscheckDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ - public templatesStatuschecksStatuscheckDelete(namespace: string, name: string, options?: AxiosRequestConfig) { + public templatesStatuschecksStatuscheckDelete( + requestParameters: TemplatesApiTemplatesStatuschecksStatuscheckDeleteRequest, + options?: AxiosRequestConfig + ) { return TemplatesApiFp(this.configuration) - .templatesStatuschecksStatuscheckDelete(namespace, name, options) + .templatesStatuschecksStatuscheckDelete(requestParameters.namespace, requestParameters.name, options) .then((request) => request(this.axios, this.basePath)) } /** * Get the status check template\'s detail by namespaced name. * @summary Get a status check template. - * @param {string} namespace the namespace of status check templates - * @param {string} name the name of status check templates + * @param {TemplatesApiTemplatesStatuschecksStatuscheckGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ - public templatesStatuschecksStatuscheckGet(namespace: string, name: string, options?: AxiosRequestConfig) { + public templatesStatuschecksStatuscheckGet( + requestParameters: TemplatesApiTemplatesStatuschecksStatuscheckGetRequest, + options?: AxiosRequestConfig + ) { return TemplatesApiFp(this.configuration) - .templatesStatuschecksStatuscheckGet(namespace, name, options) + .templatesStatuschecksStatuscheckGet(requestParameters.namespace, requestParameters.name, options) .then((request) => request(this.axios, this.basePath)) } /** * Update a status check template by namespaced name. * @summary Update a status check template. - * @param {TemplateStatusCheckTemplate} request Request body + * @param {TemplatesApiTemplatesStatuschecksStatuscheckPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ - public templatesStatuschecksStatuscheckPut(request: TemplateStatusCheckTemplate, options?: AxiosRequestConfig) { + public templatesStatuschecksStatuscheckPut( + requestParameters: TemplatesApiTemplatesStatuschecksStatuscheckPutRequest, + options?: AxiosRequestConfig + ) { return TemplatesApiFp(this.configuration) - .templatesStatuschecksStatuscheckPut(request, options) + .templatesStatuschecksStatuscheckPut(requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } } @@ -8388,7 +12035,7 @@ export const WorkflowsApiFp = function (configuration?: Configuration) { async workflowsUidDelete( uid: string, options?: AxiosRequestConfig - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.workflowsUidDelete(uid, options) return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration) }, @@ -8498,7 +12145,7 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base * @param {*} [options] Override http request option. * @throws {RequiredError} */ - workflowsUidDelete(uid: string, options?: any): AxiosPromise { + workflowsUidDelete(uid: string, options?: any): AxiosPromise { return localVarFp.workflowsUidDelete(uid, options).then((request) => request(axios, basePath)) }, /** @@ -8535,6 +12182,132 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base } } +/** + * Request parameters for workflowsGet operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsGetRequest + */ +export interface WorkflowsApiWorkflowsGetRequest { + /** + * namespace, given empty string means list from all namespace + * @type {string} + * @memberof WorkflowsApiWorkflowsGet + */ + readonly namespace?: string + + /** + * status + * @type {'Initializing' | 'Running' | 'Errored' | 'Finished'} + * @memberof WorkflowsApiWorkflowsGet + */ + readonly status?: 'Initializing' | 'Running' | 'Errored' | 'Finished' +} + +/** + * Request parameters for workflowsParseTaskHttpPost operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsParseTaskHttpPostRequest + */ +export interface WorkflowsApiWorkflowsParseTaskHttpPostRequest { + /** + * Rendered Task + * @type {V1alpha1Template} + * @memberof WorkflowsApiWorkflowsParseTaskHttpPost + */ + readonly request: V1alpha1Template +} + +/** + * Request parameters for workflowsPost operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsPostRequest + */ +export interface WorkflowsApiWorkflowsPostRequest { + /** + * Request body + * @type {V1alpha1Workflow} + * @memberof WorkflowsApiWorkflowsPost + */ + readonly request: V1alpha1Workflow +} + +/** + * Request parameters for workflowsRenderTaskHttpPost operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsRenderTaskHttpPostRequest + */ +export interface WorkflowsApiWorkflowsRenderTaskHttpPostRequest { + /** + * Origin HTTP Request + * @type {CurlRequestForm} + * @memberof WorkflowsApiWorkflowsRenderTaskHttpPost + */ + readonly request: CurlRequestForm +} + +/** + * Request parameters for workflowsUidDelete operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsUidDeleteRequest + */ +export interface WorkflowsApiWorkflowsUidDeleteRequest { + /** + * uid + * @type {string} + * @memberof WorkflowsApiWorkflowsUidDelete + */ + readonly uid: string +} + +/** + * Request parameters for workflowsUidGet operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsUidGetRequest + */ +export interface WorkflowsApiWorkflowsUidGetRequest { + /** + * uid + * @type {string} + * @memberof WorkflowsApiWorkflowsUidGet + */ + readonly uid: string +} + +/** + * Request parameters for workflowsUidPut operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsUidPutRequest + */ +export interface WorkflowsApiWorkflowsUidPutRequest { + /** + * uid + * @type {string} + * @memberof WorkflowsApiWorkflowsUidPut + */ + readonly uid: string + + /** + * Request body + * @type {V1alpha1Workflow} + * @memberof WorkflowsApiWorkflowsUidPut + */ + readonly request: V1alpha1Workflow +} + +/** + * Request parameters for workflowsValidateTaskHttpPost operation in WorkflowsApi. + * @export + * @interface WorkflowsApiWorkflowsValidateTaskHttpPostRequest + */ +export interface WorkflowsApiWorkflowsValidateTaskHttpPostRequest { + /** + * Rendered Task + * @type {V1alpha1Template} + * @memberof WorkflowsApiWorkflowsValidateTaskHttpPost + */ + readonly request: V1alpha1Template +} + /** * WorkflowsApi - object-oriented interface * @export @@ -8545,118 +12318,121 @@ export class WorkflowsApi extends BaseAPI { /** * List workflows from Kubernetes cluster. * @summary List workflows from Kubernetes cluster. - * @param {string} [namespace] namespace, given empty string means list from all namespace - * @param {'Initializing' | 'Running' | 'Errored' | 'Finished'} [status] status + * @param {WorkflowsApiWorkflowsGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsGet( - namespace?: string, - status?: 'Initializing' | 'Running' | 'Errored' | 'Finished', - options?: AxiosRequestConfig - ) { + public workflowsGet(requestParameters: WorkflowsApiWorkflowsGetRequest = {}, options?: AxiosRequestConfig) { return WorkflowsApiFp(this.configuration) - .workflowsGet(namespace, status, options) + .workflowsGet(requestParameters.namespace, requestParameters.status, options) .then((request) => request(this.axios, this.basePath)) } /** * Parse the rendered task back to the original request * @summary Parse the rendered task back to the original request - * @param {V1alpha1Template} request Rendered Task + * @param {WorkflowsApiWorkflowsParseTaskHttpPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsParseTaskHttpPost(request: V1alpha1Template, options?: AxiosRequestConfig) { + public workflowsParseTaskHttpPost( + requestParameters: WorkflowsApiWorkflowsParseTaskHttpPostRequest, + options?: AxiosRequestConfig + ) { return WorkflowsApiFp(this.configuration) - .workflowsParseTaskHttpPost(request, options) + .workflowsParseTaskHttpPost(requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } /** * Create a new workflow. * @summary Create a new workflow. - * @param {V1alpha1Workflow} request Request body + * @param {WorkflowsApiWorkflowsPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsPost(request: V1alpha1Workflow, options?: AxiosRequestConfig) { + public workflowsPost(requestParameters: WorkflowsApiWorkflowsPostRequest, options?: AxiosRequestConfig) { return WorkflowsApiFp(this.configuration) - .workflowsPost(request, options) + .workflowsPost(requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } /** * Render a task which sends HTTP request * @summary Render a task which sends HTTP request - * @param {CurlRequestForm} request Origin HTTP Request + * @param {WorkflowsApiWorkflowsRenderTaskHttpPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsRenderTaskHttpPost(request: CurlRequestForm, options?: AxiosRequestConfig) { + public workflowsRenderTaskHttpPost( + requestParameters: WorkflowsApiWorkflowsRenderTaskHttpPostRequest, + options?: AxiosRequestConfig + ) { return WorkflowsApiFp(this.configuration) - .workflowsRenderTaskHttpPost(request, options) + .workflowsRenderTaskHttpPost(requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } /** * Delete the specified workflow. * @summary Delete the specified workflow. - * @param {string} uid uid + * @param {WorkflowsApiWorkflowsUidDeleteRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsUidDelete(uid: string, options?: AxiosRequestConfig) { + public workflowsUidDelete(requestParameters: WorkflowsApiWorkflowsUidDeleteRequest, options?: AxiosRequestConfig) { return WorkflowsApiFp(this.configuration) - .workflowsUidDelete(uid, options) + .workflowsUidDelete(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Get detailed information about the specified workflow. If that object is not existed in kubernetes, it will only return ths persisted data in the database. * @summary Get detailed information about the specified workflow. - * @param {string} uid uid + * @param {WorkflowsApiWorkflowsUidGetRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsUidGet(uid: string, options?: AxiosRequestConfig) { + public workflowsUidGet(requestParameters: WorkflowsApiWorkflowsUidGetRequest, options?: AxiosRequestConfig) { return WorkflowsApiFp(this.configuration) - .workflowsUidGet(uid, options) + .workflowsUidGet(requestParameters.uid, options) .then((request) => request(this.axios, this.basePath)) } /** * Update a workflow. * @summary Update a workflow. - * @param {string} uid uid - * @param {V1alpha1Workflow} request Request body + * @param {WorkflowsApiWorkflowsUidPutRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsUidPut(uid: string, request: V1alpha1Workflow, options?: AxiosRequestConfig) { + public workflowsUidPut(requestParameters: WorkflowsApiWorkflowsUidPutRequest, options?: AxiosRequestConfig) { return WorkflowsApiFp(this.configuration) - .workflowsUidPut(uid, request, options) + .workflowsUidPut(requestParameters.uid, requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } /** * Validate the given template is a valid rendered HTTP Task * @summary Validate the given template is a valid rendered HTTP Task - * @param {V1alpha1Template} request Rendered Task + * @param {WorkflowsApiWorkflowsValidateTaskHttpPostRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WorkflowsApi */ - public workflowsValidateTaskHttpPost(request: V1alpha1Template, options?: AxiosRequestConfig) { + public workflowsValidateTaskHttpPost( + requestParameters: WorkflowsApiWorkflowsValidateTaskHttpPostRequest, + options?: AxiosRequestConfig + ) { return WorkflowsApiFp(this.configuration) - .workflowsValidateTaskHttpPost(request, options) + .workflowsValidateTaskHttpPost(requestParameters.request, options) .then((request) => request(this.axios, this.basePath)) } } diff --git a/ui/app/src/openapi/base.ts b/ui/app/src/openapi/base.ts index f3d3e60a31..f06e98dc49 100644 --- a/ui/app/src/openapi/base.ts +++ b/ui/app/src/openapi/base.ts @@ -1,17 +1,18 @@ /* tslint:disable */ + /* eslint-disable */ + /** * Chaos Mesh Dashboard API * Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report. * - * The version of the OpenAPI document: 2.0 + * The version of the OpenAPI document: 2.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - // Some imports not used depending on template conditions // @ts-ignore import globalAxios, { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios' diff --git a/ui/app/src/openapi/common.ts b/ui/app/src/openapi/common.ts index ef94be4ca5..80111e9a4e 100644 --- a/ui/app/src/openapi/common.ts +++ b/ui/app/src/openapi/common.ts @@ -1,20 +1,21 @@ /* tslint:disable */ + /* eslint-disable */ + /** * Chaos Mesh Dashboard API * Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report. * - * The version of the OpenAPI document: 2.0 + * The version of the OpenAPI document: 2.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - import { AxiosInstance, AxiosResponse } from 'axios' -import { RequestArgs, RequiredError } from './base' +import { RequestArgs, RequiredError } from './base' import { Configuration } from './configuration' /** diff --git a/ui/app/src/openapi/configuration.ts b/ui/app/src/openapi/configuration.ts index a711d6ec72..a4aa6f7ade 100644 --- a/ui/app/src/openapi/configuration.ts +++ b/ui/app/src/openapi/configuration.ts @@ -4,7 +4,7 @@ * Chaos Mesh Dashboard API * Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report. * - * The version of the OpenAPI document: 2.0 + * The version of the OpenAPI document: 2.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/ui/app/src/openapi/index.ts b/ui/app/src/openapi/index.ts index d10241847b..491f5285df 100644 --- a/ui/app/src/openapi/index.ts +++ b/ui/app/src/openapi/index.ts @@ -4,7 +4,7 @@ * Chaos Mesh Dashboard API * Swagger for Chaos Mesh Dashboard. If you encounter any problems with API, please click on the issues link below to report. * - * The version of the OpenAPI document: 2.0 + * The version of the OpenAPI document: 2.2 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/ui/app/src/pages/Archives/Single.tsx b/ui/app/src/pages/Archives/Single.tsx index b4227b4890..dcc7c2dca0 100644 --- a/ui/app/src/pages/Archives/Single.tsx +++ b/ui/app/src/pages/Archives/Single.tsx @@ -17,9 +17,8 @@ import loadable from '@loadable/component' import { Box, Grid, Grow } from '@mui/material' import api from 'api' -import { ArchiveSingle } from 'api/archives.type' -import { Event } from 'api/events.type' import yaml from 'js-yaml' +import { CoreEvent, TypesArchiveDetail } from 'openapi' import { useCallback, useEffect, useState } from 'react' import { useParams } from 'react-router-dom' @@ -43,25 +42,30 @@ const Single = () => { let kind = query.get('kind') || 'experiment' const [loading, setLoading] = useState(true) - const [single, setSingle] = useState<{ kind: string; data: ArchiveSingle | null }>({ kind, data: null }) - const [events, setEvents] = useState([]) + const [single, setSingle] = useState<{ kind: string; data: TypesArchiveDetail | null }>({ + kind, + data: null, + }) + const [events, setEvents] = useState([]) const fetchSingle = useCallback(() => { let request switch (kind) { case 'workflow': - request = api.workflows.singleArchive + request = api.archives.archivesWorkflowsUidGet break case 'schedule': - request = api.schedules.singleArchive + request = api.archives.archivesSchedulesUidGet break case 'experiment': default: - request = api.archives.single + request = api.archives.archivesUidGet break } - request(uuid!) + request({ + uid: uuid!, + }) .then(({ data }) => { setSingle({ kind, data }) }) @@ -80,7 +84,10 @@ const Single = () => { const fetchEvents = () => { api.events - .events({ object_id: uuid, limit: 999 }) + .eventsGet({ + objectId: uuid, + limit: 999, + }) .then(({ data }) => setEvents(data)) .catch(console.error) .finally(() => { diff --git a/ui/app/src/pages/Archives/index.tsx b/ui/app/src/pages/Archives/index.tsx index 19a66ed3a4..c773da72da 100644 --- a/ui/app/src/pages/Archives/index.tsx +++ b/ui/app/src/pages/Archives/index.tsx @@ -14,32 +14,36 @@ * limitations under the License. * */ -import { Box, Button, Checkbox, Typography, styled } from '@mui/material' -import { Confirm, setAlert, setConfirm } from 'slices/globalStatus' -import { FixedSizeList as RWList, ListChildComponentProps as RWListChildComponentProps } from 'react-window' -import { useCallback, useEffect, useState } from 'react' - -import { Archive } from 'api/archives.type' import CloseIcon from '@mui/icons-material/Close' import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined' import FilterListIcon from '@mui/icons-material/FilterList' -import Loading from '@ui/mui-extends/esm/Loading' -import NotFound from 'components/NotFound' -import ObjectListItem from 'components/ObjectListItem' import PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck' -import Space from '@ui/mui-extends/esm/Space' -import Tab from '@mui/material/Tab' import TabContext from '@mui/lab/TabContext' import TabList from '@mui/lab/TabList' -import _ from 'lodash' +import { Box, Button, Checkbox, Typography, styled } from '@mui/material' +import Tab from '@mui/material/Tab' import api from 'api' -import i18n from 'components/T' -import { transByKind } from 'lib/byKind' +import _ from 'lodash' +import { TypesArchive } from 'openapi' +import { useCallback, useEffect, useState } from 'react' import { useIntl } from 'react-intl' import { useNavigate } from 'react-router-dom' -import { useQuery } from 'lib/hooks' +import { FixedSizeList as RWList, ListChildComponentProps as RWListChildComponentProps } from 'react-window' + +import Loading from '@ui/mui-extends/esm/Loading' +import Space from '@ui/mui-extends/esm/Space' + import { useStoreDispatch } from 'store' +import { Confirm, setAlert, setConfirm } from 'slices/globalStatus' + +import NotFound from 'components/NotFound' +import ObjectListItem from 'components/ObjectListItem' +import i18n from 'components/T' + +import { transByKind } from 'lib/byKind' +import { useQuery } from 'lib/hooks' + const StyledCheckBox = styled(Checkbox)({ position: 'relative', left: -11, @@ -61,7 +65,7 @@ export default function Archives() { const [panel, setPanel] = useState(kind as PanelType) const [loading, setLoading] = useState(true) - const [archives, setArchives] = useState([]) + const [archives, setArchives] = useState([]) const [batch, setBatch] = useState>({}) const batchLength = Object.keys(batch).length const isBatchEmpty = batchLength === 0 @@ -70,14 +74,14 @@ export default function Archives() { let request switch (kind) { case 'workflow': - request = api.workflows.archives + request = api.archives.archivesWorkflowsGet break case 'schedule': - request = api.schedules.archives + request = api.archives.archivesSchedulesGet break case 'experiment': default: - request = api.archives.archives + request = api.archives.archivesGet break } @@ -109,34 +113,38 @@ export default function Archives() { case 'delete': switch (kind) { case 'workflow': - actionFunc = api.workflows.delArchive + actionFunc = api.archives.archivesWorkflowsUidDelete break case 'schedule': - actionFunc = api.schedules.delArchive + actionFunc = api.archives.archivesSchedulesUidDelete break case 'experiment': default: - actionFunc = api.archives.del + actionFunc = api.archives.archivesUidDelete break } - arg = uuid + arg = { uid: uuid } break case 'deleteMulti': action = 'delete' switch (kind) { case 'workflow': - actionFunc = api.workflows.delArchives + actionFunc = api.archives.archivesWorkflowsDelete break case 'schedule': - actionFunc = api.schedules.delArchives + actionFunc = api.archives.archivesSchedulesDelete break case 'experiment': default: - actionFunc = api.archives.delMulti + actionFunc = api.archives.archivesDelete break } - arg = Object.keys(batch).filter((d) => batch[d] === true) + arg = { + uids: Object.keys(batch) + .filter((d) => batch[d] === true) + .join(','), + } setBatch({}) break @@ -158,13 +166,13 @@ export default function Archives() { } } - const handleBatchSelect = () => setBatch(isBatchEmpty ? { [archives[0].uid]: true } : {}) + const handleBatchSelect = () => setBatch(isBatchEmpty ? { [archives[0].uid!]: true } : {}) const handleBatchSelectAll = () => setBatch( batchLength <= archives.length ? archives.reduce>((acc, d) => { - acc[d.uid] = true + acc[d.uid!] = true return acc }, {}) diff --git a/ui/app/src/pages/Dashboard/Predefined.tsx b/ui/app/src/pages/Dashboard/Predefined.tsx index 6fbf6d768c..3e7a608fdb 100644 --- a/ui/app/src/pages/Dashboard/Predefined.tsx +++ b/ui/app/src/pages/Dashboard/Predefined.tsx @@ -14,6 +14,7 @@ * limitations under the License. * */ + import { Box, Button, Card, Modal, Typography } from '@mui/material' import { PreDefinedValue, getDB } from 'lib/idb' import { setAlert, setConfirm } from 'slices/globalStatus' @@ -107,7 +108,9 @@ const Predefined = () => { const exp: any = yaml.load(yamlEditor!.getValue()) const isSchedule = exp['kind'] === 'Schedule' - const action = isSchedule ? api.schedules.newSchedule : api.experiments.newExperiment + const action = isSchedule + ? (schedule: any) => api.schedules.schedulesPost({ schedule }) + : (chaos: any) => api.experiments.experimentsPost({ chaos }) action(exp) .then(() => { diff --git a/ui/app/src/pages/Dashboard/TotalStatus.tsx b/ui/app/src/pages/Dashboard/TotalStatus.tsx index c682a9999d..d491d2b7fb 100644 --- a/ui/app/src/pages/Dashboard/TotalStatus.tsx +++ b/ui/app/src/pages/Dashboard/TotalStatus.tsx @@ -14,13 +14,14 @@ * limitations under the License. * */ + import { Box, BoxProps } from '@mui/material' import { ComputedDatum, PieTooltipProps, ResponsivePie } from '@nivo/pie' import { useEffect, useState } from 'react' import NotFound from 'components/NotFound' import { PropertyAccessor } from '@nivo/core' -import { StatusOfExperiments } from 'api/experiments.type' +import { StatusAllChaosStatus } from 'openapi' import api from 'api' import i18n from 'components/T' import { schemeTableau10 } from 'd3-scale-chromatic' @@ -28,7 +29,7 @@ import { useIntl } from 'react-intl' import { useTheme } from '@mui/material/styles' interface SingleData { - id: keyof StatusOfExperiments + id: keyof StatusAllChaosStatus label: string value: number } @@ -57,10 +58,10 @@ const TotalStatus: React.FC = (props) => { useEffect(() => { const fetchState = () => { api.experiments - .state() + .experimentsStateGet() .then((resp) => setS( - (Object.entries(resp.data) as [keyof StatusOfExperiments, number][]).map(([k, v]) => ({ + (Object.entries(resp.data) as [keyof StatusAllChaosStatus, number][]).map(([k, v]) => ({ id: k, label: i18n(`status.${k}`, intl), value: v === 0 ? 0.01 : v, diff --git a/ui/app/src/pages/Dashboard/Welcome.tsx b/ui/app/src/pages/Dashboard/Welcome.tsx index 58382d310b..e0149bbb0f 100644 --- a/ui/app/src/pages/Dashboard/Welcome.tsx +++ b/ui/app/src/pages/Dashboard/Welcome.tsx @@ -14,19 +14,19 @@ * limitations under the License. * */ - -import { Button, Grid } from '@mui/material' - import AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined' +import ScheduleIcon from '@mui/icons-material/Schedule' +import ScienceOutlinedIcon from '@mui/icons-material/ScienceOutlined' +import { Button, Grid } from '@mui/material' +import { makeStyles } from '@mui/styles' +import { useTour } from '@reactour/tour' import { Link } from 'react-router-dom' + import Paper from '@ui/mui-extends/esm/Paper' import PaperTop from '@ui/mui-extends/esm/PaperTop' -import ScheduleIcon from '@mui/icons-material/Schedule' -import ScienceOutlinedIcon from '@mui/icons-material/ScienceOutlined' import Space from '@ui/mui-extends/esm/Space' + import i18n from 'components/T' -import { makeStyles } from '@mui/styles' -import { useTour } from '@reactour/tour' const useStyles = makeStyles((theme) => ({ space: { diff --git a/ui/app/src/pages/Dashboard/index.tsx b/ui/app/src/pages/Dashboard/index.tsx index cce872172b..abf06eef48 100644 --- a/ui/app/src/pages/Dashboard/index.tsx +++ b/ui/app/src/pages/Dashboard/index.tsx @@ -14,31 +14,29 @@ * limitations under the License. * */ - -import { Box, Grid, Grow, IconButton, Typography } from '@mui/material' -import { useEffect, useState } from 'react' - import AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined' import ArrowBackOutlinedIcon from '@mui/icons-material/ArrowBackOutlined' import ArrowForwardOutlinedIcon from '@mui/icons-material/ArrowForwardOutlined' -import { Event } from 'api/events.type' -import EventsChart from 'components/EventsChart' -import EventsTimeline from 'components/EventsTimeline' -import { Experiment } from 'api/experiments.type' -import Paper from '@ui/mui-extends/esm/Paper' -import PaperTop from '@ui/mui-extends/esm/PaperTop' -import Predefined from './Predefined' -import type { ReactChild } from 'react' -import { Schedule } from 'api/schedules.type' import ScheduleIcon from '@mui/icons-material/Schedule' import ScienceOutlinedIcon from '@mui/icons-material/ScienceOutlined' -import TotalStatus from './TotalStatus' +import { Box, Grid, Grow, IconButton, Typography } from '@mui/material' +import { useTheme } from '@mui/material/styles' import { TourProvider } from '@reactour/tour' -import Welcome from './Welcome' -import { Workflow } from 'api/workflows.type' import api from 'api' +import { CoreEvent, CoreWorkflowMeta, TypesExperiment, TypesSchedule } from 'openapi' +import { useEffect, useState } from 'react' +import type { ReactChild } from 'react' + +import Paper from '@ui/mui-extends/esm/Paper' +import PaperTop from '@ui/mui-extends/esm/PaperTop' + +import EventsChart from 'components/EventsChart' +import EventsTimeline from 'components/EventsTimeline' import i18n from 'components/T' -import { useTheme } from '@mui/material/styles' + +import Predefined from './Predefined' +import TotalStatus from './TotalStatus' +import Welcome from './Welcome' const NumPanel: React.FC<{ title: ReactChild; num: number; background: ReactChild }> = ({ title, num, background }) => ( @@ -56,10 +54,10 @@ const NumPanel: React.FC<{ title: ReactChild; num: number; background: ReactChil export default function Dashboard() { const [data, setData] = useState<{ - workflows: Workflow[] - schedules: Schedule[] - experiments: Experiment[] - events: Event[] + workflows: CoreWorkflowMeta[] + schedules: TypesSchedule[] + experiments: TypesExperiment[] + events: CoreEvent[] }>({ workflows: [], schedules: [], @@ -68,10 +66,10 @@ export default function Dashboard() { }) useEffect(() => { - const fetchExperiments = api.experiments.experiments() - const fetchSchedules = api.schedules.schedules() - const fetchWorkflows = api.workflows.workflows() - const fetchEvents = api.events.events({ limit: 216 }) + const fetchExperiments = api.experiments.experimentsGet() + const fetchSchedules = api.schedules.schedulesGet() + const fetchWorkflows = api.workflows.workflowsGet() + const fetchEvents = api.events.eventsGet({ limit: 216 }) const fetchAll = () => { Promise.all([fetchSchedules, fetchWorkflows, fetchExperiments, fetchEvents]) .then((data) => diff --git a/ui/app/src/pages/Events/index.tsx b/ui/app/src/pages/Events/index.tsx index bb37fab272..1fa44de8ef 100644 --- a/ui/app/src/pages/Events/index.tsx +++ b/ui/app/src/pages/Events/index.tsx @@ -17,7 +17,7 @@ import { Grow, Typography } from '@mui/material' import { useEffect, useState } from 'react' -import { Event } from 'api/events.type' +import { CoreEvent } from 'openapi' import EventsTable from 'components/EventsTable' import Loading from '@ui/mui-extends/esm/Loading' import NotFound from 'components/NotFound' @@ -26,12 +26,12 @@ import i18n from 'components/T' export default function Events() { const [loading, setLoading] = useState(true) - const [events, setEvents] = useState([]) + const [events, setEvents] = useState([]) useEffect(() => { const fetchEvents = () => { api.events - .events() + .eventsGet() .then(({ data }) => setEvents(data)) .catch(console.error) .finally(() => setLoading(false)) diff --git a/ui/app/src/pages/Experiments/Single.tsx b/ui/app/src/pages/Experiments/Single.tsx index 2cc2244399..e8c4362630 100644 --- a/ui/app/src/pages/Experiments/Single.tsx +++ b/ui/app/src/pages/Experiments/Single.tsx @@ -21,9 +21,8 @@ import PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline' import Alert from '@mui/lab/Alert' import { Box, Button, Grid, Grow } from '@mui/material' import api from 'api' -import { Event } from 'api/events.type' -import { ExperimentSingle } from 'api/experiments.type' import yaml from 'js-yaml' +import { CoreEvent, TypesExperimentDetail } from 'openapi' import { useEffect, useState } from 'react' import { useIntl } from 'react-intl' import { useNavigate, useParams } from 'react-router-dom' @@ -53,12 +52,14 @@ export default function Single() { const dispatch = useStoreDispatch() const [loading, setLoading] = useState(true) - const [single, setSingle] = useState() - const [events, setEvents] = useState([]) + const [single, setSingle] = useState() + const [events, setEvents] = useState([]) const fetchExperiment = () => { api.experiments - .single(uuid!) + .experimentsUidGet({ + uid: uuid!, + }) .then(({ data }) => setSingle(data)) .catch(console.error) } @@ -71,7 +72,7 @@ export default function Single() { useEffect(() => { const fetchEvents = () => { api.events - .events({ object_id: uuid, limit: 999 }) + .eventsGet({ objectId: uuid, limit: 999 }) .then(({ data }) => setEvents(data)) .catch(console.error) .finally(() => { @@ -124,15 +125,15 @@ export default function Single() { switch (action) { case 'archive': - actionFunc = api.experiments.del + actionFunc = api.experiments.experimentsUidDelete break case 'pause': - actionFunc = api.experiments.pause + actionFunc = api.experiments.experimentsPauseUidPut break case 'start': - actionFunc = api.experiments.start + actionFunc = api.experiments.experimentsStartUidPut break default: @@ -140,7 +141,7 @@ export default function Single() { } if (actionFunc) { - actionFunc(uuid) + actionFunc({ uid: uuid }) .then(() => { dispatch( setAlert({ diff --git a/ui/app/src/pages/Experiments/index.tsx b/ui/app/src/pages/Experiments/index.tsx index 99b7bcabe3..5a75bf8395 100644 --- a/ui/app/src/pages/Experiments/index.tsx +++ b/ui/app/src/pages/Experiments/index.tsx @@ -14,30 +14,33 @@ * limitations under the License. * */ - -import { Box, Button, Checkbox, Typography, styled } from '@mui/material' -import { Confirm, setAlert, setConfirm } from 'slices/globalStatus' -import { FixedSizeList as RWList, ListChildComponentProps as RWListChildComponentProps } from 'react-window' - import AddIcon from '@mui/icons-material/Add' import ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined' import CloseIcon from '@mui/icons-material/Close' -import { Experiment } from 'api/experiments.type' import FilterListIcon from '@mui/icons-material/FilterList' +import PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck' +import { Box, Button, Checkbox, Typography, styled } from '@mui/material' +import api from 'api' +import _ from 'lodash' +import { TypesExperiment } from 'openapi' +import { useState } from 'react' +import { useIntl } from 'react-intl' +import { useNavigate } from 'react-router-dom' +import { FixedSizeList as RWList, ListChildComponentProps as RWListChildComponentProps } from 'react-window' + import Loading from '@ui/mui-extends/esm/Loading' +import Space from '@ui/mui-extends/esm/Space' + +import { useStoreDispatch } from 'store' + +import { Confirm, setAlert, setConfirm } from 'slices/globalStatus' + import NotFound from 'components/NotFound' import ObjectListItem from 'components/ObjectListItem' -import PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck' -import Space from '@ui/mui-extends/esm/Space' -import _ from 'lodash' -import api from 'api' import i18n from 'components/T' + import { transByKind } from 'lib/byKind' import { useIntervalFetch } from 'lib/hooks' -import { useIntl } from 'react-intl' -import { useNavigate } from 'react-router-dom' -import { useState } from 'react' -import { useStoreDispatch } from 'store' const StyledCheckBox = styled(Checkbox)({ position: 'relative', @@ -55,14 +58,14 @@ export default function Experiments() { const dispatch = useStoreDispatch() const [loading, setLoading] = useState(true) - const [experiments, setExperiments] = useState([]) + const [experiments, setExperiments] = useState([]) const [batch, setBatch] = useState>({}) const batchLength = Object.keys(batch).length const isBatchEmpty = batchLength === 0 const fetchExperiments = (intervalID?: number) => { api.experiments - .experiments() + .experimentsGet() .then(({ data }) => { setExperiments(data) @@ -92,25 +95,25 @@ export default function Experiments() { switch (action) { case 'archive': - actionFunc = api.experiments.del - arg = uuid + actionFunc = api.experiments.experimentsUidDelete + arg = { uid: uuid } break case 'archiveMulti': action = 'archive' - actionFunc = api.experiments.delMulti - arg = Object.keys(batch) + actionFunc = api.experiments.experimentsDelete + arg = { uids: Object.keys(batch).join(',') } setBatch({}) break case 'pause': - actionFunc = api.experiments.pause - arg = uuid + actionFunc = api.experiments.experimentsPauseUidPut + arg = { uid: uuid } break case 'start': - actionFunc = api.experiments.start - arg = uuid + actionFunc = api.experiments.experimentsStartUidPut + arg = { uid: uuid } break } @@ -131,13 +134,13 @@ export default function Experiments() { } } - const handleBatchSelect = () => setBatch(isBatchEmpty ? { [experiments[0].uid]: true } : {}) + const handleBatchSelect = () => setBatch(isBatchEmpty ? { [experiments[0].uid!]: true } : {}) const handleBatchSelectAll = () => setBatch( batchLength <= experiments.length ? experiments.reduce>((acc, d) => { - acc[d.uid] = true + acc[d.uid!] = true return acc }, {}) diff --git a/ui/app/src/pages/Schedules/New.tsx b/ui/app/src/pages/Schedules/New.tsx index 818fd5f385..d26aae9bf4 100644 --- a/ui/app/src/pages/Schedules/New.tsx +++ b/ui/app/src/pages/Schedules/New.tsx @@ -14,6 +14,7 @@ * limitations under the License. * */ + import { Grid } from '@mui/material' import NewExperiment from 'components/NewExperimentNext' import api from 'api' @@ -32,7 +33,7 @@ const New = () => { const onSubmit = (parsedValues: any) => { api.schedules - .newSchedule(parsedValues) + .schedulesPost({ schedule: parsedValues }) .then(() => { dispatch( setAlert({ diff --git a/ui/app/src/pages/Schedules/Single.tsx b/ui/app/src/pages/Schedules/Single.tsx index 0be7a15418..754eb4b576 100644 --- a/ui/app/src/pages/Schedules/Single.tsx +++ b/ui/app/src/pages/Schedules/Single.tsx @@ -20,9 +20,8 @@ import PauseCircleOutlineIcon from '@mui/icons-material/PauseCircleOutline' import PlayCircleOutlineIcon from '@mui/icons-material/PlayCircleOutline' import { Box, Button, Grid, Grow } from '@mui/material' import api from 'api' -import { Event } from 'api/events.type' -import { ScheduleSingle } from 'api/schedules.type' import yaml from 'js-yaml' +import { CoreEvent, TypesScheduleDetail } from 'openapi' import { useEffect, useState } from 'react' import { useIntl } from 'react-intl' import { useNavigate, useParams } from 'react-router-dom' @@ -52,12 +51,14 @@ const Single = () => { const dispatch = useStoreDispatch() const [loading, setLoading] = useState(true) - const [single, setSingle] = useState() - const [events, setEvents] = useState([]) + const [single, setSingle] = useState() + const [events, setEvents] = useState([]) const fetchSchedule = () => { api.schedules - .single(uuid!) + .schedulesUidGet({ + uid: uuid!, + }) .then(({ data }) => setSingle(data)) .catch(console.error) } @@ -70,7 +71,7 @@ const Single = () => { useEffect(() => { const fetchEvents = () => { api.events - .events({ object_id: uuid, limit: 999 }) + .eventsGet({ objectId: uuid, limit: 999 }) .then(({ data }) => setEvents(data)) .catch(console.error) .finally(() => { @@ -123,15 +124,15 @@ const Single = () => { switch (action) { case 'archive': - actionFunc = api.schedules.del + actionFunc = api.schedules.schedulesUidDelete break case 'pause': - actionFunc = api.schedules.pause + actionFunc = api.schedules.schedulesPauseUidPut break case 'start': - actionFunc = api.schedules.start + actionFunc = api.schedules.schedulesStartUidPut break default: @@ -139,7 +140,7 @@ const Single = () => { } if (actionFunc) { - actionFunc(uuid) + actionFunc({ uid: uuid }) .then(() => { dispatch( setAlert({ diff --git a/ui/app/src/pages/Schedules/index.tsx b/ui/app/src/pages/Schedules/index.tsx index 0b84657311..e9483b65fc 100644 --- a/ui/app/src/pages/Schedules/index.tsx +++ b/ui/app/src/pages/Schedules/index.tsx @@ -14,30 +14,34 @@ * limitations under the License. * */ -import { Box, Button, Checkbox, styled } from '@mui/material' -import { Confirm, setAlert, setConfirm } from 'slices/globalStatus' -import { FixedSizeList as RWList, ListChildComponentProps as RWListChildComponentProps } from 'react-window' -import { useEffect, useState } from 'react' - import AddIcon from '@mui/icons-material/Add' import CloseIcon from '@mui/icons-material/Close' import DeleteOutlinedIcon from '@mui/icons-material/DeleteOutlined' import FilterListIcon from '@mui/icons-material/FilterList' -import Loading from '@ui/mui-extends/esm/Loading' -import NotFound from 'components/NotFound' -import ObjectListItem from 'components/ObjectListItem' import PlaylistAddCheckIcon from '@mui/icons-material/PlaylistAddCheck' -import { Schedule } from 'api/schedules.type' -import Space from '@ui/mui-extends/esm/Space' +import { Box, Button, Checkbox, styled } from '@mui/material' import { Typography } from '@mui/material' -import _ from 'lodash' import api from 'api' -import i18n from 'components/T' -import { transByKind } from 'lib/byKind' +import _ from 'lodash' +import { TypesSchedule } from 'openapi' +import { useEffect, useState } from 'react' import { useIntl } from 'react-intl' import { useNavigate } from 'react-router-dom' +import { FixedSizeList as RWList, ListChildComponentProps as RWListChildComponentProps } from 'react-window' + +import Loading from '@ui/mui-extends/esm/Loading' +import Space from '@ui/mui-extends/esm/Space' + import { useStoreDispatch } from 'store' +import { Confirm, setAlert, setConfirm } from 'slices/globalStatus' + +import NotFound from 'components/NotFound' +import ObjectListItem from 'components/ObjectListItem' +import i18n from 'components/T' + +import { transByKind } from 'lib/byKind' + const StyledCheckBox = styled(Checkbox)({ position: 'relative', left: -11, @@ -54,14 +58,14 @@ const Schedules = () => { const dispatch = useStoreDispatch() const [loading, setLoading] = useState(true) - const [schedules, setSchedules] = useState([]) + const [schedules, setSchedules] = useState([]) const [batch, setBatch] = useState>({}) const batchLength = Object.keys(batch).length const isBatchEmpty = batchLength === 0 const fetchSchedules = () => { api.schedules - .schedules() + .schedulesGet() .then(({ data }) => setSchedules(data)) .catch(console.error) .finally(() => setLoading(false)) @@ -85,25 +89,25 @@ const Schedules = () => { switch (action) { case 'archive': - actionFunc = api.schedules.del - arg = uuid + actionFunc = api.schedules.schedulesUidDelete + arg = { uid: uuid } break case 'archiveMulti': action = 'archive' - actionFunc = api.schedules.delMulti - arg = Object.keys(batch) + actionFunc = api.schedules.schedulesDelete + arg = { uids: Object.keys(batch).join(',') } setBatch({}) break case 'pause': - actionFunc = api.schedules.pause - arg = uuid + actionFunc = api.schedules.schedulesPauseUidPut + arg = { uid: uuid } break case 'start': - actionFunc = api.schedules.start - arg = uuid + actionFunc = api.schedules.schedulesStartUidPut + arg = { uid: uuid } break } @@ -124,13 +128,13 @@ const Schedules = () => { } } - const handleBatchSelect = () => setBatch(isBatchEmpty ? { [schedules[0].uid]: true } : {}) + const handleBatchSelect = () => setBatch(isBatchEmpty ? { [schedules[0].uid!]: true } : {}) const handleBatchSelectAll = () => setBatch( batchLength <= schedules.length ? schedules.reduce>((acc, d) => { - acc[d.uid] = true + acc[d.uid!] = true return acc }, {}) diff --git a/ui/app/src/pages/Settings/Token.tsx b/ui/app/src/pages/Settings/Token.tsx index f7ee2cf759..d6b2f81846 100644 --- a/ui/app/src/pages/Settings/Token.tsx +++ b/ui/app/src/pages/Settings/Token.tsx @@ -14,20 +14,23 @@ * limitations under the License. * */ - +import GoogleIcon from '@mui/icons-material/Google' import { Box, Button } from '@mui/material' -import { useStoreDispatch, useStoreSelector } from 'store' - import Cookies from 'js-cookie' -import GoogleIcon from '@mui/icons-material/Google' -import LS from 'lib/localStorage' -import PaperTop from '@ui/mui-extends/esm/PaperTop' import _ from 'lodash' -import i18n from 'components/T' -import { setConfirm } from 'slices/globalStatus' import { useIntl } from 'react-intl' import { useNavigate } from 'react-router-dom' +import PaperTop from '@ui/mui-extends/esm/PaperTop' + +import { useStoreDispatch, useStoreSelector } from 'store' + +import { setConfirm } from 'slices/globalStatus' + +import i18n from 'components/T' + +import LS from 'lib/localStorage' + const Token = () => { const navigate = useNavigate() const intl = useIntl() diff --git a/ui/app/src/pages/Settings/index.tsx b/ui/app/src/pages/Settings/index.tsx index 906f99238e..679515e0ad 100644 --- a/ui/app/src/pages/Settings/index.tsx +++ b/ui/app/src/pages/Settings/index.tsx @@ -14,21 +14,25 @@ * limitations under the License. * */ - import { Box, Chip, Grow, MenuItem, Typography } from '@mui/material' -import { setDebugMode, setEnableKubeSystemNS, setLang, setTheme, setUseNextWorkflowInterface } from 'slices/settings' -import { useStoreDispatch, useStoreSelector } from 'store' +import type { SelectChangeEvent } from '@mui/material' +import messages from 'i18n/messages' import Checkbox from '@ui/mui-extends/esm/Checkbox' import PaperTop from '@ui/mui-extends/esm/PaperTop' -import type { SelectChangeEvent } from '@mui/material' import SelectField from '@ui/mui-extends/esm/SelectField' import Space from '@ui/mui-extends/esm/Space' + +import { useStoreDispatch, useStoreSelector } from 'store' + +import { setDebugMode, setEnableKubeSystemNS, setLang, setTheme, setUseNextWorkflowInterface } from 'slices/settings' + import { T } from 'components/T' -import Token from './Token' -import logo from 'images/logo.svg' + import logoWhite from 'images/logo-white.svg' -import messages from 'i18n/messages' +import logo from 'images/logo.svg' + +import Token from './Token' const Settings = () => { const state = useStoreSelector((state) => state) diff --git a/ui/app/src/pages/Workflows/Single.tsx b/ui/app/src/pages/Workflows/Single.tsx index f3e79a8ba8..5a545b9f08 100644 --- a/ui/app/src/pages/Workflows/Single.tsx +++ b/ui/app/src/pages/Workflows/Single.tsx @@ -19,10 +19,9 @@ import ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined' import { Box, Button, Grid, Grow, Modal, useTheme } from '@mui/material' import { makeStyles } from '@mui/styles' import api from 'api' -import { Event } from 'api/events.type' -import { WorkflowSingle } from 'api/workflows.type' import { EventHandler } from 'cytoscape' import yaml from 'js-yaml' +import { CoreEvent, CoreWorkflowDetail } from 'openapi' import { useEffect, useRef, useState } from 'react' import { useIntl } from 'react-intl' import { useNavigate, useParams } from 'react-router-dom' @@ -70,22 +69,24 @@ const Single = () => { const dispatch = useStoreDispatch() - const [single, setSingle] = useState() + const [single, setSingle] = useState() const [data, setData] = useState() const [selected, setSelected] = useState<'workflow' | 'node'>('workflow') const modalTitle = selected === 'workflow' ? single?.name : selected === 'node' ? data.name : '' const [configOpen, setConfigOpen] = useState(false) const topologyRef = useRef(null) - const [events, setEvents] = useState([]) + const [events, setEvents] = useState([]) const fetchWorkflowSingle = (intervalID?: number) => api.workflows - .single(uuid!) + .workflowsUidGet({ + uid: uuid!, + }) .then(({ data }) => { // TODO: remove noise in API - data.kube_object.metadata.annotations && - delete data.kube_object.metadata.annotations['kubectl.kubernetes.io/last-applied-configuration'] + data.kube_object!.metadata!.annotations && + delete data.kube_object!.metadata!.annotations['kubectl.kubernetes.io/last-applied-configuration'] setSingle(data) @@ -108,14 +109,17 @@ const Single = () => { return } - const { updateElements } = constructWorkflowTopology(topologyRef.current!, single, theme, handleNodeClick) + const { updateElements } = constructWorkflowTopology(topologyRef.current!, single as any, theme, handleNodeClick) topologyRef.current = updateElements } const fetchEvents = () => { api.events - .cascadeFetchEventsForWorkflow(uuid!, { limit: 999 }) + .eventsWorkflowUidGet({ + uid: uuid!, + limit: 999, + }) .then(({ data }) => setEvents(data)) .catch(console.error) .finally(() => { @@ -140,7 +144,7 @@ const Single = () => { switch (action) { case 'archive': - actionFunc = api.workflows.del + actionFunc = api.workflows.workflowsUidDelete break default: @@ -148,7 +152,7 @@ const Single = () => { } if (actionFunc) { - actionFunc(uuid) + actionFunc({ uid: uuid }) .then(() => { dispatch( setAlert({ @@ -168,7 +172,7 @@ const Single = () => { const handleNodeClick: EventHandler = (e) => { const node = e.target const { template: nodeTemplate } = node.data() - const template = single?.kube_object.spec.templates.find((t: any) => t.name === nodeTemplate) + const template = (single?.kube_object!.spec as any).templates.find((t: any) => t.name === nodeTemplate) setData(template) setSelected('node') diff --git a/ui/app/src/pages/Workflows/index.tsx b/ui/app/src/pages/Workflows/index.tsx index ad417c72b1..8efa105cc7 100644 --- a/ui/app/src/pages/Workflows/index.tsx +++ b/ui/app/src/pages/Workflows/index.tsx @@ -22,7 +22,6 @@ import type { ButtonProps } from '@mui/material' import type { GridColumns, GridRowParams } from '@mui/x-data-grid' import { GridActionsCellItem } from '@mui/x-data-grid' import api from 'api' -import { Workflow } from 'api/workflows.type' import _ from 'lodash' import { CoreWorkflowMeta } from 'openapi' import React, { useState } from 'react' @@ -51,14 +50,14 @@ const Workflows = () => { const intl = useIntl() const [loading, setLoading] = useState(true) - const [workflows, setWorkflows] = useState([]) + const [workflows, setWorkflows] = useState([]) const { useNextWorkflowInterface } = useStoreSelector((state) => state.settings) const dispatch = useStoreDispatch() const fetchWorkflows = (intervalID?: number) => { api.workflows - .workflows() + .workflowsGet() .then(({ data }) => { setWorkflows( data @@ -99,7 +98,7 @@ const Workflows = () => { switch (action) { case 'archive': - actionFunc = api.workflows.del + actionFunc = api.workflows.workflowsUidDelete break default: @@ -107,7 +106,7 @@ const Workflows = () => { } if (actionFunc) { - actionFunc(uuid) + actionFunc({ uid: uuid }) .then(() => { dispatch( setAlert({ @@ -141,7 +140,7 @@ const Workflows = () => { const { data: { name, kube_object }, - } = await api.workflows.single(uid) + } = await api.workflows.workflowsUidGet({ uid }) dispatch( setConfirm({ @@ -149,14 +148,16 @@ const Workflows = () => { description: 'This will re-create a new workflow with the same configuration.', handle: () => { api.workflows - .newWorkflow({ - apiVersion: 'chaos-mesh.org/v1alpha1', - kind: 'Workflow', - metadata: { - ...kube_object!.metadata, - name: `${name}-${uuidv4()}`, - }, - spec: kube_object!.spec, + .workflowsPost({ + request: { + apiVersion: 'chaos-mesh.org/v1alpha1', + kind: 'Workflow', + metadata: { + ...kube_object!.metadata, + name: `${name}-${uuidv4()}`, + }, + spec: kube_object!.spec, + } as any, }) .then(() => { dispatch( diff --git a/ui/app/src/slices/experiments.ts b/ui/app/src/slices/experiments.ts index 59c1928fb5..45646e9db6 100644 --- a/ui/app/src/slices/experiments.ts +++ b/ui/app/src/slices/experiments.ts @@ -16,28 +16,49 @@ */ import { PayloadAction, createAsyncThunk, createSlice } from '@reduxjs/toolkit' import api from 'api' +import { V1alpha1PodSelectorSpec } from 'openapi' import { Kind } from 'components/NewExperimentNext/data/types' export const getNamespaces = createAsyncThunk( 'common/chaos-available-namespaces', - async () => (await api.common.chaosAvailableNamespaces()).data + async () => (await api.common.commonChaosAvailableNamespacesGet()).data ) export const getLabels = createAsyncThunk( 'common/labels', - async (podNamespaceList: string[]) => (await api.common.labels(podNamespaceList)).data + async (podNamespaceList: string[]) => + ( + await api.common.commonLabelsGet({ + podNamespaceList: podNamespaceList.join(','), + }) + ).data ) export const getAnnotations = createAsyncThunk( 'common/annotations', - async (podNamespaceList: string[]) => (await api.common.annotations(podNamespaceList)).data + async (podNamespaceList: string[]) => + ( + await api.common.commonAnnotationsGet({ + podNamespaceList: podNamespaceList.join(','), + }) + ).data ) export const getCommonPods = createAsyncThunk( 'common/pods', - async (data: Record) => (await api.common.pods(data)).data + async (data: V1alpha1PodSelectorSpec) => + ( + await api.common.commonPodsPost({ + request: data, + }) + ).data ) export const getNetworkTargetPods = createAsyncThunk( 'network/target/pods', - async (data: Record) => (await api.common.pods(data)).data + async (data: V1alpha1PodSelectorSpec) => + ( + await api.common.commonPodsPost({ + request: data, + }) + ).data ) export type Env = 'k8s' | 'physic' diff --git a/ui/app/src/slices/globalStatus.ts b/ui/app/src/slices/globalStatus.ts index 0b3db84ad8..c6bd8048a6 100644 --- a/ui/app/src/slices/globalStatus.ts +++ b/ui/app/src/slices/globalStatus.ts @@ -14,14 +14,14 @@ * limitations under the License. * */ - import { PayloadAction, createSlice } from '@reduxjs/toolkit' - -import { Config } from 'api/common.type' -import LS from 'lib/localStorage' +import { ConfigChaosDashboardConfig } from 'openapi' import React from 'react' + import { TokenFormValues } from 'components/Token' +import LS from 'lib/localStorage' + export interface Alert { type: 'success' | 'warning' | 'error' message: React.ReactNode @@ -84,11 +84,11 @@ const globalStatusSlice = createSlice({ setConfirmOpen(state, action: PayloadAction) { state.confirmOpen = action.payload }, - setConfig(state, action: PayloadAction) { - state.securityMode = action.payload.security_mode - state.dnsServerCreate = action.payload.dns_server_create - state.gcpSecurityMode = action.payload.gcp_security_mode - state.version = action.payload.version + setConfig(state, action: PayloadAction) { + state.securityMode = action.payload.security_mode! + state.dnsServerCreate = action.payload.dns_server_create! + state.gcpSecurityMode = action.payload.gcp_security_mode! + state.version = action.payload.version! }, setNameSpace(state, action: PayloadAction) { const ns = action.payload diff --git a/ui/app/src/slices/settings.ts b/ui/app/src/slices/settings.ts index a12e17aa1d..dc96868642 100644 --- a/ui/app/src/slices/settings.ts +++ b/ui/app/src/slices/settings.ts @@ -14,9 +14,9 @@ * limitations under the License. * */ +import { createSlice } from '@reduxjs/toolkit' import LS from 'lib/localStorage' -import { createSlice } from '@reduxjs/toolkit' export type Theme = 'light' | 'dark' diff --git a/ui/app/src/slices/workflows.ts b/ui/app/src/slices/workflows.ts index ad3d744d04..e2325fe681 100644 --- a/ui/app/src/slices/workflows.ts +++ b/ui/app/src/slices/workflows.ts @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { PayloadAction, createSlice } from '@reduxjs/toolkit' import LS from 'lib/localStorage' diff --git a/ui/app/src/theme.ts b/ui/app/src/theme.ts index fb3cf8d2cc..1f1074e120 100644 --- a/ui/app/src/theme.ts +++ b/ui/app/src/theme.ts @@ -14,9 +14,7 @@ * limitations under the License. * */ - // All options are based on https://www.figma.com/file/2J6PVAaitQPQFHBtF5LbII/UI-Interface. - import { ThemeOptions, createTheme, responsiveFontSizes } from '@mui/material/styles' const common: ThemeOptions = { diff --git a/ui/packages/mui-extends/.storybook/ThemeProvider.jsx b/ui/packages/mui-extends/.storybook/ThemeProvider.jsx index 837115021e..35ed472318 100644 --- a/ui/packages/mui-extends/.storybook/ThemeProvider.jsx +++ b/ui/packages/mui-extends/.storybook/ThemeProvider.jsx @@ -1,9 +1,6 @@ // This file is synchronized from '@ui/app/src/theme.ts'. - // All options are based on https://www.figma.com/file/2J6PVAaitQPQFHBtF5LbII/UI-Interface. - import { ThemeProvider, createTheme, responsiveFontSizes } from '@mui/material/styles' - import React from 'react' const common = { diff --git a/ui/packages/mui-extends/.storybook/ThemeProvider.tsx b/ui/packages/mui-extends/.storybook/ThemeProvider.tsx index e1b095e7a5..07cc13717e 100644 --- a/ui/packages/mui-extends/.storybook/ThemeProvider.tsx +++ b/ui/packages/mui-extends/.storybook/ThemeProvider.tsx @@ -1,9 +1,6 @@ // This file is synchronized from '@ui/app/src/theme.ts'. - // All options are based on https://www.figma.com/file/2J6PVAaitQPQFHBtF5LbII/UI-Interface. - import { ThemeProvider, createTheme, responsiveFontSizes } from '@mui/material/styles' - import React from 'react' const common = { diff --git a/ui/packages/mui-extends/.storybook/preview.jsx b/ui/packages/mui-extends/.storybook/preview.jsx index ebeb9110d8..50d0b3c219 100644 --- a/ui/packages/mui-extends/.storybook/preview.jsx +++ b/ui/packages/mui-extends/.storybook/preview.jsx @@ -1,4 +1,5 @@ import React from 'react' + import ThemeProvider from './ThemeProvider' export const parameters = { diff --git a/ui/packages/mui-extends/src/@types/mui.d.ts b/ui/packages/mui-extends/src/@types/mui.d.ts index 6abe8b93f2..67537abf86 100644 --- a/ui/packages/mui-extends/src/@types/mui.d.ts +++ b/ui/packages/mui-extends/src/@types/mui.d.ts @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { Theme } from '@mui/material/styles' declare module '@mui/material/styles' { diff --git a/ui/packages/mui-extends/src/Checkbox/index.tsx b/ui/packages/mui-extends/src/Checkbox/index.tsx index e01900c9ef..99930c7844 100644 --- a/ui/packages/mui-extends/src/Checkbox/index.tsx +++ b/ui/packages/mui-extends/src/Checkbox/index.tsx @@ -14,11 +14,10 @@ * limitations under the License. * */ - +import { FormControlLabel } from '@mui/material' import Checkbox, { CheckboxProps as MuiCheckboxProps } from '@mui/material/Checkbox' import FormControl from '../FormControl' -import { FormControlLabel } from '@mui/material' export type CheckboxProps = MuiCheckboxProps & { /** diff --git a/ui/packages/mui-extends/src/ConfirmDialog/index.tsx b/ui/packages/mui-extends/src/ConfirmDialog/index.tsx index 55736852c8..d2e3aebc97 100644 --- a/ui/packages/mui-extends/src/ConfirmDialog/index.tsx +++ b/ui/packages/mui-extends/src/ConfirmDialog/index.tsx @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { Button, Dialog, diff --git a/ui/packages/mui-extends/src/OutlinedInput/index.tsx b/ui/packages/mui-extends/src/OutlinedInput/index.tsx index 13fe236be9..4b85e973f0 100644 --- a/ui/packages/mui-extends/src/OutlinedInput/index.tsx +++ b/ui/packages/mui-extends/src/OutlinedInput/index.tsx @@ -14,9 +14,7 @@ * limitations under the License. * */ - import { OutlinedInput as MuiOutlinedInput, OutlinedInputProps } from '@mui/material' - import { forwardRef } from 'react' const OutlinedInput = forwardRef(({ sx, ...rest }: OutlinedInputProps, ref) => ( diff --git a/ui/packages/mui-extends/src/Paper/index.tsx b/ui/packages/mui-extends/src/Paper/index.tsx index 2001fe74dc..c4e7da2a3c 100644 --- a/ui/packages/mui-extends/src/Paper/index.tsx +++ b/ui/packages/mui-extends/src/Paper/index.tsx @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { Paper as MUIPaper, PaperProps } from '@mui/material' const Paper: React.FC = ({ children, sx, ...rest }) => ( diff --git a/ui/packages/mui-extends/src/PaperTop/index.tsx b/ui/packages/mui-extends/src/PaperTop/index.tsx index 39da6af38c..b07711a450 100644 --- a/ui/packages/mui-extends/src/PaperTop/index.tsx +++ b/ui/packages/mui-extends/src/PaperTop/index.tsx @@ -14,10 +14,9 @@ * limitations under the License. * */ - import { Box, Divider, Typography } from '@mui/material' - import type { BoxProps } from '@mui/material' + import Space from '../Space' interface PaperTopProps { diff --git a/ui/packages/mui-extends/src/SelectField/index.tsx b/ui/packages/mui-extends/src/SelectField/index.tsx index 632b697185..7ae94581b4 100644 --- a/ui/packages/mui-extends/src/SelectField/index.tsx +++ b/ui/packages/mui-extends/src/SelectField/index.tsx @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { Box, Chip, Select } from '@mui/material' import type { SelectProps, TextFieldProps } from '@mui/material' diff --git a/ui/packages/mui-extends/src/Space/index.tsx b/ui/packages/mui-extends/src/Space/index.tsx index 8d00d1da63..f575a8edfb 100644 --- a/ui/packages/mui-extends/src/Space/index.tsx +++ b/ui/packages/mui-extends/src/Space/index.tsx @@ -14,7 +14,6 @@ * limitations under the License. * */ - import { Stack, StackProps } from '@mui/material' function Space(props: StackProps) { diff --git a/ui/packages/mui-extends/src/TextField/index.tsx b/ui/packages/mui-extends/src/TextField/index.tsx index 1d1540bbf6..326d458cbc 100644 --- a/ui/packages/mui-extends/src/TextField/index.tsx +++ b/ui/packages/mui-extends/src/TextField/index.tsx @@ -14,7 +14,6 @@ * limitations under the License. * */ - import type { TextFieldProps as MuiTextFieldProps, OutlinedInputProps } from '@mui/material' import FormControl from '../FormControl' diff --git a/ui/packages/mui-extends/stories/form/AutocompleteField.stories.tsx b/ui/packages/mui-extends/stories/form/AutocompleteField.stories.tsx index a42da39c5b..17b1a437a5 100644 --- a/ui/packages/mui-extends/stories/form/AutocompleteField.stories.tsx +++ b/ui/packages/mui-extends/stories/form/AutocompleteField.stories.tsx @@ -1,6 +1,7 @@ +import React from 'react' + import AutocompleteField from '../../esm/AutocompleteField' import type { AutocompleteFieldProps } from '../../esm/AutocompleteField' -import React from 'react' export default { title: 'Form/AutoCompleteField', diff --git a/ui/packages/mui-extends/stories/form/Checkbox.stories.tsx b/ui/packages/mui-extends/stories/form/Checkbox.stories.tsx index dfb770f5b3..674de3492c 100644 --- a/ui/packages/mui-extends/stories/form/Checkbox.stories.tsx +++ b/ui/packages/mui-extends/stories/form/Checkbox.stories.tsx @@ -1,6 +1,7 @@ +import React from 'react' + import Checkbox from '../../esm/Checkbox' import type { CheckboxProps } from '../../esm/Checkbox' -import React from 'react' export default { title: 'Form/Checkbox', diff --git a/ui/packages/mui-extends/stories/form/TextField.stories.tsx b/ui/packages/mui-extends/stories/form/TextField.stories.tsx index c0d435d265..39bda28109 100644 --- a/ui/packages/mui-extends/stories/form/TextField.stories.tsx +++ b/ui/packages/mui-extends/stories/form/TextField.stories.tsx @@ -1,7 +1,8 @@ import HelpOutlineIcon from '@mui/icons-material/HelpOutline' +import SearchIcon from '@mui/icons-material/Search' import { InputAdornment } from '@mui/material' import React from 'react' -import SearchIcon from '@mui/icons-material/Search' + import Space from '../../esm/Space' import TextField from '../../esm/TextField' import type { TextFieldProps } from '../../esm/TextField' diff --git a/ui/packages/openapi/factory.js b/ui/packages/openapi/factory.js index 6b8112281b..ea31504a9e 100644 --- a/ui/packages/openapi/factory.js +++ b/ui/packages/openapi/factory.js @@ -14,11 +14,10 @@ * limitations under the License. * */ +import ts from 'typescript' import { cleanMarkers, getUIFormWhen, isUIFormIgnore } from './utils.js' -import ts from 'typescript' - const { factory } = ts /** diff --git a/ui/packages/openapi/factory.test.js b/ui/packages/openapi/factory.test.js index 89951b36e4..d00eeb9d35 100644 --- a/ui/packages/openapi/factory.test.js +++ b/ui/packages/openapi/factory.test.js @@ -14,10 +14,9 @@ * limitations under the License. * */ +import ts from 'typescript' import { isHTTTPChaosPatchHeadersOrQueries, typeTextToFieldType, typeTextToInitialValue } from './factory.js' - -import ts from 'typescript' import { visitFilter } from './utils.js' describe('openapi => factory', () => { diff --git a/ui/packages/openapi/index.js b/ui/packages/openapi/index.js index 27d641aedd..d24e09505f 100644 --- a/ui/packages/openapi/index.js +++ b/ui/packages/openapi/index.js @@ -14,17 +14,16 @@ * limitations under the License. * */ - -import { appPath, ignores } from './constants.js' -import { getUIFormEnum, isUIFormIgnore } from './utils.js' - +import fs from 'fs' +import yaml from 'js-yaml' import _get from 'lodash.get' import _set from 'lodash.set' -import fs from 'fs' -import { nodeToField } from './factory.js' import sig from 'signale' import ts from 'typescript' -import yaml from 'js-yaml' + +import { appPath, ignores } from './constants.js' +import { nodeToField } from './factory.js' +import { getUIFormEnum, isUIFormIgnore } from './utils.js' const { factory } = ts diff --git a/ui/packages/openapi/openapiconfig.json b/ui/packages/openapi/openapiconfig.json index 83914bd569..b51a94b7fe 100644 --- a/ui/packages/openapi/openapiconfig.json +++ b/ui/packages/openapi/openapiconfig.json @@ -1,3 +1,4 @@ { - "supportsES6": true + "supportsES6": true, + "useSingleRequestParameter": true } diff --git a/ui/yarn.lock b/ui/yarn.lock index d11d10d1d6..952332b446 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -5029,6 +5029,11 @@ atob@^2.1.2: resolved "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== +auto-bind@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/auto-bind/-/auto-bind-5.0.1.tgz#50d8e63ea5a1dddcb5e5e36451c1a8266ffbb2ae" + integrity sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg== + autoprefixer@^10.4.0: version "10.4.0" resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.0.tgz"